Netdev List
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Magnus Karlsson <magnus.karlsson@gmail.com>
Cc: Eric Dumazet <edumazet@kernel.org>,
	Magnus Karlsson <magnus.karlsson@intel.com>,
	<intel-wired-lan@lists.osuosl.org>, <anthony.l.nguyen@intel.com>,
	<netdev@vger.kernel.org>, <przemyslaw.kitszel@intel.com>,
	<andrew+netdev@lunn.ch>, <davem@davemloft.net>, <kuba@kernel.org>,
	<pabeni@redhat.com>
Subject: Re: [PATCH iwl-net 2/2] iavf: fix USO for 32-bit systems
Date: Tue, 27 Oct 2026 14:14:40 +0100	[thread overview]
Message-ID: <auCjwM+9Y0v+kg6v@boxer> (raw)
In-Reply-To: <CAJ8uoz2J5EbN++dts69BVJoAW8+T3bEtgHC-t3EtVtURQH-QWg@mail.gmail.com>

On Tue, Oct 27, 2026 at 02:56:07PM +0200, Magnus Karlsson wrote:
> On Tue, 27 Oct 2026 at 14:43, Eric Dumazet <edumazet@kernel.org> wrote:
> >
> > Le mar. 27 oct. 2026 à 13:15, Magnus Karlsson
> > <magnus.karlsson@intel.com> a écrit :
> > >
> > > That USO works for 64-bit systems is just pure luck. Currently, the
> > > computation of the UDP segmentation header is performed using sizeof()
> > > a pointer instead of the sizeof() the UDP header that the pointer
> > > points to. Since the UDP header happens to be 8 bytes long and a
> > > pointer is 8 bytes long on a 64-bit system, this works on all those
> > > systems. But no such luck for anyone using a 32-bit system as 8 bytes
> > > != 4 bytes. So fix this by using sizeof() the UDP header that the
> > > pointer points to instead.
> > >
> > > This was found by an LLM while implementing something else that used USO.
> > >
> > > Fixes: c91a4f9feb67a199c2 ("add support for UDP Segmentation Offload")
> >
> > Missing prefix? This was really:
> >
> > Fixes: c91a4f9feb67 ("iavf: add support for UDP Segmentation Offload")
> 
> You are correct on both accounts/patches. Do not know why I missed this, sorry.
> 
> Do you want a v2 with this added?

Current policy is that you need to wait 24h with posting next revisions.
Eric marked it as 'changes requested' so yes, you need a v2.

You can add my review tag as well, thanks for auditing intel drivers
against this bug.

MF

> 
> > Other than this,
> > Reviewed-by: Eric Dumazet <edumazet@kernel.org>
> >
> > > Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
> > > ---
> > >  drivers/net/ethernet/intel/iavf/iavf_txrx.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/net/ethernet/intel/iavf/iavf_txrx.c b/drivers/net/ethernet/intel/iavf/iavf_txrx.c
> > > index 8982cf75466f..2c290d7788d2 100644
> > > --- a/drivers/net/ethernet/intel/iavf/iavf_txrx.c
> > > +++ b/drivers/net/ethernet/intel/iavf/iavf_txrx.c
> > > @@ -1807,7 +1807,7 @@ static int iavf_tso(struct iavf_tx_buffer *first, u8 *hdr_len,
> > >                 csum_replace_by_diff(&l4.udp->check,
> > >                                      (__force __wsum)htonl(paylen));
> > >                 /* compute length of UDP segmentation header */
> > > -               *hdr_len = (u8)sizeof(l4.udp) + l4_offset;
> > > +               *hdr_len = sizeof(*l4.udp) + l4_offset;
> > >         } else {
> > >                 csum_replace_by_diff(&l4.tcp->check,
> > >                                      (__force __wsum)htonl(paylen));
> > > --
> > > 2.38.1
> > >

  reply	other threads:[~2026-10-27 13:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27 12:14 [PATCH iwl-net 0/2] ice: iavf: fix USO for 32-bit systems Magnus Karlsson
2026-10-27 12:14 ` [PATCH iwl-net 1/2] ice: " Magnus Karlsson
2026-10-27 12:45   ` Eric Dumazet
2026-10-27 12:14 ` [PATCH iwl-net 2/2] iavf: " Magnus Karlsson
2026-10-27 12:43   ` Eric Dumazet
2026-10-27 12:56     ` Magnus Karlsson
2026-10-27 13:14       ` Maciej Fijalkowski [this message]
2026-10-27 13:15         ` Maciej Fijalkowski
2026-10-27 12:20 ` [PATCH iwl-net 0/2] ice: " netdev-bot+sinfo

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=auCjwM+9Y0v+kg6v@boxer \
    --to=maciej.fijalkowski@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.org \
    --cc=magnus.karlsson@gmail.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    /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