]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
udp: gso: Use single MSS length in UDP header for GSO_PARTIAL
authorGal Pressman <gal@nvidia.com>
Sun, 25 Jan 2026 12:16:47 +0000 (14:16 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 28 Jan 2026 01:30:51 +0000 (17:30 -0800)
commitb10b446ce7ad912559e3af523aaa9f5f34a18c2e
treea96c1c37688552f04fbc4db931a8b8f2c453d43c
parentd64f761dbfda3f4eb7e5c14c1336677de20d5d6f
udp: gso: Use single MSS length in UDP header for GSO_PARTIAL

In GSO_PARTIAL segmentation, set the UDP length field to the single
segment size (gso_size + UDP header) instead of the large MSS size.
This provides hardware with a template length value for final
segmentation, similar to how tunnel GSO_PARTIAL handles outer headers
in UDP tunnels.

This will remove the need to manually adjust the UDP header length in
the drivers, as can be seen in subsequent patches.

This was suggested by Alex in 2018:
https://lore.kernel.org/netdev/CAKgT0UcdnUWgr3KQ=RnLKigokkiUuYefmL-ePpDvJOBNpKScFA@mail.gmail.com/

Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20260125121649.778086-2-gal@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/udp_offload.c