diff mbox series

net/af_xdp: fix redundant check for NEED WAKEUP

Message ID 20200106140940.10124-1-xiao.w.wang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series net/af_xdp: fix redundant check for NEED WAKEUP | expand

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/travis-robot warning Travis build: failed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Wang, Xiao W Jan. 6, 2020, 2:09 p.m. UTC
Function kick_tx() has built-in detection on NEED_WAKEUP flag, so just
call it directly, like elsewhere in the driver.

Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Cc: stable@dpdk.org

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Ciara Loftus Jan. 8, 2020, 3:57 p.m. UTC | #1
> 
> Function kick_tx() has built-in detection on NEED_WAKEUP flag, so just
> call it directly, like elsewhere in the driver.
> 
> Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
> ---
>  drivers/net/af_xdp/rte_eth_af_xdp.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c
> b/drivers/net/af_xdp/rte_eth_af_xdp.c
> index 2b1245ee4..d903e6c28 100644
> --- a/drivers/net/af_xdp/rte_eth_af_xdp.c
> +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
> @@ -480,10 +480,7 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs,
> uint16_t nb_pkts)
>  		tx_bytes += mbuf->pkt_len;
>  	}
> 
> -#if defined(XDP_USE_NEED_WAKEUP)
> -	if (xsk_ring_prod__needs_wakeup(&txq->tx))
> -#endif
> -		kick_tx(txq);
> +	kick_tx(txq);
> 
>  out:
>  	xsk_ring_prod__submit(&txq->tx, count);
> --
> 2.15.1


Thanks for the patch.

Tested-by: Ciara Loftus <ciara.loftus@intel.com>
Ferruh Yigit Jan. 10, 2020, 2:44 p.m. UTC | #2
On 1/8/2020 3:57 PM, Loftus, Ciara wrote:
>>
>> Function kick_tx() has built-in detection on NEED_WAKEUP flag, so just
>> call it directly, like elsewhere in the driver.
>>
>> Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
>> ---
>>  drivers/net/af_xdp/rte_eth_af_xdp.c | 5 +----
>>  1 file changed, 1 insertion(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c
>> b/drivers/net/af_xdp/rte_eth_af_xdp.c
>> index 2b1245ee4..d903e6c28 100644
>> --- a/drivers/net/af_xdp/rte_eth_af_xdp.c
>> +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
>> @@ -480,10 +480,7 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs,
>> uint16_t nb_pkts)
>>  		tx_bytes += mbuf->pkt_len;
>>  	}
>>
>> -#if defined(XDP_USE_NEED_WAKEUP)
>> -	if (xsk_ring_prod__needs_wakeup(&txq->tx))
>> -#endif
>> -		kick_tx(txq);
>> +	kick_tx(txq);
>>
>>  out:
>>  	xsk_ring_prod__submit(&txq->tx, count);
>> --
>> 2.15.1
> 
> 
> Thanks for the patch.
> 
> Tested-by: Ciara Loftus <ciara.loftus@intel.com>
> 

Applied to dpdk-next-net/master, thanks.
diff mbox series

Patch

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 2b1245ee4..d903e6c28 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -480,10 +480,7 @@  af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		tx_bytes += mbuf->pkt_len;
 	}
 
-#if defined(XDP_USE_NEED_WAKEUP)
-	if (xsk_ring_prod__needs_wakeup(&txq->tx))
-#endif
-		kick_tx(txq);
+	kick_tx(txq);
 
 out:
 	xsk_ring_prod__submit(&txq->tx, count);