From: Linus Walleij <linus.walleij@linaro.org>
To: Eric Dumazet <edumazet@google.com>
Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Andrew Lunn <andrew@lunn.ch>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next v3 1/5] net: ethernet: cortina: Restore TSO support
Date: Wed, 15 May 2024 21:43:38 +0200 [thread overview]
Message-ID: <CACRpkdZaFn8QsfS9m5w0Eq8sRc9-zoopGHXp9Lu1aJzkKRhB9g@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdYPS7ox=rkAwwF3UCnh-HXqKmMh0CUmeG1QQMLTeQsZ9Q@mail.gmail.com>
On Tue, May 14, 2024 at 11:11 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> On Tue, May 14, 2024 at 11:13 AM Eric Dumazet <edumazet@google.com> wrote:
> > On Mon, May 13, 2024 at 3:38 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> > > + mss += skb_tcp_all_headers(skb);
> > > + netdev_dbg(netdev, "segment offloading mss = %04x len=%04x\n",
> > > + mss, skb->len);
> > > + word1 |= TSS_MTU_ENABLE_BIT;
> > > + word3 |= mss;
> > > + } else if (skb->len >= ETH_FRAME_LEN) {
> >
> > Note that this code path should be dead, because the upper layers
> > should drop the packets before reaching this point.
> > I wonder how you have tested it.
>
> It's actually easy to provoke with UDP jumboframes.
Oh and it also happens with TCP. This is when TSO is not used, but
the packet goes into a DSA switch and you transmit
a maximum sized TCP packet. The DSA tagging code will add
some bytes of tag to the frame making it exceed ETH_FRAME_LEN,
and this will crash the HW checksumming engine.
This was how I found the original bugs in the driver...
Yours,
Linus Walleij
next prev parent reply other threads:[~2024-05-15 19:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 13:38 [PATCH net-next v3 0/5] net: ethernet: cortina: TSO and pause param Linus Walleij
2024-05-13 13:38 ` [PATCH net-next v3 1/5] net: ethernet: cortina: Restore TSO support Linus Walleij
2024-05-14 9:13 ` Eric Dumazet
2024-05-14 21:11 ` Linus Walleij
2024-05-15 19:43 ` Linus Walleij [this message]
2024-05-13 13:38 ` [PATCH net-next v3 2/5] net: ethernet: cortina: Use TSO also on common TCP Linus Walleij
2024-05-14 9:16 ` Eric Dumazet
2024-05-13 13:38 ` [PATCH net-next v3 3/5] net: ethernet: cortina: Rename adjust link callback Linus Walleij
2024-05-13 13:38 ` [PATCH net-next v3 4/5] net: ethernet: cortina: Use negotiated TX/RX pause Linus Walleij
2024-05-13 17:20 ` Andrew Lunn
2024-05-13 13:38 ` [PATCH net-next v3 5/5] net: ethernet: cortina: Implement .set_pauseparam() Linus Walleij
2024-05-13 17:22 ` Andrew Lunn
2024-05-14 8:55 ` Linus Walleij
2024-05-14 14:32 ` Andrew Lunn
2024-05-14 21:13 ` Linus Walleij
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=CACRpkdZaFn8QsfS9m5w0Eq8sRc9-zoopGHXp9Lu1aJzkKRhB9g@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ulli.kroll@googlemail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).