On Thu, 2024-02-08 at 20:06 -0800, Alexei Starovoitov wrote: > From: Alexei Starovoitov <ast@xxxxxxxxxx> > > __uint() macro that is used to specify map attributes like: > __uint(type, BPF_MAP_TYPE_ARRAY); > __uint(map_flags, BPF_F_MMAPABLE); > is limited to 32-bit, since BTF_KIND_ARRAY has u32 "number of elements" field. > > Introduce __ulong() macro that allows specifying values bigger than 32-bit. > In map definition "map_extra" is the only u64 field. > > Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx> > --- Acked-by: Eduard Zingerman <eddyz87@xxxxxxxxx> Another option would be something like: #define __ulong(name, val) int (*name)[val >> 32][(val << 32) >> 32] thus avoiding generation of __unique_value_123 literals, but these literals probably should not be an issue.