From: Michal Luczaj <mhal@rbox.co>
To: Kuniyuki Iwashima <kuniyu@google.com>
Cc: Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Willem de Bruijn <willemb@google.com>,
John Fastabend <john.fastabend@gmail.com>,
Jakub Sitnicki <jakub@cloudflare.com>,
Jiayuan Chen <jiayuan.chen@linux.dev>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
Cong Wang <cong.wang@bytedance.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
Jiri Olsa <jolsa@kernel.org>,
Emil Tsalapatis <emil@etsalapatis.com>,
Shuah Khan <shuah@kernel.org>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH bpf v2 3/4] selftests/bpf: Adapt sockmap update error handling
Date: Sun, 28 Jun 2026 23:59:46 +0200 [thread overview]
Message-ID: <06bb709d-54e2-4515-8ea6-33163ba8d510@rbox.co> (raw)
In-Reply-To: <CAAVpQUDULzZh58oKkRaYqgM9bRToGb7wHrzT+cZNpRmAtM12Ow@mail.gmail.com>
On 6/26/26 22:58, Kuniyuki Iwashima wrote:
> On Fri, Jun 26, 2026 at 1:37 PM Michal Luczaj <mhal@rbox.co> wrote:
>>
>> Update sockmap_listen to accommodate the recent change in sockmap that
>> rejects unbound UDP sockets.
>>
>> TCP: Reject unbound and bound (unless established or listening).
>> UDP: Accept only bound sockets.
>>
>> Signed-off-by: Michal Luczaj <mhal@rbox.co>
>> ---
>> tools/testing/selftests/bpf/prog_tests/sockmap_listen.c | 17 +++++++++--------
>> 1 file changed, 9 insertions(+), 8 deletions(-)
>>
>> diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c
>> index cc0c68bab907..6ee1bc6b3b23 100644
>> --- a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c
>> +++ b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c
>> @@ -63,11 +63,8 @@ static void test_insert_opened(struct test_sockmap_listen *skel __always_unused,
>> errno = 0;
>> value = s;
>> err = bpf_map_update_elem(mapfd, &key, &value, BPF_NOEXIST);
>> - if (sotype == SOCK_STREAM) {
>> - if (!err || errno != EOPNOTSUPP)
>> - FAIL_ERRNO("map_update: expected EOPNOTSUPP");
>> - } else if (err)
>> - FAIL_ERRNO("map_update: expected success");
>
> Initially I thought AF_UNIX still exercised this path but it was removed
> in f3de1cf621f7. The leftover in family_str() was a bit confusing, so please
> follow up on bpf-next.
Sure, will do.
thanks,
Michal
next prev parent reply other threads:[~2026-06-28 21:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 20:36 [PATCH bpf v2 0/4] bpf, sockmap: Fix sockmap leaking UDP socks Michal Luczaj
2026-06-26 20:36 ` [PATCH bpf v2 1/4] bpf, sockmap: Reject unhashed UDP sockets on sockmap update Michal Luczaj
2026-06-26 20:45 ` Kuniyuki Iwashima
2026-06-26 20:36 ` [PATCH bpf v2 2/4] selftests/bpf: Ensure UDP sockets are bound Michal Luczaj
2026-06-26 20:47 ` Kuniyuki Iwashima
2026-06-28 21:58 ` Michal Luczaj
2026-06-26 20:36 ` [PATCH bpf v2 3/4] selftests/bpf: Adapt sockmap update error handling Michal Luczaj
2026-06-26 20:58 ` Kuniyuki Iwashima
2026-06-28 21:59 ` Michal Luczaj [this message]
2026-06-26 21:14 ` bot+bpf-ci
2026-06-26 20:36 ` [PATCH bpf v2 4/4] selftests/bpf: Fail unbound UDP on sockmap update Michal Luczaj
2026-06-26 21:03 ` Kuniyuki Iwashima
2026-06-27 17:34 ` [PATCH bpf v2 0/4] bpf, sockmap: Fix sockmap leaking UDP socks sun jian
2026-06-28 22:00 ` Michal Luczaj
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=06bb709d-54e2-4515-8ea6-33163ba8d510@rbox.co \
--to=mhal@rbox.co \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cong.wang@bytedance.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=eddyz87@gmail.com \
--cc=edumazet@google.com \
--cc=emil@etsalapatis.com \
--cc=horms@kernel.org \
--cc=jakub@cloudflare.com \
--cc=jiayuan.chen@linux.dev \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=willemb@google.com \
--cc=yonghong.song@linux.dev \
/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