tools: bpftool: add net detach command to detach XDP on interface
authorDaniel T. Lee <danieltimlee@gmail.com>
Tue, 13 Aug 2019 02:46:19 +0000 (11:46 +0900)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 16 Aug 2019 00:00:33 +0000 (17:00 -0700)
commit37c7f863ba92f0a7aa8bdfde9dfb6c392393fb83
tree7ff7a7b0c4b9b413c50795a66a30853106a7e48e
parent04949ccc273e14d28aa004ac6954af0898ca3d12
tools: bpftool: add net detach command to detach XDP on interface

By this commit, using `bpftool net detach`, the attached XDP prog can
be detached. Detaching the BPF prog will be done through libbpf
'bpf_set_link_xdp_fd' with the progfd set to -1.

Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/bpf/bpftool/net.c