From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, andrew+netdev@lunn.ch,
netdev@vger.kernel.org
Cc: Kohei Enju <kohei@enjuk.jp>,
anthony.l.nguyen@intel.com, kohei.enju@gmail.com,
dima.ruinskiy@intel.com, Simon Horman <horms@kernel.org>,
Paul Menzel <pmenzel@molgen.mpg.de>,
Avigail Dahan <avigailx.dahan@intel.com>
Subject: [PATCH net 1/4] igc: fix missing update of skb->tail in igc_xmit_frame()
Date: Tue, 17 Mar 2026 14:19:02 -0700 [thread overview]
Message-ID: <20260317211906.115505-2-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20260317211906.115505-1-anthony.l.nguyen@intel.com>
From: Kohei Enju <kohei@enjuk.jp>
igc_xmit_frame() misses updating skb->tail when the packet size is
shorter than the minimum one.
Use skb_put_padto() in alignment with other Intel Ethernet drivers.
Fixes: 0507ef8a0372 ("igc: Add transmit and receive fastpath and interrupt handlers")
Signed-off-by: Kohei Enju <kohei@enjuk.jp>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Tested-by: Avigail Dahan <avigailx.dahan@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index b2e8d0c0f827..1c5d7b23f225 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -1730,11 +1730,8 @@ static netdev_tx_t igc_xmit_frame(struct sk_buff *skb,
/* The minimum packet size with TCTL.PSP set is 17 so pad the skb
* in order to meet this minimum size requirement.
*/
- if (skb->len < 17) {
- if (skb_padto(skb, 17))
- return NETDEV_TX_OK;
- skb->len = 17;
- }
+ if (skb_put_padto(skb, 17))
+ return NETDEV_TX_OK;
return igc_xmit_frame_ring(skb, igc_tx_queue_mapping(adapter, skb));
}
--
2.47.1
next prev parent reply other threads:[~2026-03-17 21:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 21:19 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2026-03-17 (igc, iavf, libie) Tony Nguyen
2026-03-17 21:19 ` Tony Nguyen [this message]
2026-03-17 21:19 ` [PATCH net 2/4] igc: fix page fault in XDP TX timestamps handling Tony Nguyen
2026-03-17 21:19 ` [PATCH net 3/4] iavf: fix VLAN filter lost on add/delete race Tony Nguyen
2026-03-17 21:19 ` [PATCH net 4/4] libie: prevent memleak in fwlog code Tony Nguyen
2026-03-19 0:44 ` [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2026-03-17 (igc, iavf, libie) patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260317211906.115505-2-anthony.l.nguyen@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=avigailx.dahan@intel.com \
--cc=davem@davemloft.net \
--cc=dima.ruinskiy@intel.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kohei.enju@gmail.com \
--cc=kohei@enjuk.jp \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pmenzel@molgen.mpg.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox