From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: David Ahern <dsahern@gmail.com>,
bpf@vger.kernel.org, netdev@vger.kernel.org,
Daniel Borkmann <borkmann@iogearbox.net>,
Andrii Nakryiko <andrii.nakryiko@gmail.com>,
Lorenzo Bianconi <lorenzo@kernel.org>
Subject: Re: [PATCH bpf-next V1] bpf: devmap dynamic map-value area based on BTF
Date: Wed, 3 Jun 2020 09:22:57 -0700 [thread overview]
Message-ID: <20200603162257.nxgultkidnb7yb6q@ast-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <159119908343.1649854.17264745504030734400.stgit@firesoul>
On Wed, Jun 03, 2020 at 05:44:43PM +0200, Jesper Dangaard Brouer wrote:
> The recent commit fbee97feed9b ("bpf: Add support to attach bpf program to a
> devmap entry"), introduced ability to attach (and run) a separate XDP
> bpf_prog for each devmap entry. A bpf_prog is added via a file-descriptor,
> thus not using the feature requires using value minus-1. The UAPI is
> extended via tail-extending struct bpf_devmap_val and using map->value_size
> to determine the feature set.
>
> There is a specific problem with dev_map_can_have_prog() check, which is
> called from net/core/dev.c in generic_xdp_install() to refuse usage of
> devmap's from generic-XDP that support these bpf_prog's. The check is size
> based. This means that all newer features will be blocked from being use by
> generic-XDP.
>
> This patch allows userspace to skip handling of 'bpf_prog' on map-inserts.
> The feature can be skipped, via not including the member 'bpf_prog' in the
> map-value struct, which is propagated/described via BTF.
>
> Fixes: fbee97feed9b ("bpf: Add support to attach bpf program to a devmap entry")
> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com
The patch makes no sense to me.
please expose 'struct struct bpf_devmap_val' in uapi/bpf.h
That's what it is whether you want to acknowledge that or not.
next prev parent reply other threads:[~2020-06-03 16:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-03 15:44 [PATCH bpf-next V1] bpf: devmap dynamic map-value area based on BTF Jesper Dangaard Brouer
2020-06-03 16:22 ` Alexei Starovoitov [this message]
2020-06-04 15:48 ` Jesper Dangaard Brouer
2020-06-04 16:40 ` David Ahern
2020-06-04 17:33 ` Alexei Starovoitov
2020-06-05 8:23 ` Jesper Dangaard Brouer
2020-06-05 11:01 ` Toke Høiland-Jørgensen
2020-06-05 17:01 ` Alexei Starovoitov
2020-06-05 16:58 ` Alexei Starovoitov
2020-06-09 12:19 ` Jesper Dangaard Brouer
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=20200603162257.nxgultkidnb7yb6q@ast-mbp.dhcp.thefacebook.com \
--to=alexei.starovoitov@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=borkmann@iogearbox.net \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=dsahern@gmail.com \
--cc=lorenzo@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).