]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: bpftool, add support for attaching programs to maps
authorJohn Fastabend <john.fastabend@gmail.com>
Mon, 15 Oct 2018 18:19:50 +0000 (11:19 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 15 Oct 2018 23:13:14 +0000 (16:13 -0700)
commite3d1a275d1515333fc356c2d6f0c831db81ab0b2
tree3db8e75d2aeddd47eddd3c03cc3d46de09b29333
parent6e8aebd5d47e428c47c9872b8d1328b0c8826c60
bpf: bpftool, add support for attaching programs to maps

Sock map/hash introduce support for attaching programs to maps. To
date I have been doing this with custom tooling but this is less than
ideal as we shift to using bpftool as the single CLI for our BPF uses.
This patch adds new sub commands 'attach' and 'detach' to the 'prog'
command to attach programs to maps and then detach them.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/bpf/bpftool/Documentation/bpftool-prog.rst
tools/bpf/bpftool/Documentation/bpftool.rst
tools/bpf/bpftool/bash-completion/bpftool
tools/bpf/bpftool/prog.c