Skip to contentSkip to conversation

net: stmmac: Drop redundant skb_mark_for_recycle() for SKB frags

PATCH Applied Furong Xu 2 participants 2 messages Jan 17, 2025 – Jan 20, 2025

Subsystems (4)
lore
Share & tools
lore

Furong Xu

author
#0 lore raw

PATCH 1/1 net: stmmac: Drop redundant skb_mark_for_recycle() for SKB frags

After commit df542f669307 ("net: stmmac: Switch to zero-copy in non-XDP RX path"), SKBs are always marked for recycle, it is redundant to mark SKBs more than once when new frags are appended.

---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +0 -6
index d99ad77a8005..edbf8994455d 100644
@@ -5644,9 +5644,6 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
 			skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
 					buf->page, buf->page_offset, buf1_len,
 					priv->dma_conf.dma_buf_sz);
-
-			/* Data payload appended into SKB */
-			skb_mark_for_recycle(skb);
 			buf->page = NULL;
 		}
 
@@ -5656,9 +5653,6 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
 			skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
 					buf->sec_page, 0, buf2_len,
 					priv->dma_conf.dma_buf_sz);
-
-			/* Data payload appended into SKB */
-			skb_mark_for_recycle(skb);
 			buf->sec_page = NULL;
 		}
 
Signature · 1 line
2.34.1
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Fri, 17 Jan 2025 14:28:05 +0800 you wrote:

After commit df542f669307 ("net: stmmac: Switch to zero-copy in non-XDP RX path"), SKBs are always marked for recycle, it is redundant to mark SKBs more than once when new frags are appended.

---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ------
 1 file changed, 6 deletions(-)

Here is the summary with links:
- [net-next,v1] net: stmmac: Drop redundant skb_mark_for_recycle() for SKB frags

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

You are awesome, thank you!

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