Skip to content

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

Gal Pressman netdev 1 version Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 3 repliesApplied 2/2

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2udp: gso: Fix handling checksum in __udp_gso_segmentnet/ipv4/udp_offload.c+2 -110 repliesApplied
2/2udp: Fix UDP length on last GSO_PARTIAL segmentnet/ipv4/udp_offload.c+6 -33 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchWillem de BruijnMatthew SchwartzDragos Tatulea
1/2R-b
2/2T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH net v2 0/2] 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.

Changelog -
v1->v2: Took patch #1 from Alice.

	https://lore.kernel.org/all/[email protected]/
	https://lore.kernel.org/all/[email protected]/

Alice Mikityanska (1):
udp: gso: Fix handling checksum in __udp_gso_segment

Gal Pressman (1):
udp: Fix UDP length on last GSO_PARTIAL segment

 net/ipv4/udp_offload.c | 22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)
Signature · 1 line
2.52.0