summaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpf_exp.l
diff options
context:
space:
mode:
authorPaul Chaignon <paul.chaignon@orange.com>2019-12-13 20:10:04 +0100
committerAlexei Starovoitov <ast@kernel.org>2019-12-15 18:03:18 +0100
commitec2025095cf6acda3233a4301809596938b47da5 (patch)
tree7354b6b1655f0873b3eb9ee80d47cab4127adce0 /tools/bpf/bpf_exp.l
parentselftests/bpf: Test wire_len/gso_segs in BPF_PROG_TEST_RUN (diff)
downloadlinux-ec2025095cf6acda3233a4301809596938b47da5.tar.xz
linux-ec2025095cf6acda3233a4301809596938b47da5.zip
bpftool: Match several programs with same tag
When several BPF programs have the same tag, bpftool matches only the first (in ID order). This patch changes that behavior such that dump and show commands return all matched programs. Commands that require a single program (e.g., pin and attach) will error out if given a tag that matches several. bpftool prog dump will also error out if file or visual are given and several programs have the given tag. In the case of the dump command, a program header is added before each dump only if the tag matches several programs; this patch doesn't change the output if a single program matches. The output when several programs match thus looks as follows. $ ./bpftool prog dump xlated tag 6deef7357e7b4530 3: cgroup_skb tag 6deef7357e7b4530 gpl 0: (bf) r6 = r1 [...] 7: (95) exit 4: cgroup_skb tag 6deef7357e7b4530 gpl 0: (bf) r6 = r1 [...] 7: (95) exit Signed-off-by: Paul Chaignon <paul.chaignon@orange.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/fb1fe943202659a69cd21dd5b907c205af1e1e22.1576263640.git.paul.chaignon@gmail.com
Diffstat (limited to 'tools/bpf/bpf_exp.l')
0 files changed, 0 insertions, 0 deletions