]> Git Repo - linux.git/commitdiff
net: fec: use napi_consume_skb() in fec_enet_tx_queue()
authorWei Fang <[email protected]>
Wed, 16 Aug 2023 09:02:42 +0000 (17:02 +0800)
committerJakub Kicinski <[email protected]>
Fri, 18 Aug 2023 22:17:27 +0000 (15:17 -0700)
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 <[email protected]>
Suggested-by: Alexander H Duyck <[email protected]>
Reviewed-by: Leon Romanovsky <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
drivers/net/ethernet/freescale/fec_main.c

index f77105f017c1e3a8c8522f9114e9bb460e40ed45..e23a559771839332f1cb0ede117adc930d13c03b 100644 (file)
@@ -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 */
This page took 0.141118 seconds and 4 git commands to generate.