Skip to content

ipv6: avoid atomic fragment on GSO output

Yan Zhai lkml netdev 5 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 1 replyApplied 3/3
  2. v43 patches 3 repliesSuperseded
  3. v33 patches 6 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v21 patch8 repliesSuperseded
v11 patch5 repliesSuperseded

change log from the cover letter

V4 -> V5: minor fixup
V3 -> V4: cleaned up all RTAX_FEATURE_ALLFRAG code, rather than just drop the check at IPv6 output.
V2 -> V3: split the changes to separate commits as Willem de Bruijn suggested V1 is incorrect and omitted

Patches in v5 All 3 applied

#Subject and filesSizeRepliesApplied
1/3ipv6: drop feature RTAX_FEATURE_ALLFRAGinclude/net/dst.h include/net/inet_connection_sock.h include/net/inet_sock.h +6 more+5 -450 repliesApplied
2/3ipv6: refactor ip6_finish_output for GSO handlingnet/ipv6/ip6_output.c+15 -71 replyApplied
3/3ipv6: avoid atomic fragment on GSO packetsnet/ipv6/ip6_output.c+7 -10 repliesApplied

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchFlorian WestphalEric DumazetWillem de Bruijn
1/3R-b R-b
2/3R-b R-b
3/3

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 v5 thread

Cover letter [PATCH v5 net-next 0/3] ipv6: avoid atomic fragment on GSO output

When the ipv6 stack output a GSO packet, if its gso_size is larger than dst MTU, then all segments would be fragmented. However, it is possible for a GSO packet to have a trailing segment with smaller actual size than both gso_size as well as the MTU, which leads to an "atomic fragment". Atomic fragments are considered harmful in RFC-8021. An Existing report from APNIC also shows that atomic fragments are more likely to be dropped even it is equivalent to a no-op [1].

The series contains following changes:
* drop feature RTAX_FEATURE_ALLFRAG, which has been broken. This helps simplifying other changes in this set.
* refactor __ip6_finish_output code to separate GSO and non-GSO packet processing, mirroring IPv4 side logic.
* avoid generating atomic fragment on GSO packets.

change log:
V4 -> V5: minor fixup
V3 -> V4: cleaned up all RTAX_FEATURE_ALLFRAG code, rather than just drop the check at IPv6 output.
V2 -> V3: split the changes to separate commits as Willem de Bruijn suggested V1 is incorrect and omitted

V4: https://lore.kernel.org/netdev/[email protected]/
V3: https://lore.kernel.org/netdev/[email protected]/
V2: https://lore.kernel.org/netdev/ZS1%[email protected]/

Yan Zhai (3):
ipv6: drop feature RTAX_FEATURE_ALLFRAG
ipv6: refactor ip6_finish_output for GSO handling
ipv6: avoid atomic fragment on GSO packets

 include/net/dst.h                  |  7 -----
 include/net/inet_connection_sock.h |  1 -
 include/net/inet_sock.h            |  1 -
 include/uapi/linux/rtnetlink.h     |  2 +-
 net/ipv4/tcp_output.c              | 20 +------------
 net/ipv6/ip6_output.c              | 45 ++++++++++++++++--------------
 net/ipv6/tcp_ipv6.c                |  1 -
 net/ipv6/xfrm6_output.c            |  2 +-
 net/mptcp/subflow.c                |  1 -
 9 files changed, 27 insertions(+), 53 deletions(-)
Signature · 1 line
2.30.2