Gilad Reti <gilad.reti@xxxxxxxxx> writes: > 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. You can set the 'pinning' attribute in the map definition - add '__uint(pinning, LIBBPF_PIN_BY_NAME);' to the map struct. By default this will pin beneath /sys/fs/bpf, but you can customise that by setting the pin_root_path attribute in bpf_object_open_opts. -Toke