Skip to contentSkip to conversation

iavf: use skb_put_padto()

PATCH Applied Eric Dumazet 2 participants 2 messages Oct 16 – Oct 20

Subsystems (3)
lore
Share & tools
lore

Eric Dumazet

author maintainer
#0 lore raw

PATCH 1/1 iavf: use skb_put_padto()

Replace skb_pad() and the manual skb->len and tail pointer updates in iavf_xmit_frame() with skb_put_padto().

No functional change.

---
Cc: Tony Nguyen <[email protected]>
Cc: Przemek Kitszel <[email protected]>
Cc: Andrew Lunn <[email protected]>
---
Part of a medium term plan to get rid of skb_pad(), source of many mistakes.

 drivers/net/ethernet/intel/iavf/iavf_txrx.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_txrx.c +2 -6
index c30abf17cf5d3cdc715f5da38474c4d40ab70a05..8982cf75466faa368b84a1f57735e4523490c3f3 100644
@@ -2396,12 +2396,8 @@ netdev_tx_t iavf_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
 	/* hardware can't handle really short frames, hardware padding works
 	 * beyond this point
 	 */
-	if (unlikely(skb->len < IAVF_MIN_TX_LEN)) {
-		if (skb_pad(skb, IAVF_MIN_TX_LEN - skb->len))
-			return NETDEV_TX_OK;
-		skb->len = IAVF_MIN_TX_LEN;
-		skb_set_tail_pointer(skb, IAVF_MIN_TX_LEN);
-	}
+	if (skb_put_padto(skb, IAVF_MIN_TX_LEN))
+		return NETDEV_TX_OK;
 
 	return iavf_xmit_frame_ring(skb, tx_ring);
 }
Signature · 1 line
2.53.0
#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, 16 Oct 2026 11:49:25 +0200 you wrote:

Replace skb_pad() and the manual skb->len and tail pointer updates in iavf_xmit_frame() with skb_put_padto().

No functional change.

[...]

Here is the summary with links:
- [net-next] iavf: use skb_put_padto()

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

You are awesome, thank you!

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