]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Add function to set link XDP fd while specifying old program
authorToke Høiland-Jørgensen <toke@redhat.com>
Wed, 25 Mar 2020 17:23:28 +0000 (18:23 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 28 Mar 2020 21:24:41 +0000 (14:24 -0700)
commit380cda6a634226a02eda85b0f009c8d85cfb3661
tree20b66080e37c4e8fb4686963675ef38f6ef9c10d
parentabc637d5bb3152974c30f9faef1e676dc9cbdd20
libbpf: Add function to set link XDP fd while specifying old program

This adds a new function to set the XDP fd while specifying the FD of the
program to replace, using the newly added IFLA_XDP_EXPECTED_FD netlink
parameter. The new function uses the opts struct mechanism to be extendable
in the future.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/158515700857.92963.7052131201257841700.stgit@toke.dk
tools/lib/bpf/libbpf.h
tools/lib/bpf/libbpf.map
tools/lib/bpf/netlink.c