diff mbox series

[net-next] net: fec: use napi_consume_skb() in fec_enet_tx_queue()

Message ID 20230816090242.463822-1-wei.fang@nxp.com (mailing list archive)
State Accepted
Commit 91a10efc89dc510edf57cb1d3a7ad480ef5160b8
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: fec: use napi_consume_skb() in fec_enet_tx_queue() | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1330 this patch: 1330
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 1353 this patch: 1353
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1353 this patch: 1353
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Wei Fang Aug. 16, 2023, 9:02 a.m. UTC
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(-)

Comments

Leon Romanovsky Aug. 16, 2023, 2:33 p.m. UTC | #1
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>
patchwork-bot+netdevbpf@kernel.org Aug. 18, 2023, 10:20 p.m. UTC | #2
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!
diff mbox series

Patch

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 */