On Wed, Aug 19, 2020 at 3:40 PM Ian <icampbe14@...> wrote:
Libbpf supports declarative pinning of maps, that's how you easily get
"map re-use" from BPF side. See  for example.
These examples are exactly what I am looking for but it appears that they either require BTF activated in the kernel or require a 5.8 kernel. Unfortunately I am targeting the new Ubuntu 20.04 system with "out-of-the-box" configurations. So that means I am saddled with kernel v5.4 and BTF not active. Why does libbpfs declarative map pinning require BTF? Does the metadata within BTF support the ability to correctly find and open the map?
It doesn't require kernel BTF for that. Only BPF program's BTF
generated by Clang. So you'll need something like Clang 10 (or maybe
Clang 9 will do as well), but no requirements for kernel BTF.