Re: libbpf: pinning multiple progs from the same section

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

 



Also, is there a way to set the pin path to all maps/programs at once?
For example, bpf_object__pin_maps pins all maps at a specific path,
but as far as I was able to find there is no similar function to set
the pin path for all maps only (without pinning) so that at loading
time libbpf will try to reuse all maps. The only way to achieve a
complete reuse of all maps that I could find is to "reverse engineer"
libbpf's pin path generation algorithm (i.e. <path>/<map_name>) and
set the pin path on each map before load.

On Sun, Feb 7, 2021 at 1:35 PM Gilad Reti <gilad.reti@xxxxxxxxx> wrote:
>
> Hello there,
>
> Last year, libbpf added support for attaching multiple handlers to the
> same event by allowing defining multiple progs in the same elf
> section. However, the pin path for a bpf program is obtained via the
> __bpf_program__pin_name function, which uses an escaped version of the
> elf section name as the pin_name. Thus, trying to pin multiple bpf
> programs defined on the same section fails with "File exists" error,
> since libbpf tries to pin more than one program on a single path.
> Does adding the actual program name to the pin path makes sense?
>
> Thanks.



[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