From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Alice Mikityanska <alice.kernel@fastmail.im>
Cc: 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>,
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>
Subject: Re: [PATCH net-next v7 03/11] net: Use helpers to get/set UDP len tree-wide
Date: Fri, 12 Jun 2026 19:04:36 +0200 [thread overview]
Message-ID: <aiw8JPsgG1K4D3z_@zx2c4.com> (raw)
In-Reply-To: <20260611192955.604661-4-alice.kernel@fastmail.im>
On Thu, Jun 11, 2026 at 09:29:47PM +0200, Alice Mikityanska wrote:
> diff --git a/drivers/net/wireguard/receive.c b/drivers/net/wireguard/receive.c
> index eb8851113654..275fe1bc994c 100644
> --- a/drivers/net/wireguard/receive.c
> +++ b/drivers/net/wireguard/receive.c
> @@ -62,7 +62,7 @@ static int prepare_skb_header(struct sk_buff *skb, struct wg_device *wg)
> * to have UDP fields.
> */
> return -EINVAL;
> - data_len = ntohs(udp->len);
> + data_len = udp_get_len_short(udp); /* GRO not expected here. */
Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
However, I don't think that comment is necessary and you can remove it if you
wind up needing to roll a v+1. But also, I was thinking:
> +static inline unsigned int udp_get_len_short(const struct udphdr *uh)
> +{
> + return ntohs(uh->len);
> +}
> +
Do you think it'd be better to call this udp_get_len_nogro(), which would then
make its usage rules more explicitly without needing to litter comments?
next prev parent reply other threads:[~2026-06-12 17:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-11 19:29 [PATCH net-next v7 00/11] BIG TCP for UDP tunnels Alice Mikityanska
2026-06-11 19:29 ` [PATCH net-next v7 01/11] net/sched: act_csum: don't mangle UDP tunnel GSO packets Alice Mikityanska
2026-06-11 19:29 ` [PATCH net-next v7 02/11] geneve: Fix off-by-one comparing with GRO_LEGACY_MAX_SIZE Alice Mikityanska
2026-06-11 19:29 ` [PATCH net-next v7 03/11] net: Use helpers to get/set UDP len tree-wide Alice Mikityanska
2026-06-12 17:04 ` Jason A. Donenfeld [this message]
2026-06-11 19:29 ` [PATCH net-next v7 04/11] net: Enable BIG TCP with partial GSO Alice Mikityanska
2026-06-11 19:29 ` [PATCH net-next v7 05/11] udp: Support BIG TCP GSO packets where they can occur Alice Mikityanska
2026-06-11 19:29 ` [PATCH net-next v7 06/11] udp: Support gro_ipv4_max_size > 65536 Alice Mikityanska
2026-06-11 19:29 ` [PATCH net-next v7 07/11] udp: Validate UDP length in udp_gro_receive Alice Mikityanska
2026-06-11 19:29 ` [PATCH net-next v7 08/11] udp: Set length in UDP header to 0 for big GSO packets Alice Mikityanska
2026-06-11 19:29 ` [PATCH net-next v7 09/11] vxlan: Enable BIG TCP packets Alice Mikityanska
2026-06-11 19:29 ` [PATCH net-next v7 10/11] geneve: " Alice Mikityanska
2026-06-11 19:29 ` [PATCH net-next v7 11/11] 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=aiw8JPsgG1K4D3z_@zx2c4.com \
--to=jason@zx2c4.com \
--cc=alice.kernel@fastmail.im \
--cc=alice@isovalent.com \
--cc=andrew+netdev@lunn.ch \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox