From: Daniel Borkmann <daniel@iogearbox.net>
To: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>,
"Björn Töpel" <bjorn.topel@gmail.com>
Cc: magnus.karlsson@intel.com, magnus.karlsson@gmail.com,
alexander.h.duyck@intel.com, alexander.duyck@gmail.com,
ast@fb.com, brouer@redhat.com, netdev@vger.kernel.org,
mykyta.iziumtsev@linaro.org,
"Björn Töpel" <bjorn.topel@intel.com>,
john.fastabend@gmail.com, willemdebruijn.kernel@gmail.com,
mst@redhat.com, michael.lundkvist@ericsson.com,
jesse.brandeburg@intel.com, anjali.singhai@intel.com,
qi.z.zhang@intel.com, francois.ozog@linaro.org,
ilias.apalodimas@linaro.org, brian.brooks@linaro.org,
andy@greyhouse.net, michael.chan@broadcom.com
Subject: Re: [PATCH bpf-next 0/5] AF_XDP: bug fixes and descriptor changes
Date: Mon, 4 Jun 2018 21:51:15 +0200 [thread overview]
Message-ID: <f1edb733-c671-3f33-36e1-e6ffa28438cd@iogearbox.net> (raw)
In-Reply-To: <20180604162429.zu4uno6fviz4pfte@ast-mbp>
On 06/04/2018 06:24 PM, Alexei Starovoitov wrote:
> On Mon, Jun 04, 2018 at 01:57:10PM +0200, Björn Töpel wrote:
>> From: Björn Töpel <bjorn.topel@intel.com>
>>
>> An issue with the current AF_XDP uapi raised by Mykyta Iziumtsev (see
>> https://www.spinics.net/lists/netdev/msg503664.html) is that it does
>> not support NICs that have a "type-writer" model in an efficient
>> way. In this model, a memory window is passed to the hardware and
>> multiple frames might be filled into that window, instead of just one
>> that we have in the current fixed frame-size model.
>>
>> This patch set fixes two bugs in the current implementation and then
>> changes the uapi so that the type-writer model can be supported
>> efficiently by a possible future extension of AF_XDP.
>>
>> These are the uapi changes in this patch:
>>
>> * Change the "u32 idx" in the descriptors to "u64 addr". The current
>> idx based format does NOT work for the type-writer model (as packets
>> can start anywhere within a frame) but that a relative address
>> pointer (the u64 addr) works well for both models in the prototype
>> code we have that supports both models. We increased it from u32 to
>> u64 to support umems larger than 4G. We have also removed the u16
>> offset when having a "u64 addr" since that information is already
>> carried in the least significant bits of the address.
>>
>> * We want to use "u8 padding[5]" for something useful in the future
>> (since we are not allowed to change its name), so we now call it
>> just options so it can be extended for various purposes in the
>> future. It is an u32 as that it what is left of the 16 byte
>> descriptor.
>>
>> * We changed the name of frame_size in the UMEM_REG setsockopt to
>> chunk_size since this naming also makes sense to the type-writer
>> model.
>>
>> With these changes to the uapi, we believe the type-writer model can
>> be supported without having to resort to a new descriptor format. The
>> type-writer model could then be supported, from the uapi point of
>> view, by setting a flag at bind time and providing a new flag bit in
>> the options field of the descriptor that signals to user space that
>> all packets have been written in a chunk. Or with a new chunk
>> completion queue as suggested by Mykyta in his latest feedback mail on
>> the list.
>
> for the set:
> Acked-by: Alexei Starovoitov <ast@kernel.org>
> Thank you for these fixes.
> According to unofficial feedback from brcm and netronome folks
> the descriptor format should work for these nics too.
> At some point we may consider second format, but I think SW
> should drive HW requirements and not the other way around.
LGTM as well, applied to bpf-next, thanks!
prev parent reply other threads:[~2018-06-04 19:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-04 11:57 [PATCH bpf-next 0/5] AF_XDP: bug fixes and descriptor changes Björn Töpel
2018-06-04 11:57 ` [PATCH bpf-next 1/5] xsk: proper fill queue descriptor validation Björn Töpel
2018-06-04 11:57 ` [PATCH bpf-next 2/5] xsk: proper Rx drop statistics update Björn Töpel
2018-06-04 11:57 ` [PATCH bpf-next 3/5] xsk: new descriptor addressing scheme Björn Töpel
2018-06-04 11:57 ` [PATCH bpf-next 4/5] samples/bpf: adapted to new uapi Björn Töpel
2018-06-04 11:57 ` [PATCH bpf-next 5/5] samples/bpf: minor *_nb_free performance fix Björn Töpel
2018-06-04 16:24 ` [PATCH bpf-next 0/5] AF_XDP: bug fixes and descriptor changes Alexei Starovoitov
2018-06-04 19:51 ` Daniel Borkmann [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=f1edb733-c671-3f33-36e1-e6ffa28438cd@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=alexander.duyck@gmail.com \
--cc=alexander.h.duyck@intel.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andy@greyhouse.net \
--cc=anjali.singhai@intel.com \
--cc=ast@fb.com \
--cc=bjorn.topel@gmail.com \
--cc=bjorn.topel@intel.com \
--cc=brian.brooks@linaro.org \
--cc=brouer@redhat.com \
--cc=francois.ozog@linaro.org \
--cc=ilias.apalodimas@linaro.org \
--cc=jesse.brandeburg@intel.com \
--cc=john.fastabend@gmail.com \
--cc=magnus.karlsson@gmail.com \
--cc=magnus.karlsson@intel.com \
--cc=michael.chan@broadcom.com \
--cc=michael.lundkvist@ericsson.com \
--cc=mst@redhat.com \
--cc=mykyta.iziumtsev@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=qi.z.zhang@intel.com \
--cc=willemdebruijn.kernel@gmail.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).