netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v3 0/4] Fix large frames in the Gemini ethernet driver
@ 2023-11-07  9:54 Linus Walleij
  2023-11-07  9:54 ` [PATCH net v3 1/4] net: ethernet: cortina: Fix MTU max setting Linus Walleij
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Linus Walleij @ 2023-11-07  9:54 UTC (permalink / raw)
  To: Hans Ulli Kroll, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Michał Mirosław, Vladimir Oltean,
	Andrew Lunn
  Cc: linux-arm-kernel, netdev, linux-kernel, Linus Walleij

This is the result of a bug hunt for a problem with the
RTL8366RB DSA switch leading me wrong all over the place.

I am indebted to Vladimir Oltean who as usual pointed
out where the real problem was, many thanks!

Tryig to actually use big ("jumbo") frames on this
hardware uncovered the real bugs. Then I tested it on
the DSA switch and it indeed fixes the issue.

To make sure it also works fine with big frames on
non-DSA devices I also copied a large video file over
scp to a device with maximum frame size, the data
was transported in large TCP packets ending up in
0x7ff sized frames using software checksumming at
~2.0 MB/s.

If I set down the MTU to the standard 1500 bytes so
that hardware checksumming is used, the scp transfer
of the same file was slightly lower, ~1.8-1.9 MB/s.

Despite this not being the best test it shows that
we can now stress the hardware with large frames
and that software checksum works fine.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Changes in v3:
- Do not reimplement the existing oversize check (sigh what is
  wrong with me). Drop that patch.
- Drop the gmac_fix_features() since we are better off falling
  back to software checksums dynamically per-frame.
- Add a new patch to bypass the checksumming engine if we are not
  handling TCP or UDP.
- Link to v2: https://lore.kernel.org/r/20231105-gemini-largeframe-fix-v2-0-cd3a5aa6c496@linaro.org

Changes in v2:
- Don't check for oversized MTU request: the framework makes sure it doesn't
  happen.
- Drop unrelated BIT() macro cleanups (I might send these later for net-next)
- Use a special error code if the skbuff is too big and fail gracefully
  is this happens.
- Do proper checksum of the frame using a software fallback when the frame
  is too long for hardware checksumming.
- Link to v1: https://lore.kernel.org/r/20231104-gemini-largeframe-fix-v1-0-9c5513f22f33@linaro.org

---
Linus Walleij (4):
      net: ethernet: cortina: Fix MTU max setting
      net: ethernet: cortina: Fix max RX frame define
      net: ethernet: cortina: Handle large frames
      net: ethernet: cortina: Checksum only TCP and UDP

 drivers/net/ethernet/cortina/gemini.c | 66 +++++++++++++++++++++++------------
 drivers/net/ethernet/cortina/gemini.h |  4 +--
 2 files changed, 45 insertions(+), 25 deletions(-)
---
base-commit: e85fd73c7d9630d392f451fcf69a457c8e3f21dd
change-id: 20231104-gemini-largeframe-fix-c143d2c781b5

Best regards,
-- 
Linus Walleij <linus.walleij@linaro.org>


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

end of thread, other threads:[~2023-11-08 15:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-07  9:54 [PATCH net v3 0/4] Fix large frames in the Gemini ethernet driver Linus Walleij
2023-11-07  9:54 ` [PATCH net v3 1/4] net: ethernet: cortina: Fix MTU max setting Linus Walleij
2023-11-08 14:26   ` Vladimir Oltean
2023-11-08 14:37     ` Linus Walleij
2023-11-08 15:29       ` Vladimir Oltean
2023-11-07  9:54 ` [PATCH net v3 2/4] net: ethernet: cortina: Fix max RX frame define Linus Walleij
2023-11-07  9:54 ` [PATCH net v3 3/4] net: ethernet: cortina: Handle large frames Linus Walleij
2023-11-08 15:27   ` Vladimir Oltean
2023-11-07  9:54 ` [PATCH net v3 4/4] net: ethernet: cortina: Checksum only TCP and UDP Linus Walleij
2023-11-08 15:19   ` Vladimir Oltean

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 NNTP newsgroup(s).