On 1/28/19 11:16 AM, Maciej Fijalkowski wrote: > From: Maciej Fijalkowski <maciej.fijalkow...@intel.com> > > XDP samples are mostly cooperating with eBPF maps through their file > descriptors. In case of a eBPF program that contains multiple maps it > might be tiresome to iterate through them and call bpf_map__fd for each > one. Add a helper mostly based on bpf_object__find_map_by_name, but > instead of returning the struct bpf_map pointer, return map fd. > > Suggested-by: Jakub Kicinski <jakub.kicin...@netronome.com> > Signed-off-by: Maciej Fijalkowski <maciej.fijalkow...@intel.com> > Reviewed-by: Jakub Kicinski <jakub.kicin...@netronome.com> > ---
I've been carrying something similar around for awhile as well. Acked-by: John Fastabend <john.fastab...@gmail.com>