Netdev List
 help / color / mirror / Atom feed
From: Michal Luczaj <mhal@rbox.co>
To: bot+bpf-ci@kernel.org, ast@kernel.org, daniel@iogearbox.net,
	andrii@kernel.org, eddyz87@gmail.com, memxor@gmail.com,
	martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev,
	jolsa@kernel.org, emil@etsalapatis.com, shuah@kernel.org,
	john.fastabend@gmail.com, jakub@cloudflare.com,
	jiayuan.chen@linux.dev, edumazet@google.com, kuniyu@google.com,
	pabeni@redhat.com, willemb@google.com, davem@davemloft.net,
	kuba@kernel.org, horms@kernel.org, cong.wang@bytedance.com
Cc: bpf@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	martin.lau@kernel.org, clm@meta.com, ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf v3 3/4] selftests/bpf: Adapt sockmap update error handling
Date: Thu, 2 Jul 2026 09:30:19 +0200	[thread overview]
Message-ID: <352c268e-508a-4155-b597-b0f172c0a1cf@rbox.co> (raw)
In-Reply-To: <03d8ce102b71c68c30e98be36feaebe539055195c2323ec3b3fd84f157487afd@mail.kernel.org>

On 7/2/26 02:00, bot+bpf-ci@kernel.org wrote:
>> @@ -93,8 +90,12 @@ static void test_insert_bound(struct test_sockmap_listen *skel __always_unused,
>>  	errno = 0;
>>  	value = s;
>>  	err = bpf_map_update_elem(mapfd, &key, &value, BPF_NOEXIST);
>> -	if (!err || errno != EOPNOTSUPP)
>> -		FAIL_ERRNO("map_update: expected EOPNOTSUPP");
>> +	if (sotype == SOCK_STREAM) {
>> +		ASSERT_ERR(err, "map_update");
>> +		ASSERT_EQ(errno, EOPNOTSUPP, "errno");
>> +	} else if (err) {
>> +		ASSERT_OK(err, "map_update");
>> +	}
> 
> This isn't a bug, but could the UDP branch just be `else ASSERT_OK(err,
> "map_update");` — the `if (err)` guard looks redundant since ASSERT_OK is
> a no-op on success?

Ugh, sorry. If there are no other comments for this series, I'd happy to
fix it later in bpf-next.

  reply	other threads:[~2026-07-02  7:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 23:28 [PATCH bpf v3 0/4] bpf, sockmap: Fix sockmap leaking UDP socks Michal Luczaj
2026-07-01 23:28 ` [PATCH bpf v3 1/4] selftests/bpf: Ensure UDP sockets are bound Michal Luczaj
2026-07-02 10:35   ` Jakub Sitnicki
2026-07-01 23:28 ` [PATCH bpf v3 2/4] bpf, sockmap: Reject unhashed UDP sockets on sockmap update Michal Luczaj
2026-07-01 23:28 ` [PATCH bpf v3 3/4] selftests/bpf: Adapt sockmap update error handling Michal Luczaj
2026-07-02  0:00   ` bot+bpf-ci
2026-07-02  7:30     ` Michal Luczaj [this message]
2026-07-02 10:52   ` Jakub Sitnicki
2026-07-01 23:28 ` [PATCH bpf v3 4/4] selftests/bpf: Fail unbound UDP on sockmap update Michal Luczaj
2026-07-02 11:01   ` Jakub Sitnicki

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=352c268e-508a-4155-b597-b0f172c0a1cf@rbox.co \
    --to=mhal@rbox.co \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bot+bpf-ci@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=clm@meta.com \
    --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=ihor.solodrai@linux.dev \
    --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@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