Skip to contentSkip to conversation

net: netsec: enable pp skb recycling

PATCH Applied Lorenzo Bianconi 3 participants 3 messages Feb 25, 2022 – Feb 28, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: netsec: enable pp skb recycling

Similar to mvneta or mvpp2, enable page_pool skb recycling for netsec dirver.

---
 drivers/net/ethernet/socionext/netsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/socionext/netsec.c +1 -1
index 556bd353dd42..b0c5a44785fa 100644
@@ -1044,7 +1044,7 @@ static int netsec_process_rx(struct netsec_priv *priv, int budget)
 				  "rx failed to build skb\n");
 			break;
 		}
-		page_pool_release_page(dring->page_pool, page);
+		skb_mark_for_recycle(skb);
 
 		skb_reserve(skb, xdp.data - xdp.data_hard_start);
 		skb_put(skb, xdp.data_end - xdp.data);
Signature · 1 line
2.35.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 23 lines · Lorenzo Bianconi

Similar to mvneta or mvpp2, enable page_pool skb recycling for netsec dirver.

---
 drivers/net/ethernet/socionext/netsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/socionext/netsec.c +1 -2
index 556bd353dd42..b0c5a44785fa 100644
@@ -1044,7 +1044,7 @@ static int netsec_process_rx(struct netsec_priv *priv, int budget)
                                  "rx failed to build skb\n");
                        break;
                }
-               page_pool_release_page(dring->page_pool, page);
+               skb_mark_for_recycle(skb);
 
                skb_reserve(skb, xdp.data - xdp.data_hard_start);
                skb_put(skb, xdp.data_end - xdp.data);
--
Quoted 2 lines

2.35.1

I'll test it at some point just to make sure everything, but this is a standard change to enable recycling. So

#2 lore raw
In reply to Lorenzo Bianconi
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Quoted 7 lines · On Fri, 25 Feb 2022 16:29:51 +0100 you wrote:

Similar to mvneta or mvpp2, enable page_pool skb recycling for netsec dirver.

---
 drivers/net/ethernet/socionext/netsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- [net-next] net: netsec: enable pp skb recycling

    https://git.kernel.org/netdev/net-next/c/6a4696c4284f

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html