[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <77e7b3b4-a6c3-442a-9fec-884382a3153f@linux.dev>
Date: Thu, 1 May 2025 12:00:39 -0700
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: Jordan Rife <jordan@...fe.io>
Cc: Aditi Ghag <aditi.ghag@...valent.com>,
Daniel Borkmann <daniel@...earbox.net>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>,
Kuniyuki Iwashima <kuniyu@...zon.com>,
Alexei Starovoitov <alexei.starovoitov@...il.com>, netdev@...r.kernel.org,
bpf@...r.kernel.org
Subject: Re: [PATCH v6 bpf-next 7/7] selftests/bpf: Add tests for bucket
resume logic in UDP socket iterators
On 4/28/25 11:00 AM, Jordan Rife wrote:
> +static void do_resume_test(struct test_case *tc)
> +{
> + static const __u16 port = 10001;
> + struct bpf_link *link = NULL;
> + struct sock_iter_batch *skel;
> + struct sock_count *counts;
> + int err, iter_fd = -1;
> + const char *addr;
> + int local_port;
> + int *fds;
> +
> + counts = calloc(tc->max_socks, sizeof(*counts));
> + if (!counts)
ASSERT_OK_PTR.
Overall lgtm. In addition to avoiding the skip/repeat, the code is also simpler
(e.g. the st_bucket_done and offset state are gone). Thanks.
> + return;
Powered by blists - more mailing lists