From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"Alexei Starovoitov" <ast@kernel.org>,
"Jesper Dangaard Brouer" <brouer@redhat.com>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Toke Høiland-Jørgensen" <toke@redhat.com>,
lorenzo.bianconi@redhat.com, "David Ahern" <dsahern@kernel.org>
Subject: Re: [PATCH v3 bpf-next 9/9] selftest: add tests for XDP programs in CPUMAP entries
Date: Wed, 24 Jun 2020 17:37:23 +0200 [thread overview]
Message-ID: <20200624153723.GA342397@localhost.localdomain> (raw)
In-Reply-To: <CAEf4BzZUfxv_zbuefAYM6gxQ2pdxYjQLjZTb=9qGJhoVztuZ3Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1022 bytes --]
> On Tue, Jun 23, 2020 at 2:40 PM Lorenzo Bianconi <lorenzo@kernel.org> wrote:
> >
> > Similar to what have been done for DEVMAP, introduce tests to verify
[...]
> > +SEC("xdp_cpumap/dummy_cm")
> > +int xdp_dummy_cm(struct xdp_md *ctx)
> > +{
> > + char fmt[] = "devmap redirect: dev %u len %u\n";
> > + void *data_end = (void *)(long)ctx->data_end;
> > + void *data = (void *)(long)ctx->data;
> > + unsigned int len = data_end - data;
> > +
> > + ingress_ifindex = ctx->ingress_ifindex;
>
> Have you checked the generated BPF assembly to verify
> ctx->ingress_ifindex is actually read? ingress_ifindex variable is
> declared static, so I'm guessing Clang just optimized it away. If you
> want to be sure this actually gets executed, make ingress_ifindex
> global var.
ack, thx for the review. I will fix it in v4.
Regards,
Lorenzo
>
> > +
> > + return XDP_PASS;
> > +}
> > +
> > +char _license[] SEC("license") = "GPL";
> > --
> > 2.26.2
> >
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2020-06-24 15:37 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 ` [PATCH bpf] libbpf: adjust SEC short cut for expected attach type BPF_XDP_DEVMAP Jesper Dangaard Brouer
2020-06-25 16:58 ` 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 [this message]
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=20200624153723.GA342397@localhost.localdomain \
--to=lorenzo@kernel.org \
--cc=andrii.nakryiko@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=toke@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).