Re: [PATCH bpf-next 07/13] selftests/bpf: BPF register range bounds tester

Alexei Starovoitov
2023-11-03T19:19:41Z

On Thu, Nov 2, 2023 at 5:08 PM Andrii Nakryiko <andrii@kernel.org> wrote:
>
> +enum num_t { U64, U32, S64, S32 };
> +#define MIN_T U64
> +#define MAX_T S32

I haven't finished the review of the whole patch yet.
Quick thoughts so far.
Can you change above to:
enum num_t { U64, first_t = U64, U32, S64, S32, last_t = S32 };

1. min/max names kept confusing me while reading the diff.
I read MIN_T is a smaller (minimal) type which is 32-bit.
2. reusing enums without LOUD macro names is easier to read.

and similar with _OP macros.