On Wed, Dec 6, 2023 at 10:19 AM Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> wrote: > > On Thu, Nov 30, 2023 at 10:57 AM Andrii Nakryiko <andrii@xxxxxxxxxx> wrote: > > * > > @@ -901,6 +931,8 @@ enum bpf_cmd { > > BPF_ITER_CREATE, > > BPF_LINK_DETACH, > > BPF_PROG_BIND_MAP, > > + BPF_TOKEN_CREATE, > > + __MAX_BPF_CMD, > > }; > > Not an issue with this commit. I just noticed that > commit f2e10bff16a0 ("bpf: Add support for BPF_OBJ_GET_INFO_BY_FD for bpf_link") > added MAX_BPF_LINK_TYPE to enum bpf_link_type. > While this commit is correctly adding __MAX_BPF_CMD that > is consistent with old __MAX_BPF_ATTACH_TYPE (added in 2016) > and __MAX_BPF_REG (added in 2014). > I think it would be good to follow up with adding two underscores > to MAX_BPF_LINK_TYPE just to keep things consistent in bpf.h. I'll send a small patch adjusting this