public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 iwl-net] igc: fix missing update of skb->tail in igc_xmit_frame()
@ 2026-02-14 19:46 Kohei Enju
  2026-02-16 12:59 ` Simon Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kohei Enju @ 2026-02-14 19:46 UTC (permalink / raw)
  To: intel-wired-lan, netdev
  Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Sasha Neftin,
	kohei.enju, Kohei Enju

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>
---
 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 1abbdbebf8a4..7ebeca5333b6 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -1727,11 +1727,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.51.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 iwl-net] igc: fix missing update of skb->tail in igc_xmit_frame()
  2026-02-14 19:46 [PATCH v1 iwl-net] igc: fix missing update of skb->tail in igc_xmit_frame() Kohei Enju
@ 2026-02-16 12:59 ` Simon Horman
  2026-02-18  8:08 ` [Intel-wired-lan] " Paul Menzel
  2026-03-11  9:59 ` Dahan, AvigailX
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2026-02-16 12:59 UTC (permalink / raw)
  To: Kohei Enju
  Cc: intel-wired-lan, netdev, Tony Nguyen, Przemek Kitszel,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Sasha Neftin, kohei.enju

On Sat, Feb 14, 2026 at 07:46:32PM +0000, Kohei Enju wrote:
> 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>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Intel-wired-lan] [PATCH v1 iwl-net] igc: fix missing update of skb->tail in igc_xmit_frame()
  2026-02-14 19:46 [PATCH v1 iwl-net] igc: fix missing update of skb->tail in igc_xmit_frame() Kohei Enju
  2026-02-16 12:59 ` Simon Horman
@ 2026-02-18  8:08 ` Paul Menzel
  2026-03-11  9:59 ` Dahan, AvigailX
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Menzel @ 2026-02-18  8:08 UTC (permalink / raw)
  To: Kohei Enju
  Cc: intel-wired-lan, netdev, Tony Nguyen, Przemek Kitszel,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Sasha Neftin, kohei.enju

Dear Kohei,


Thank you for your patch.

Am 14.02.26 um 20:46 schrieb Kohei Enju:
> 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>
> ---
>   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 1abbdbebf8a4..7ebeca5333b6 100644
> --- a/drivers/net/ethernet/intel/igc/igc_main.c
> +++ b/drivers/net/ethernet/intel/igc/igc_main.c
> @@ -1727,11 +1727,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));
>   }

Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>


Kind regards,

Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Intel-wired-lan] [PATCH v1 iwl-net] igc: fix missing update of skb->tail in igc_xmit_frame()
  2026-02-14 19:46 [PATCH v1 iwl-net] igc: fix missing update of skb->tail in igc_xmit_frame() Kohei Enju
  2026-02-16 12:59 ` Simon Horman
  2026-02-18  8:08 ` [Intel-wired-lan] " Paul Menzel
@ 2026-03-11  9:59 ` Dahan, AvigailX
  2 siblings, 0 replies; 4+ messages in thread
From: Dahan, AvigailX @ 2026-03-11  9:59 UTC (permalink / raw)
  To: Kohei Enju, intel-wired-lan, netdev
  Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Sasha Neftin,
	kohei.enju



On 14/02/2026 21:46, Kohei Enju wrote:
> 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>
> ---
>   drivers/net/ethernet/intel/igc/igc_main.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 

Tested-by: Avigail Dahan <avigailx.dahan@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-11 10:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-14 19:46 [PATCH v1 iwl-net] igc: fix missing update of skb->tail in igc_xmit_frame() Kohei Enju
2026-02-16 12:59 ` Simon Horman
2026-02-18  8:08 ` [Intel-wired-lan] " Paul Menzel
2026-03-11  9:59 ` Dahan, AvigailX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox