libbpf: add function to setup XDP
authorEric Leblond <eric@regit.org>
Tue, 30 Jan 2018 20:55:01 +0000 (21:55 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 3 Feb 2018 01:53:48 +0000 (17:53 -0800)
commit949abbe88436c000cc63fce2bdfeb48b7d06a7df
tree0c92cc22fd100260e510f79695e64dbb554eeb8d
parentdc2b9f19e3bdaa87a7c3d123b8bba8a42d96d942
libbpf: add function to setup XDP

Most of the code is taken from set_link_xdp_fd() in bpf_load.c and
slightly modified to be library compliant.

Signed-off-by: Eric Leblond <eric@regit.org>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/bpf.c
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h