[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230816090242.463822-1-wei.fang@nxp.com>
Date: Wed, 16 Aug 2023 17:02:42 +0800
From: Wei Fang <wei.fang@....com>
To: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, alexander.duyck@...il.com,
xiaoning.wang@....com, shenwei.wang@....com, netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, linux-imx@....com
Subject: [PATCH net-next] net: fec: use napi_consume_skb() in fec_enet_tx_queue()
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@....com>
Suggested-by: Alexander H Duyck <alexander.duyck@...il.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
Powered by blists - more mailing lists