bpftool icon indicating copy to clipboard operation
bpftool copied to clipboard

Pass map flags in a user-friendly way

Open qmonnet opened this issue 2 years ago • 0 comments

Extract from man bpftool-map:

       bpftool map create     FILE type TYPE key KEY_SIZE value VALUE_SIZE
         entries MAX_ENTRIES name NAME [flags FLAGS] [inner_map MAP]
         [dev NAME]
       bpftool map dump       MAP
       bpftool map update     MAP [key DATA] [value VALUE] [UPDATE_FLAGS]

Instead of passing integer for FLAGS and UPDATE_FLAGS that are the sum of all relevant flags, we could support something more user-friendly as well, like a comma-separated list of flags: BPF_F_NO_PREALLOC,BPF_F_RDONLY,...

qmonnet avatar Jan 08 '23 23:01 qmonnet