From: Anton Danilov <littlesmilingcloud@gmail.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: netdev@vger.kernel.org, Willem de Bruijn <willemb@google.com>,
"David S . Miller" <davem@davemloft.net>,
David Ahern <dsahern@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Kuniyuki Iwashima <kuniyu@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v6 1/2] udp: fix encapsulation packet resubmit in multicast deliver
Date: Thu, 9 Jul 2026 23:11:10 +0300 [thread overview]
Message-ID: <alAAXv60KUZ9KYx1@dau-home-pc> (raw)
In-Reply-To: <willemdebruijn.kernel.2a3e532d3c28f@gmail.com>
On Wed, Jul 08, 2026 at 09:24:10PM -0400, Willem de Bruijn wrote:
> This helps the case of one encap_rcv socket in the multicast receiver
> group, so is a useful fix on its own.
>
> But is Sashiko correct that this would still leave the same issue for
> other sockets in the group? If so, something to address in this series
> or leave for later?
>
> Might be worthwhile to extend the test to capture that case too.
The clone loop is not reachable for encapsulation sockets, so there is
no remaining gap.
FOU/GUE tunnel sockets are created via udp_sock_create() /
setup_udp_tunnel_sock() and do not set SO_REUSEADDR or SO_REUSEPORT.
Without either, a UDP socket cannot share its port, so an encap socket
is always the only socket bound to its port. In
__udp[46]_lib_mcast_deliver() it is therefore always delivered as
'first', and the clone loop -- which handles the second and subsequent
sockets in the group -- never runs for it. The positive (resubmit)
return from udp_queue_rcv_skb() only happens for encap sockets; plain
UDP sockets return 0 or a negative value there. So the resubmit case
in the clone loop cannot occur.
For the same reason a selftest cannot exercise it: a second socket
cannot bind to the FOU port.
If useful, I can add a brief comment above the clone loop documenting
why no resubmit is needed there.
next prev parent reply other threads:[~2026-07-09 20:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 0:35 [PATCH net-next v6 0/2] udp: fix FOU/GUE over multicast Anton Danilov
2026-07-08 0:35 ` [PATCH net-next v6 1/2] udp: fix encapsulation packet resubmit in multicast deliver Anton Danilov
2026-07-09 1:24 ` Willem de Bruijn
2026-07-09 20:11 ` Anton Danilov [this message]
2026-07-09 21:18 ` Willem de Bruijn
2026-07-08 0:35 ` [PATCH net-next v6 2/2] selftests: net: add FOU multicast encapsulation resubmit test Anton Danilov
2026-07-09 1:22 ` Willem de Bruijn
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=alAAXv60KUZ9KYx1@dau-home-pc \
--to=littlesmilingcloud@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--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