Re: [PATCH iproute2-next 3/5] lib: add libbpf support

From
David Ahern <hidden>
Date
2020-10-25 22:12:39
Also in
bpf
Reply to
Toke Høiland-Jørgensen, 2020-10-25
On 10/25/20 9:13 AM, Toke Høiland-Jørgensen wrote:
David Ahern [off-list ref] writes:
quoted
On 10/22/20 9:38 PM, Hangbin Liu wrote:
quoted
Note: ip/ipvrf.c is not convert to use libbpf as it only encodes a few
instructions and load directly.
for completeness, libbpf should be able to load a program from a buffer
as well.
It can, but the particular use in ipvrf is just loading half a dozen
instructions defined inline in C - there's no object files, BTF or
anything. So why bother with going through libbpf in this case? The
actual attachment is using the existing code anyway...
actually, it already does: bpf_load_program

I recalled figuring out how to do it, just did not remember if it was
local changes to libbpf. Does not look like any changes were needed:

https://github.com/dsahern/bpf-progs/blob/master/src/cgroup_sock.c
Thread (167 messages) 167 messages, 15 authors, last reply 2020-12-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help