From: Jesper Dangaard Brouer <brouer@redhat.com>
To: bpf@vger.kernel.org, andriin@fb.com
Cc: Jesper Dangaard Brouer <brouer@redhat.com>,
netdev@vger.kernel.org,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Daniel Borkmann <borkmann@iogearbox.net>,
David Ahern <dsahern@gmail.com>
Subject: [PATCH bpf] libbpf: adjust SEC short cut for expected attach type BPF_XDP_DEVMAP
Date: Thu, 25 Jun 2020 16:26:58 +0200 [thread overview]
Message-ID: <159309521882.821855.6873145686353617509.stgit@firesoul> (raw)
In-Reply-To: <CAADnVQ+tiHo1y12ae4EREtBiU=AKUW7upMV4Pfa8Yc7mrAsqEg@mail.gmail.com>
Adjust the SEC("xdp_devmap/") prog type prefix to contain a
slash "/" for expected attach type BPF_XDP_DEVMAP. This is consistent
with other prog types like tracing.
Fixes: 2778797037a6 ("libbpf: Add SEC name for xdp programs attached to device map")
Suggested-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
---
tools/lib/bpf/libbpf.c | 2 +-
.../bpf/progs/test_xdp_with_devmap_helpers.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index f17151d866e6..11e4725b8b1c 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -6659,7 +6659,7 @@ static const struct bpf_sec_def section_defs[] = {
.expected_attach_type = BPF_TRACE_ITER,
.is_attach_btf = true,
.attach_fn = attach_iter),
- BPF_EAPROG_SEC("xdp_devmap", BPF_PROG_TYPE_XDP,
+ BPF_EAPROG_SEC("xdp_devmap/", BPF_PROG_TYPE_XDP,
BPF_XDP_DEVMAP),
BPF_PROG_SEC("xdp", BPF_PROG_TYPE_XDP),
BPF_PROG_SEC("perf_event", BPF_PROG_TYPE_PERF_EVENT),
diff --git a/tools/testing/selftests/bpf/progs/test_xdp_with_devmap_helpers.c b/tools/testing/selftests/bpf/progs/test_xdp_with_devmap_helpers.c
index 330811260123..0ac086497722 100644
--- a/tools/testing/selftests/bpf/progs/test_xdp_with_devmap_helpers.c
+++ b/tools/testing/selftests/bpf/progs/test_xdp_with_devmap_helpers.c
@@ -27,7 +27,7 @@ int xdp_dummy_prog(struct xdp_md *ctx)
/* valid program on DEVMAP entry via SEC name;
* has access to egress and ingress ifindex
*/
-SEC("xdp_devmap")
+SEC("xdp_devmap/map_prog")
int xdp_dummy_dm(struct xdp_md *ctx)
{
char fmt[] = "devmap redirect: dev %u -> dev %u len %u\n";
next prev parent reply other threads:[~2020-06-25 14:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 21:39 [PATCH v3 bpf-next 0/9] introduce support for XDP programs in CPUMAP Lorenzo Bianconi
2020-06-23 21:39 ` [PATCH v3 bpf-next 1/9] cpumap: use non-locked version __ptr_ring_consume_batched Lorenzo Bianconi
2020-06-23 21:39 ` [PATCH v3 bpf-next 2/9] net: Refactor xdp_convert_buff_to_frame Lorenzo Bianconi
2020-06-24 8:06 ` Jesper Dangaard Brouer
2020-06-23 21:39 ` [PATCH v3 bpf-next 3/9] samples/bpf: xdp_redirect_cpu_user: do not update bpf maps in option loop Lorenzo Bianconi
2020-06-23 21:39 ` [PATCH v3 bpf-next 4/9] cpumap: formalize map value as a named struct Lorenzo Bianconi
2020-06-24 8:08 ` Jesper Dangaard Brouer
2020-06-23 21:39 ` [PATCH v3 bpf-next 5/9] bpf: cpumap: add the possibility to attach an eBPF program to cpumap Lorenzo Bianconi
2020-06-24 8:12 ` Jesper Dangaard Brouer
2020-06-23 21:39 ` [PATCH v3 bpf-next 6/9] bpf: cpumap: implement XDP_REDIRECT for eBPF programs attached to map entries Lorenzo Bianconi
2020-06-24 8:32 ` Jesper Dangaard Brouer
2020-06-23 21:39 ` [PATCH v3 bpf-next 7/9] libbpf: add SEC name for xdp programs attached to CPUMAP Lorenzo Bianconi
2020-06-24 5:49 ` Andrii Nakryiko
2020-06-24 8:36 ` Jesper Dangaard Brouer
2020-06-24 14:29 ` Alexei Starovoitov
2020-06-25 14:26 ` Jesper Dangaard Brouer [this message]
2020-06-25 16:58 ` [PATCH bpf] libbpf: adjust SEC short cut for expected attach type BPF_XDP_DEVMAP Andrii Nakryiko
2020-06-25 21:12 ` Daniel Borkmann
2020-06-23 21:39 ` [PATCH v3 bpf-next 8/9] samples/bpf: xdp_redirect_cpu: load a eBPF program on cpumap Lorenzo Bianconi
2020-06-24 9:00 ` Jesper Dangaard Brouer
2020-06-23 21:39 ` [PATCH v3 bpf-next 9/9] selftest: add tests for XDP programs in CPUMAP entries Lorenzo Bianconi
2020-06-24 5:51 ` Andrii Nakryiko
2020-06-24 15:37 ` Lorenzo Bianconi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=159309521882.821855.6873145686353617509.stgit@firesoul \
--to=brouer@redhat.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andriin@fb.com \
--cc=borkmann@iogearbox.net \
--cc=bpf@vger.kernel.org \
--cc=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox