* [PATCH net-next] iavf: use skb_put_padto()
@ 2026-10-16 9:49 Eric Dumazet
0 siblings, 0 replies; only message in thread
From: Eric Dumazet @ 2026-10-16 9:49 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, netdev, Eric Dumazet, Tony Nguyen, Przemek Kitszel,
Andrew Lunn
Replace skb_pad() and the manual skb->len and tail pointer updates
in iavf_xmit_frame() with skb_put_padto().
No functional change.
Signed-off-by: Eric Dumazet <edumazet@kernel.org>
---
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>
---
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(-)
diff --git a/drivers/net/ethernet/intel/iavf/iavf_txrx.c b/drivers/net/ethernet/intel/iavf/iavf_txrx.c
index c30abf17cf5d3cdc715f5da38474c4d40ab70a05..8982cf75466faa368b84a1f57735e4523490c3f3 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_txrx.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_txrx.c
@@ -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);
}
--
2.53.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-16 9:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-16 9:49 [PATCH net-next] iavf: use skb_put_padto() Eric Dumazet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox