From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Eelco Chaudron <echaudro@redhat.com>,
Jesper Dangaard Brouer <brouer@redhat.com>
Cc: "Machulsky, Zorik" <zorik@amazon.com>,
"Jubran, Samih" <sameehj@amazon.com>,
davem@davemloft.net, netdev@vger.kernel.org, "Woodhouse,
David" <dwmw@amazon.co.uk>,
"Matushevsky, Alexander" <matua@amazon.com>,
"Bshara, Saeed" <saeedb@amazon.com>,
"Wilson, Matt" <msw@amazon.com>,
"Liguori, Anthony" <aliguori@amazon.com>,
"Bshara, Nafea" <nafea@amazon.com>,
"Tzalik, Guy" <gtzalik@amazon.com>,
"Belgazal, Netanel" <netanel@amazon.com>,
"Saidi, Ali" <alisaidi@amazon.com>,
"Herrenschmidt, Benjamin" <benh@amazon.com>,
"Kiyanovski, Arthur" <akiyano@amazon.com>,
Daniel Borkmann <borkmann@iogearbox.net>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Jakub Kicinski <jakub.kicinski@netronome.com>,
xdp-newbies@vger.kernel.org
Subject: Re: XDP multi-buffer incl. jumbo-frames (Was: [RFC V1 net-next 1/1] net: ena: implement XDP drop support)
Date: Fri, 28 Jun 2019 09:46:45 +0200 [thread overview]
Message-ID: <87y31m884a.fsf@toke.dk> (raw)
In-Reply-To: <CC99D6DE-5B6B-42F3-8D68-7F9AFF1712FF@redhat.com>
"Eelco Chaudron" <echaudro@redhat.com> writes:
> On 26 Jun 2019, at 10:38, Jesper Dangaard Brouer wrote:
>
>> On Tue, 25 Jun 2019 03:19:22 +0000
>> "Machulsky, Zorik" <zorik@amazon.com> wrote:
>>
>>> On 6/23/19, 7:21 AM, "Jesper Dangaard Brouer" <brouer@redhat.com>
>>> wrote:
>>>
>>> On Sun, 23 Jun 2019 10:06:49 +0300 <sameehj@amazon.com> wrote:
>>>
>>> > This commit implements the basic functionality of drop/pass
>>> logic in the
>>> > ena driver.
>>>
>>> Usually we require a driver to implement all the XDP return
>>> codes,
>>> before we accept it. But as Daniel and I discussed with Zorik
>>> during
>>> NetConf[1], we are going to make an exception and accept the
>>> driver
>>> if you also implement XDP_TX.
>>>
>>> As we trust that Zorik/Amazon will follow and implement
>>> XDP_REDIRECT
>>> later, given he/you wants AF_XDP support which requires
>>> XDP_REDIRECT.
>>>
>>> Jesper, thanks for your comments and very helpful discussion during
>>> NetConf! That's the plan, as we agreed. From our side I would like to
>>> reiterate again the importance of multi-buffer support by xdp frame.
>>> We would really prefer not to see our MTU shrinking because of xdp
>>> support.
>>
>> Okay we really need to make a serious attempt to find a way to support
>> multi-buffer packets with XDP. With the important criteria of not
>> hurting performance of the single-buffer per packet design.
>>
>> I've created a design document[2], that I will update based on our
>> discussions: [2]
>> https://github.com/xdp-project/xdp-project/blob/master/areas/core/xdp-multi-buffer01-design.org
>>
>> The use-case that really convinced me was Eric's packet header-split.
>>
>>
>> Lets refresh: Why XDP don't have multi-buffer support:
>>
>> XDP is designed for maximum performance, which is why certain
>> driver-level
>> use-cases were not supported, like multi-buffer packets (like
>> jumbo-frames).
>> As it e.g. complicated the driver RX-loop and memory model handling.
>>
>> The single buffer per packet design, is also tied into eBPF
>> Direct-Access
>> (DA) to packet data, which can only be allowed if the packet memory is
>> in
>> contiguous memory. This DA feature is essential for XDP performance.
>>
>>
>> One way forward is to define that XDP only get access to the first
>> packet buffer, and it cannot see subsequent buffers. For XDP_TX and
>> XDP_REDIRECT to work then XDP still need to carry pointers (plus
>> len+offset) to the other buffers, which is 16 bytes per extra buffer.
>
>
> I’ve seen various network processor HW designs, and they normally get
> the first x bytes (128 - 512) which they can manipulate
> (append/prepend/insert/modify/delete).
>
> There are designs where they can “page in” the additional fragments
> but it’s expensive as it requires additional memory transfers. But the
> majority do not care (cannot change) the remaining fragments. Can also
> not think of a reason why you might want to remove something at the end
> of the frame (thinking about routing/forwarding needs here).
>
> If we do want XDP to access other fragments we could do this through a
> helper which swaps the packet context?
Yeah, I was also going to suggest a helper for that. It doesn't
necessarily need to swap the packet context, it could just return a new
pointer?
-Toke
WARNING: multiple messages have this Message-ID (diff)
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Eelco Chaudron <echaudro@redhat.com>,
Jesper Dangaard Brouer <brouer@redhat.com>
Cc: "Machulsky\, Zorik" <zorik@amazon.com>, "Jubran\,
Samih" <sameehj@amazon.com>,
davem@davemloft.net, netdev@vger.kernel.org, "Woodhouse\,
David" <dwmw@amazon.co.uk>, "Matushevsky\,
Alexander" <matua@amazon.com>, "Bshara\,
Saeed" <saeedb@amazon.com>, "Wilson\, Matt" <msw@amazon.com>,
"Liguori\, Anthony" <aliguori@amazon.com>, "Bshara\,
Nafea" <nafea@amazon.com>, "Tzalik\, Guy" <gtzalik@amazon.com>,
"Belgazal\, Netanel" <netanel@amazon.com>, "Saidi\,
Ali" <alisaidi@amazon.com>, "Herrenschmidt\,
Benjamin" <benh@amazon.com>, "Kiyanovski\,
Arthur" <akiyano@amazon.com>,
Daniel Borkmann <borkmann@iogearbox.net>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Jakub Kicinski <jakub.kicinski@netronome.com>,
xdp-newbies@vger.kernel.org
Subject: Re: XDP multi-buffer incl. jumbo-frames (Was: [RFC V1 net-next 1/1] net: ena: implement XDP drop support)
Date: Fri, 28 Jun 2019 09:46:45 +0200 [thread overview]
Message-ID: <87y31m884a.fsf@toke.dk> (raw)
In-Reply-To: <CC99D6DE-5B6B-42F3-8D68-7F9AFF1712FF@redhat.com>
"Eelco Chaudron" <echaudro@redhat.com> writes:
> On 26 Jun 2019, at 10:38, Jesper Dangaard Brouer wrote:
>
>> On Tue, 25 Jun 2019 03:19:22 +0000
>> "Machulsky, Zorik" <zorik@amazon.com> wrote:
>>
>>> On 6/23/19, 7:21 AM, "Jesper Dangaard Brouer" <brouer@redhat.com>
>>> wrote:
>>>
>>> On Sun, 23 Jun 2019 10:06:49 +0300 <sameehj@amazon.com> wrote:
>>>
>>> > This commit implements the basic functionality of drop/pass
>>> logic in the
>>> > ena driver.
>>>
>>> Usually we require a driver to implement all the XDP return
>>> codes,
>>> before we accept it. But as Daniel and I discussed with Zorik
>>> during
>>> NetConf[1], we are going to make an exception and accept the
>>> driver
>>> if you also implement XDP_TX.
>>>
>>> As we trust that Zorik/Amazon will follow and implement
>>> XDP_REDIRECT
>>> later, given he/you wants AF_XDP support which requires
>>> XDP_REDIRECT.
>>>
>>> Jesper, thanks for your comments and very helpful discussion during
>>> NetConf! That's the plan, as we agreed. From our side I would like to
>>> reiterate again the importance of multi-buffer support by xdp frame.
>>> We would really prefer not to see our MTU shrinking because of xdp
>>> support.
>>
>> Okay we really need to make a serious attempt to find a way to support
>> multi-buffer packets with XDP. With the important criteria of not
>> hurting performance of the single-buffer per packet design.
>>
>> I've created a design document[2], that I will update based on our
>> discussions: [2]
>> https://github.com/xdp-project/xdp-project/blob/master/areas/core/xdp-multi-buffer01-design.org
>>
>> The use-case that really convinced me was Eric's packet header-split.
>>
>>
>> Lets refresh: Why XDP don't have multi-buffer support:
>>
>> XDP is designed for maximum performance, which is why certain
>> driver-level
>> use-cases were not supported, like multi-buffer packets (like
>> jumbo-frames).
>> As it e.g. complicated the driver RX-loop and memory model handling.
>>
>> The single buffer per packet design, is also tied into eBPF
>> Direct-Access
>> (DA) to packet data, which can only be allowed if the packet memory is
>> in
>> contiguous memory. This DA feature is essential for XDP performance.
>>
>>
>> One way forward is to define that XDP only get access to the first
>> packet buffer, and it cannot see subsequent buffers. For XDP_TX and
>> XDP_REDIRECT to work then XDP still need to carry pointers (plus
>> len+offset) to the other buffers, which is 16 bytes per extra buffer.
>
>
> I’ve seen various network processor HW designs, and they normally get
> the first x bytes (128 - 512) which they can manipulate
> (append/prepend/insert/modify/delete).
>
> There are designs where they can “page in” the additional fragments
> but it’s expensive as it requires additional memory transfers. But the
> majority do not care (cannot change) the remaining fragments. Can also
> not think of a reason why you might want to remove something at the end
> of the frame (thinking about routing/forwarding needs here).
>
> If we do want XDP to access other fragments we could do this through a
> helper which swaps the packet context?
Yeah, I was also going to suggest a helper for that. It doesn't
necessarily need to swap the packet context, it could just return a new
pointer?
-Toke
next prev parent reply other threads:[~2019-06-28 7:46 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-23 7:06 [RFC V1 net-next 0/1] Introduce xdp to ena sameehj
2019-06-23 7:06 ` [RFC V1 net-next 1/1] net: ena: implement XDP drop support sameehj
2019-06-23 14:09 ` Jesper Dangaard Brouer
2019-06-23 14:21 ` Jesper Dangaard Brouer
2019-06-25 3:19 ` Machulsky, Zorik
2019-06-26 8:38 ` XDP multi-buffer incl. jumbo-frames (Was: [RFC V1 net-next 1/1] net: ena: implement XDP drop support) Jesper Dangaard Brouer
2019-06-26 11:52 ` Toke Høiland-Jørgensen
2019-06-26 11:52 ` Toke Høiland-Jørgensen
2019-06-26 14:40 ` Jesper Dangaard Brouer
2019-06-26 14:40 ` Jesper Dangaard Brouer
2019-06-26 15:01 ` Toke Høiland-Jørgensen
2019-06-26 15:01 ` Toke Høiland-Jørgensen
2019-06-26 15:20 ` Willem de Bruijn
2019-06-26 16:42 ` Jonathan Lemon
2019-06-26 20:00 ` Jesper Dangaard Brouer
2019-06-27 22:07 ` Jonathan Lemon
2019-06-28 8:46 ` Jesper Dangaard Brouer
2019-06-26 15:14 ` Toke Høiland-Jørgensen
2019-06-26 15:14 ` Toke Høiland-Jørgensen
2019-06-26 16:36 ` Jesper Dangaard Brouer
2019-06-26 16:36 ` Jesper Dangaard Brouer
2019-06-28 7:14 ` Eelco Chaudron
2019-06-28 7:46 ` Toke Høiland-Jørgensen [this message]
2019-06-28 7:46 ` Toke Høiland-Jørgensen
2019-06-28 11:49 ` Eelco Chaudron
2019-06-28 8:22 ` Jesper Dangaard Brouer
2019-06-23 14:28 ` [RFC V1 net-next 1/1] net: ena: implement XDP drop support David Ahern
2019-06-23 14:51 ` Maciej Fijalkowski
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=87y31m884a.fsf@toke.dk \
--to=toke@redhat.com \
--cc=akiyano@amazon.com \
--cc=alexei.starovoitov@gmail.com \
--cc=aliguori@amazon.com \
--cc=alisaidi@amazon.com \
--cc=benh@amazon.com \
--cc=borkmann@iogearbox.net \
--cc=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=dwmw@amazon.co.uk \
--cc=echaudro@redhat.com \
--cc=gtzalik@amazon.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jakub.kicinski@netronome.com \
--cc=matua@amazon.com \
--cc=msw@amazon.com \
--cc=nafea@amazon.com \
--cc=netanel@amazon.com \
--cc=netdev@vger.kernel.org \
--cc=saeedb@amazon.com \
--cc=sameehj@amazon.com \
--cc=xdp-newbies@vger.kernel.org \
--cc=zorik@amazon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.