Re: [PATCH 2/2] libbpf: Add ring__consume_max / ring_buffer__consume_max

From: Andrea Righi
Date: Tue Apr 02 2024 - 16:41:24 EST


On Tue, Apr 02, 2024 at 11:04:39AM -0700, Andrii Nakryiko wrote:
..
> > + * negative number if any of the callbacks return an error.
> > + */
> > +LIBBPF_API int ring__consume_max(struct ring *r, size_t max_items);
>
> I'm bikeshedding here, of course, but I prefer `ring__consume_n` and
> max_items -> n.

I actually like "_n" more than "_max" (same with max_items -> n).

I'll change this (with all the other suggestions) and will send a new
version.

Thanks for the review!
-Andrea