Re: [PATCH bpf-next RFC v3 2/6] bpf: add BPF_MAP_DUMP command to dump more than one entry per call

2019-07-09 Thread Brian Vazquez
> Maybe you can swap map_fd and flags? > This way, you won't have hole right after map_fd? Makes sense. > > + attr->flags = 0; > Why do you want attr->flags? This is to modify anonumous struct used by > BPF_MAP_*_ELEM commands. Nice catch! This was a mistake I forgot to delete that line.

Re: [PATCH bpf-next RFC v3 2/6] bpf: add BPF_MAP_DUMP command to dump more than one entry per call

2019-07-05 Thread Y Song
On Wed, Jul 3, 2019 at 10:03 AM Brian Vazquez wrote: > > This introduces a new command to retrieve a variable number of entries > from a bpf map wrapping the existing bpf methods: > map_get_next_key and map_lookup_elem > > To start dumping the map from the beginning you must specify NULL as > the

[PATCH bpf-next RFC v3 2/6] bpf: add BPF_MAP_DUMP command to dump more than one entry per call

2019-07-03 Thread Brian Vazquez
This introduces a new command to retrieve a variable number of entries from a bpf map wrapping the existing bpf methods: map_get_next_key and map_lookup_elem To start dumping the map from the beginning you must specify NULL as the prev_key. The new API returns 0 when it successfully copied all