[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250814114030.7683-1-richardbgobert@gmail.com>
Date: Thu, 14 Aug 2025 13:40:25 +0200
From: Richard Gobert <richardbgobert@...il.com>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
horms@...nel.org,
corbet@....net,
shenjian15@...wei.com,
salil.mehta@...wei.com,
shaojijie@...wei.com,
andrew+netdev@...n.ch,
saeedm@...dia.com,
tariqt@...dia.com,
mbloch@...dia.com,
leon@...nel.org,
ecree.xilinx@...il.com,
dsahern@...nel.org,
ncardwell@...gle.com,
kuniyu@...gle.com,
shuah@...nel.org,
sdf@...ichev.me,
ahmed.zaki@...el.com,
aleksander.lobakin@...el.com,
linux-kernel@...r.kernel.org,
linux-net-drivers@....com,
Richard Gobert <richardbgobert@...il.com>
Subject: [PATCH net-next 0/5] net: gso: restore outer ip ids correctly
GRO currently ignores outer IPv4 header IDs for encapsulated packets
that have their don't-fragment flag set. GSO, however, always assumes
that outer IP IDs are incrementing. This results in GSO mangling the
outer IDs when they aren't incrementing. For example, GSO mangles the
outer IDs of IPv6 packets that were converted to IPv4, which must
have an ID of 0 according to RFC 6145, sect. 5.1.
GRO+GSO is supposed to be entirely transparent by default. GSO already
correctly restores inner IDs and IDs of non-encapsulated packets. The
tx-tcp-mangleid-segmentation feature can be enabled to allow the
mangling of such IDs so that TSO can be used.
This series fixes outer ID restoration for encapsulated packets when
tx-tcp-mangleid-segmentation is disabled. It also allows GRO to merge
packets with fixed IDs that don't have their don't-fragment flag set.
Richard Gobert (5):
net: gro: remove is_ipv6 from napi_gro_cb
net: gro: only merge packets with incrementing or fixed outer ids
net: gso: restore ids of outer ip headers correctly
net: gro: remove unnecessary df checks
selftests/net: test ipip packets in gro.sh
.../networking/segmentation-offloads.rst | 4 +-
.../net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +-
.../net/ethernet/mellanox/mlx5/core/en_rx.c | 8 +++-
drivers/net/ethernet/sfc/ef100_tx.c | 14 +++---
include/linux/netdevice.h | 9 +++-
include/linux/skbuff.h | 6 ++-
include/net/gro.h | 32 +++++--------
net/core/dev.c | 7 ++-
net/ipv4/af_inet.c | 10 ++--
net/ipv4/fou_core.c | 8 ++--
net/ipv4/tcp_offload.c | 2 +-
net/ipv4/udp_offload.c | 2 -
net/ipv6/udp_offload.c | 2 -
tools/testing/selftests/net/gro.c | 47 ++++++++++++++-----
tools/testing/selftests/net/gro.sh | 5 +-
15 files changed, 89 insertions(+), 69 deletions(-)
--
2.36.1
Powered by blists - more mailing lists