[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250410202214.7061-1-kuniyu@amazon.com>
Date: Thu, 10 Apr 2025 13:21:07 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <jordan@...fe.io>
CC: <aditi.ghag@...valent.com>, <bpf@...r.kernel.org>, <daniel@...earbox.net>,
<kuniyu@...zon.com>, <martin.lau@...ux.dev>, <netdev@...r.kernel.org>,
<willemdebruijn.kernel@...il.com>
Subject: Re: [PATCH v1 bpf-next 2/5] bpf: udp: Avoid socket skips and repeats during iteration
From: Jordan Rife <jordan@...fe.io>
Date: Wed, 9 Apr 2025 11:22:31 -0700
> @@ -3839,6 +3876,11 @@ static int bpf_iter_udp_realloc_batch(struct bpf_udp_iter_state *iter,
> return -ENOMEM;
>
> bpf_iter_udp_put_batch(iter);
> + WARN_ON_ONCE(new_batch_sz < iter->max_sk);
I'd put this before kvmalloc_array() or remove as it's obvious.
> + /* Make sure the new batch has the cookies of the sockets we haven't
> + * visited yet.
> + */
> + memcpy(new_batch, iter->batch, iter->end_sk);
The 3rd arg is missing sizeof(*iter->batch) * ?
Powered by blists - more mailing lists