diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2020-07-14 15:56:40 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-07-16 17:00:32 +0200 |
commit | 4be556cf5aef416904743f2cee689351f91445b6 (patch) | |
tree | 2bca25ef837d3f324c5bb3a113ccf8748bdf656a /tools | |
parent | 28b1520ebf81ced970141640d90279ac7b9f1f9a (diff) | |
download | linux-4be556cf5aef416904743f2cee689351f91445b6.tar.bz2 |
libbpf: Add SEC name for xdp programs attached to CPUMAP
As for DEVMAP, support SEC("xdp_cpumap/") as a short cut for loading
the program with type BPF_PROG_TYPE_XDP and expected attach type
BPF_XDP_CPUMAP.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/33174c41993a6d860d9c7c1f280a2477ee39ed11.1594734381.git.lorenzo@kernel.org
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/bpf/libbpf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 4489f95f1d1a..f55fd8a5c008 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -6912,6 +6912,8 @@ static const struct bpf_sec_def section_defs[] = { .attach_fn = attach_iter), BPF_EAPROG_SEC("xdp_devmap/", BPF_PROG_TYPE_XDP, BPF_XDP_DEVMAP), + BPF_EAPROG_SEC("xdp_cpumap/", BPF_PROG_TYPE_XDP, + BPF_XDP_CPUMAP), BPF_PROG_SEC("xdp", BPF_PROG_TYPE_XDP), BPF_PROG_SEC("perf_event", BPF_PROG_TYPE_PERF_EVENT), BPF_PROG_SEC("lwt_in", BPF_PROG_TYPE_LWT_IN), |