netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v3 0/3] Don't take HW USO path when packets can't be checksummed by device
@ 2024-08-07 17:55 Jakub Sitnicki
  2024-08-07 17:55 ` [PATCH net v3 1/3] net: Make USO depend on CSUM offload Jakub Sitnicki
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jakub Sitnicki @ 2024-08-07 17:55 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Willem de Bruijn, kernel-team, Jakub Sitnicki,
	syzbot+e15b7e15b8a751a91d9a

This series addresses a recent regression report from syzbot [1].

After enabling UDP_SEGMENT for egress devices which don't support checksum
offload [2], we need to tighten down the checks which let packets take the
HW USO path.

The fix consists of two parts:

1. don't let devices offer USO without checksum offload, and
2. force software USO fallback in presence of IPv6 extension headers.

[1] https://lore.kernel.org/all/000000000000e1609a061d5330ce@google.com/ 
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=10154dbded6d6a2fecaebdfda206609de0f121a9

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
---
Changes in v3:
- Make USO depend on checksum offload (Willem)
- Contain the bad offload warning fix within the USO callback (Willem)
- Link to v2: https://lore.kernel.org/r/20240801-udp-gso-egress-from-tunnel-v2-0-9a2af2f15d8d@cloudflare.com

Changes in v2:
- Contain the fix inside the GSO stack after discussing with Willem
- Rework tests after realizing the regression has nothing to do with tunnels
- Link to v1: https://lore.kernel.org/r/20240725-udp-gso-egress-from-tunnel-v1-0-5e5530ead524@cloudflare.com

---
Jakub Sitnicki (3):
      net: Make USO depend on CSUM offload
      udp: Fall back to software USO if IPv6 extension headers are present
      selftests/net: Add coverage for UDP GSO with IPv6 extension headers

 net/core/dev.c                       | 27 ++++++++++++++++++---------
 net/ipv4/udp_offload.c               |  6 ++++++
 tools/testing/selftests/net/udpgso.c | 25 ++++++++++++++++++++++++-
 3 files changed, 48 insertions(+), 10 deletions(-)


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

end of thread, other threads:[~2024-08-08  8:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-07 17:55 [PATCH net v3 0/3] Don't take HW USO path when packets can't be checksummed by device Jakub Sitnicki
2024-08-07 17:55 ` [PATCH net v3 1/3] net: Make USO depend on CSUM offload Jakub Sitnicki
2024-08-08  2:29   ` Willem de Bruijn
2024-08-08  8:28     ` Jakub Sitnicki
2024-08-07 17:55 ` [PATCH net v3 2/3] udp: Fall back to software USO if IPv6 extension headers are present Jakub Sitnicki
2024-08-08  2:29   ` Willem de Bruijn
2024-08-07 17:55 ` [PATCH net v3 3/3] selftests/net: Add coverage for UDP GSO with IPv6 extension headers Jakub Sitnicki
2024-08-08  2:43   ` Willem de Bruijn

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).