Best way to share maps between multiple files/objects?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi folks,

I want to organize my BPF programs so that I can load them
individually. I want this so that if loading one fails (because of
lack of kernel support for BPF features), I can load a fall-back
replacement program. To do so, I've organized the BPF programs into
their own source code files and compiled them individually. Each BPF
program references what is supposed to be the same ringbuffer. Using
libbpf I open them and attempt to load each in order.

My question is, how am I supposed to share maps such as ringbuffers
between them? If I have identical map definitions in each, they have
their own file descriptors. Is the best way to call
`bpf_map__reuse_fd()` on each handle of the maps in each BPF object?

I'd also take advice on how to better achieve my overall goal of being
able to load programs individually!

Thanks so much for your help,
Grant Seltzer



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux