netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: fec: use napi_consume_skb() in fec_enet_tx_queue()
@ 2023-08-16  9:02 Wei Fang
  2023-08-16 14:33 ` Leon Romanovsky
  2023-08-18 22:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Fang @ 2023-08-16  9:02 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, alexander.duyck, xiaoning.wang,
	shenwei.wang, netdev
  Cc: linux-kernel, linux-imx

Now that the "budget" is passed into fec_enet_tx_queue(), one
optimization we can do is to use napi_consume_skb() to instead
of dev_kfree_skb_any().

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Suggested-by: Alexander H Duyck <alexander.duyck@gmail.com>
---
 drivers/net/ethernet/freescale/fec_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index f77105f017c1..e23a55977183 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1494,7 +1494,7 @@ fec_enet_tx_queue(struct net_device *ndev, u16 queue_id, int budget)
 			}
 
 			/* Free the sk buffer associated with this last transmit */
-			dev_kfree_skb_any(skb);
+			napi_consume_skb(skb, budget);
 		} else if (txq->tx_buf[index].type == FEC_TXBUF_T_XDP_NDO) {
 			xdp_return_frame_rx_napi(xdpf);
 		} else { /* recycle pages of XDP_TX frames */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: fec: use napi_consume_skb() in fec_enet_tx_queue()
  2023-08-16  9:02 [PATCH net-next] net: fec: use napi_consume_skb() in fec_enet_tx_queue() Wei Fang
@ 2023-08-16 14:33 ` Leon Romanovsky
  2023-08-18 22:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2023-08-16 14:33 UTC (permalink / raw)
  To: Wei Fang
  Cc: davem, edumazet, kuba, pabeni, alexander.duyck, xiaoning.wang,
	shenwei.wang, netdev, linux-kernel, linux-imx

On Wed, Aug 16, 2023 at 05:02:42PM +0800, Wei Fang wrote:
> Now that the "budget" is passed into fec_enet_tx_queue(), one
> optimization we can do is to use napi_consume_skb() to instead
> of dev_kfree_skb_any().
> 
> Signed-off-by: Wei Fang <wei.fang@nxp.com>
> Suggested-by: Alexander H Duyck <alexander.duyck@gmail.com>
> ---
>  drivers/net/ethernet/freescale/fec_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: fec: use napi_consume_skb() in fec_enet_tx_queue()
  2023-08-16  9:02 [PATCH net-next] net: fec: use napi_consume_skb() in fec_enet_tx_queue() Wei Fang
  2023-08-16 14:33 ` Leon Romanovsky
@ 2023-08-18 22:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-08-18 22:20 UTC (permalink / raw)
  To: Wei Fang
  Cc: davem, edumazet, kuba, pabeni, alexander.duyck, xiaoning.wang,
	shenwei.wang, netdev, linux-kernel, linux-imx

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 16 Aug 2023 17:02:42 +0800 you wrote:
> Now that the "budget" is passed into fec_enet_tx_queue(), one
> optimization we can do is to use napi_consume_skb() to instead
> of dev_kfree_skb_any().
> 
> Signed-off-by: Wei Fang <wei.fang@nxp.com>
> Suggested-by: Alexander H Duyck <alexander.duyck@gmail.com>
> 
> [...]

Here is the summary with links:
  - [net-next] net: fec: use napi_consume_skb() in fec_enet_tx_queue()
    https://git.kernel.org/netdev/net-next/c/91a10efc89dc

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-18 22:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-16  9:02 [PATCH net-next] net: fec: use napi_consume_skb() in fec_enet_tx_queue() Wei Fang
2023-08-16 14:33 ` Leon Romanovsky
2023-08-18 22:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).