From: Alice Mikityanska <alice.kernel@fastmail.im>
To: Daniel Borkmann <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Xin Long <lucien.xin@gmail.com>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
Willem de Bruijn <willemb@google.com>,
David Ahern <dsahern@kernel.org>,
Nikolay Aleksandrov <razor@blackwall.org>
Cc: Shuah Khan <shuah@kernel.org>,
Stanislav Fomichev <stfomichev@gmail.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Simon Horman <horms@kernel.org>, Florian Westphal <fw@strlen.de>,
netdev@vger.kernel.org, Alice Mikityanska <alice@isovalent.com>,
Davide Caratti <dcaratti@redhat.com>
Subject: [PATCH net-next v4 01/12] net/sched: act_csum: don't mangle UDP tunnel GSO packets
Date: Tue, 12 May 2026 18:56:37 +0200 [thread overview]
Message-ID: <20260512165648.386518-2-alice.kernel@fastmail.im> (raw)
In-Reply-To: <20260512165648.386518-1-alice.kernel@fastmail.im>
From: Alice Mikityanska <alice@isovalent.com>
Similar to commit add641e7dee3 ("sched: act_csum: don't mangle TCP and
UDP GSO packets"), UDP tunnel GSO packets going through act_csum
shouldn't have their checksum calculated at this point, because it will
be done after segmentation. Setting the checksum in act_csum modifies
skb->ip_summed and prevents inner IP csum offload from kicking in,
resulting in a packet with a bad checksum.
Add UDP tunnel GSO packets to the exceptions, and also add UDP GSO
(SKB_GSO_UDP_L4), as the same logic as in the commit mentioned above
applies to UDP GSO too.
Signed-off-by: Alice Mikityanska <alice@isovalent.com>
Reviewed-by: Davide Caratti <dcaratti@redhat.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
---
net/sched/act_csum.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c
index a9e4635d899e..078d3a27130b 100644
--- a/net/sched/act_csum.c
+++ b/net/sched/act_csum.c
@@ -259,7 +259,9 @@ static int tcf_csum_ipv4_udp(struct sk_buff *skb, unsigned int ihl,
const struct iphdr *iph;
u16 ul;
- if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & SKB_GSO_UDP)
+ if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type &
+ (SKB_GSO_UDP | SKB_GSO_UDP_L4 |
+ SKB_GSO_UDP_TUNNEL | SKB_GSO_UDP_TUNNEL_CSUM))
return 1;
/*
@@ -315,7 +317,9 @@ static int tcf_csum_ipv6_udp(struct sk_buff *skb, unsigned int ihl,
const struct ipv6hdr *ip6h;
u16 ul;
- if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & SKB_GSO_UDP)
+ if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type &
+ (SKB_GSO_UDP | SKB_GSO_UDP_L4 |
+ SKB_GSO_UDP_TUNNEL | SKB_GSO_UDP_TUNNEL_CSUM))
return 1;
/*
--
2.54.0
next prev parent reply other threads:[~2026-05-12 16:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 16:56 [PATCH net-next v4 00/12] BIG TCP for UDP tunnels Alice Mikityanska
2026-05-12 16:56 ` Alice Mikityanska [this message]
2026-05-12 16:56 ` [PATCH net-next v4 02/12] udp: gso: Simplify handling length in GSO_PARTIAL Alice Mikityanska
2026-05-13 7:53 ` Gal Pressman
2026-05-13 9:23 ` Alice Mikityanska
2026-05-13 9:40 ` Gal Pressman
2026-05-12 16:56 ` [PATCH net-next v4 03/12] geneve: Fix off-by-one comparing with GRO_LEGACY_MAX_SIZE Alice Mikityanska
2026-05-12 16:56 ` [PATCH net-next v4 04/12] net: Use helpers to get/set UDP len tree-wide Alice Mikityanska
2026-05-12 16:56 ` [PATCH net-next v4 05/12] net: Enable BIG TCP with partial GSO Alice Mikityanska
2026-05-12 16:56 ` [PATCH net-next v4 06/12] udp: Support gro_ipv4_max_size > 65536 Alice Mikityanska
2026-05-12 16:56 ` [PATCH net-next v4 07/12] udp: Support BIG TCP GSO packets where they can occur Alice Mikityanska
2026-05-12 16:56 ` [PATCH net-next v4 08/12] udp: Validate UDP length in udp_gro_receive Alice Mikityanska
2026-05-12 16:56 ` [PATCH net-next v4 09/12] udp: Set length in UDP header to 0 for big GSO packets Alice Mikityanska
2026-05-12 16:56 ` [PATCH net-next v4 10/12] vxlan: Enable BIG TCP packets Alice Mikityanska
2026-05-12 16:56 ` [PATCH net-next v4 11/12] geneve: " Alice Mikityanska
2026-05-12 16:56 ` [PATCH net-next v4 12/12] selftests: net: Add a test for BIG TCP in UDP tunnels Alice Mikityanska
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260512165648.386518-2-alice.kernel@fastmail.im \
--to=alice.kernel@fastmail.im \
--cc=alice@isovalent.com \
--cc=andrew+netdev@lunn.ch \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dcaratti@redhat.com \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
--cc=shuah@kernel.org \
--cc=stfomichev@gmail.com \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.