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)
commitbd5ca3ef93cd8fb7e913f15eeb78e67a0d802274
tree20b66080e37c4e8fb4686963675ef38f6ef9c10d
parent50a3e678b58ae9535f9e536f2889649b624943c3
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