Hi, On 10/10/2024 10:21 AM, Alexei Starovoitov wrote: > On Tue, Oct 8, 2024 at 2:02 AM Hou Tao <houtao@xxxxxxxxxxxxxxx> wrote: >> index c6cd7c7aeeee..07f7df308a01 100644 >> --- a/include/uapi/linux/bpf.h >> +++ b/include/uapi/linux/bpf.h >> @@ -1409,6 +1409,9 @@ enum { >> >> /* Do not translate kernel bpf_arena pointers to user pointers */ >> BPF_F_NO_USER_CONV = (1U << 18), >> + >> +/* Create a map with bpf_dynptr in key */ >> + BPF_F_DYNPTR_IN_KEY = (1U << 19), >> }; > If I'm reading the other patches correctly this uapi flag > is unnecessary. > BTF describes the fields and dynptr is either there or not. > Why require users to add an extra flag ? Sorry for the late reply. The reason for an extra flag is to make a bpf map which had already used bpf_dynptr in its key to work as before. I was not sure whether or not there is such case, so I added an extra flag. If the case is basically impossible, I can remove it in the next revision.