All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFT net-next] net: ti: add pp skb recycling support
@ 2021-06-09 12:01 Lorenzo Bianconi
  2021-06-09 12:20 ` Matteo Croce
  0 siblings, 1 reply; 8+ messages in thread
From: Lorenzo Bianconi @ 2021-06-09 12:01 UTC (permalink / raw)
  To: netdev
  Cc: lorenzo.bianconi, davem, kuba, grygorii.strashko, mcroce,
	ilias.apalodimas, brouer

As already done for mvneta and mvpp2, enable skb recycling for ti
ethernet drivers

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
This patch has just compile-tested
---
 drivers/net/ethernet/ti/cpsw.c     | 4 ++--
 drivers/net/ethernet/ti/cpsw_new.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index c0cd7de88316..049508667a6d 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -430,8 +430,8 @@ static void cpsw_rx_handler(void *token, int len, int status)
 		cpts_rx_timestamp(cpsw->cpts, skb);
 	skb->protocol = eth_type_trans(skb, ndev);
 
-	/* unmap page as no netstack skb page recycling */
-	page_pool_release_page(pool, page);
+	/* mark skb for recycling */
+	skb_mark_for_recycle(skb, page, pool);
 	netif_receive_skb(skb);
 
 	ndev->stats.rx_bytes += len;
diff --git a/drivers/net/ethernet/ti/cpsw_new.c b/drivers/net/ethernet/ti/cpsw_new.c
index 69b7a4e0220a..11f536138495 100644
--- a/drivers/net/ethernet/ti/cpsw_new.c
+++ b/drivers/net/ethernet/ti/cpsw_new.c
@@ -373,8 +373,8 @@ static void cpsw_rx_handler(void *token, int len, int status)
 		cpts_rx_timestamp(cpsw->cpts, skb);
 	skb->protocol = eth_type_trans(skb, ndev);
 
-	/* unmap page as no netstack skb page recycling */
-	page_pool_release_page(pool, page);
+	/* mark skb for recycling */
+	skb_mark_for_recycle(skb, page, pool);
 	netif_receive_skb(skb);
 
 	ndev->stats.rx_bytes += len;
-- 
2.31.1


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

end of thread, other threads:[~2021-06-09 17:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09 12:01 [RFT net-next] net: ti: add pp skb recycling support Lorenzo Bianconi
2021-06-09 12:20 ` Matteo Croce
2021-06-09 15:02   ` Grygorii Strashko
2021-06-09 15:12     ` Lorenzo Bianconi
2021-06-09 15:43     ` Matteo Croce
2021-06-09 15:55       ` Jesper Dangaard Brouer
2021-06-09 16:58         ` Eric Dumazet
2021-06-09 17:03   ` Grygorii Strashko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.