]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Merge branch 'udp-gso-fix-__udp_gso_segment-after-gso_partial-udp-length-change'
authorJakub Kicinski <kuba@kernel.org>
Wed, 20 May 2026 22:04:17 +0000 (15:04 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 20 May 2026 22:04:17 +0000 (15:04 -0700)
Gal Pressman says:

====================
udp: gso: Fix __udp_gso_segment() after GSO_PARTIAL UDP length change

This series fixes two issues introduced by commit b10b446ce7ad ("udp:
gso: Use single MSS length in UDP header for GSO_PARTIAL"), which
switched __udp_gso_segment() to write the single MSS length into the UDP
header for GSO_PARTIAL skbs.

Patch 1 (from Alice) fixes the UDP checksum adjustment in
__udp_gso_segment().
The patch adjusts the checksum by the correct delta, and since msslen
and newlen become equivalent before the loop, drops one of the two
variables to simplify the code.

Patch 2 handles the case where the last segment of a GSO_PARTIAL skb is
itself a GSO skb. This happens when the original packet size is an exact
multiple of MSS, so the post-loop segment is not a remainder skb but a
full GSO chunk and must also carry the single MSS length in its UDP
header.
====================

Link: https://patch.msgid.link/20260518062250.3019914-1-gal@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Trivial merge