From: Daniel Borkmann <daniel@iogearbox•net>
To: Jesper Dangaard Brouer <brouer@redhat•com>,
netdev@vger•kernel.org, tariqt@mellanox•com
Cc: tom@herbertland•com, bblanco@plumgrid•com,
Alexei Starovoitov <alexei.starovoitov@gmail•com>,
Eric Dumazet <eric.dumazet@gmail•com>
Subject: Re: [RFC PATCH] xdp: separate struct xdp_prog as container for bpf_prog
Date: Tue, 20 Sep 2016 22:21:31 +0200 [thread overview]
Message-ID: <57E19A4B.6030101@iogearbox.net> (raw)
In-Reply-To: <20160920195458.21735.21873.stgit@firesoul>
On 09/20/2016 09:55 PM, Jesper Dangaard Brouer wrote:
> Currently the XDP program is simply a bpf_prog pointer. While it
> is good for simplicity, it is limiting extendability for upcoming
> features.
>
> Introducing a new struct xdp_prog, that can carry information
> related to the XDP program. Notice this approach does not affect
> performance (tested and benchmarked), because the extra dereference
> for the eBPF program only happens once per 64 packets in the poll
> function.
>
> The features that need this is:
>
> * Multi-port TX:
> Need to know own port index and port lookup table.
>
> * XDP program per RX queue:
> Need setup info about program type, global or specific, due to
> replace semantics.
>
> * Capabilities negotiation:
> Need to store information about features program want to use,
> in-order to validate this.
>
> I do realize this new struct xdp_prog features cannot go into the
> kernel before one of the three users of the struct is also implemented.
Yep, so this whole wrapper structure which adds yet another mgmt layer
with ref'counting etc is kind of hard to judge whether it's into the
right direction w/o showing a user of this struct. Each BPF prog does
have struct bpf_prog_aux, where we store auxiliary data, so I'd recommend
to try extending this with some private data, which can be for XDP type
etc since we know it's an XDP prog anyway. Or is there a specific reason
that this is impossible to do, resp. limiting?
next prev parent reply other threads:[~2016-09-20 20:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-20 19:55 [RFC PATCH] xdp: separate struct xdp_prog as container for bpf_prog Jesper Dangaard Brouer
2016-09-20 20:21 ` Daniel Borkmann [this message]
2016-09-20 22:02 ` Tom Herbert
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=57E19A4B.6030101@iogearbox.net \
--to=daniel@iogearbox$(echo .)net \
--cc=alexei.starovoitov@gmail$(echo .)com \
--cc=bblanco@plumgrid$(echo .)com \
--cc=brouer@redhat$(echo .)com \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=tariqt@mellanox$(echo .)com \
--cc=tom@herbertland$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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