Re: add prog id to prog map

Иван Иванов

I loaded tail call prog with map via ip util, i do not know, if it pin map. But i can see it in list of maps via bpftool map with id

0:31, 21 февраля 2019 г., Jakub Kicinski <jakub.kicinski@...>:

On Wed, 20 Feb 2019 08:45:21 -0800, Иван Иванов wrote:

 I created prog_map in my kern.o and call bpf_tail_call to it. Loaded with ip link set... Loaded another prog with bpftool. So tried to update map with bpftool woth id of my second progbut it does not work. Can i use tail calls only like in sockx3, where all progs are in the same file? If not, can you give some examples?
 And can i use tail_calls not with sock_buff but with xdp_md context?

Do you pin the tail call map? If tail call map is not kept open or
pinned it will get flushed by the kernel (latest bpftool will print a
warning about it). sockex3 keeps the fd open, that's why it works.
When using bpftool you probably want to pin the map in bpffs.

Отправлено из мобильного приложения Яндекс.Почты

Join to automatically receive all group messages.