From: Daniel Borkmann <daniel@iogearbox.net>
To: Magnus Karlsson <magnus.karlsson@gmail.com>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: "Magnus Karlsson" <magnus.karlsson@intel.com>,
"Björn Töpel" <bjorn.topel@intel.com>,
ast@kernel.org, "Network Development" <netdev@vger.kernel.org>,
"Jakub Kicinski" <jakub.kicinski@netronome.com>,
"Björn Töpel" <bjorn.topel@gmail.com>,
"Zhang, Qi Z" <qi.z.zhang@intel.com>,
"Jesper Dangaard Brouer" <brouer@redhat.com>
Subject: Re: [PATCH bpf-next v2 1/2] libbpf: add support for using AF_XDP sockets
Date: Thu, 13 Dec 2018 16:48:50 +0100 [thread overview]
Message-ID: <0d3b5e1e-caa8-c963-cd8c-daef5b64b80d@iogearbox.net> (raw)
In-Reply-To: <CAJ8uoz3RVjcLrGBz69bPTKz3gQSV8u+M1XwEhmfRDp65xVGtgQ@mail.gmail.com>
On 12/13/2018 10:06 AM, Magnus Karlsson wrote:
> On Thu, Dec 13, 2018 at 7:24 AM Alexei Starovoitov
> <alexei.starovoitov@gmail.com> wrote:
>> On Wed, Dec 12, 2018 at 02:09:48PM +0100, Magnus Karlsson wrote:
>>> diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map
>>> index cd02cd4..ae4cc0d 100644
>>> --- a/tools/lib/bpf/libbpf.map
>>> +++ b/tools/lib/bpf/libbpf.map
>>> @@ -121,6 +121,15 @@ LIBBPF_0.0.1 {
>>> libbpf_prog_type_by_name;
>>> libbpf_set_print;
>>> libbpf_strerror;
>>> + xsk__peek_cons;
>>> + xsk__release_cons;
>>> + xsk__reserve_prod;
>>> + xsk__submit_prod;
>>> + xsk__get_data;
>>> + xsk__create_umem;
>>> + xsk__create_xdp_socket;
>>> + xsk__delete_umem;
>>> + xsk__delete_xdp_socket;
>>> local:
>>
>> I fully support the idea to provide common library for AF_XDP
>> that is easily available in the distros.
+1
>> The main question is whether AF_XDP warrants its own lib or
>> piggy back on libbpf effort is acceptable.
>>
>> Do you think above set of APIs will be enough for foreseeable
>> future or this is just a beginning?
>
> This should be enough for the foreseeable future, maybe with the
> addition of the two higher level data plane functions xsk__recvmsg and
> xsl__sendmsg that was mentioned in the cover letter. My intention with
> this functionality is not to create another DPDK (there is already
> one, so no reason to reinvent it). I just want to lower the bar of
> entry for using AF_XDP and to stop people copying the code in the
> sample application. To use AF_XDP you need libbpf anyway, so I think
> it is a good fit for it. The intention is to keep this functionality
> lean and mean.
+1
>> If above is enough then it falls into XDP category. libbpf
>> already has minimal support for XDP and AF_XDP fits right in.
Agree, I think given we have XDP support in there already, it would
fit to complement the lib with AF_XDP helpers to set up and get raw
access to the pkt data.
Any framework on top of this providing helper functions to develop
applications should be out of scope here and subject to other libraries,
DPDK and whatnot.
>> But if AF_XDP will keep growing a lot then it would make
>> sense to keep the functionality in a separate library
>> that minimally depends on libbpf.
next prev parent reply other threads:[~2018-12-13 15:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-12 13:09 [PATCH bpf-next v2 0/2] libbpf: adding AF_XDP support Magnus Karlsson
2018-12-12 13:09 ` [PATCH bpf-next v2 1/2] libbpf: add support for using AF_XDP sockets Magnus Karlsson
2018-12-13 6:23 ` Alexei Starovoitov
2018-12-13 9:06 ` Magnus Karlsson
2018-12-13 15:48 ` Daniel Borkmann [this message]
2018-12-14 20:23 ` Alexei Starovoitov
2018-12-17 9:12 ` Magnus Karlsson
2018-12-18 18:53 ` Alexei Starovoitov
2018-12-12 13:09 ` [PATCH bpf-next v2 2/2] samples/bpf: convert xdpsock to use libbpf for AF_XDP access Magnus Karlsson
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=0d3b5e1e-caa8-c963-cd8c-daef5b64b80d@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=alexei.starovoitov@gmail.com \
--cc=ast@kernel.org \
--cc=bjorn.topel@gmail.com \
--cc=bjorn.topel@intel.com \
--cc=brouer@redhat.com \
--cc=jakub.kicinski@netronome.com \
--cc=magnus.karlsson@gmail.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=qi.z.zhang@intel.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