From: David Wei <dw@davidwei.uk>
To: Gal Pressman <gal@nvidia.com>, Jens Axboe <axboe@kernel.dk>,
Pavel Begunkov <asml.silence@gmail.com>
Cc: io-uring@vger.kernel.org, netdev@vger.kernel.org,
Mina Almasry <almasrymina@google.com>,
Jakub Kicinski <kuba@kernel.org>
Subject: Re: [RFC RESEND 00/11] Zero copy network RX using io_uring
Date: Sun, 22 Oct 2023 20:35:44 -0700 [thread overview]
Message-ID: <afcb3c40-0148-46ef-b2be-fa4adc57b88a@davidwei.uk> (raw)
In-Reply-To: <1673427d-b449-4f9e-b344-027c0dc2ec9f@nvidia.com>
On 2023-10-22 12:06, Gal Pressman wrote:
> On 26/08/2023 4:19, David Wei wrote:
>> From: David Wei <davidhwei@meta.com>
>>
>> This patchset is a proposal that adds zero copy network RX to io_uring.
>> With it, userspace can register a region of host memory for receiving
>> data directly from a NIC using DMA, without needing a kernel to user
>> copy.
>>
>> Software support is added to the Broadcom BNXT driver. Hardware support
>> for receive flow steering and header splitting is required.
>>
>> On the userspace side, a sample server is added in this branch of
>> liburing:
>> https://github.com/spikeh/liburing/tree/zcrx2
>>
>> Build liburing as normal, and run examples/zcrx. Then, set flow steering
>> rules using ethtool. A sample shell script is included in
>> examples/zcrx_flow.sh, but you need to change the source IP. Finally,
>> connect a client using e.g. netcat and send data.
>>
>> This patchset + userspace code was tested on an Intel Xeon Platinum
>> 8321HC CPU and Broadcom BCM57504 NIC.
>>
>> Early benchmarks using this prototype, with iperf3 as a load generator,
>> showed a ~50% reduction in overall system memory bandwidth as measured
>> using perf counters. Note that DDIO must be disabled on Intel systems.
>>
>> Mina et al. from Google and Kuba are collaborating on a similar proposal
>> to ZC from NIC to devmem. There are many shared functionality in netdev
>> that we can collaborate on e.g.:
>> * Page pool memory provider backend and resource registration
>> * Page pool refcounted iov/buf representation and lifecycle
>> * Setting receive flow steering
>>
>> As mentioned earlier, this is an early prototype. It is brittle, some
>> functionality is missing and there's little optimisation. We're looking
>> for feedback on the overall approach and points of collaboration in
>> netdev.
>> * No copy fallback, if payload ends up in linear part of skb then the
>> code will not work
>> * No way to pin an RX queue to a specific CPU
>> * Only one ifq, one pool region, on RX queue...
>>
>> This patchset is based on the work by Jonathan Lemon
>> <jonathan.lemon@gmail.com>:
>> https://lore.kernel.org/io-uring/20221108050521.3198458-1-jonathan.lemon@gmail.com/
>
> Hello David,
>
> This work looks interesting, is there anywhere I can read about it some
> more? Maybe it was presented (and hopefully recorded) in a recent
> conference?
> Maybe something geared towards adding more drivers support?
>
Hi Gal,
Thank you for your interest in our work! We will be publishing a paper
and presenting this work at NetDev conference on 1 Nov.
Support for more drivers (e.g. mlx5) is definitely on our radar. We are
collaborating with Mina and others from Google who are working on a
similar proposal but targetting NIC -> ZC RX into GPU memory. We both
require shared bits of infra e.g. page pool memory providers that will
replace the use of a one-off data_pool in this patchset. This would
minimise driver changes needed to support this feature.
> I took a brief look at the bnxt patch and saw you converted the page
> pool allocation to data pool allocation, I assume this is done for data
> pages only, right? Headers are still allocated on page pool pages?
>
> Thanks
Yes, that's right.
David
prev parent reply other threads:[~2023-10-23 3:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-26 1:19 [RFC RESEND 00/11] Zero copy network RX using io_uring David Wei
2023-08-26 1:19 ` [PATCH 01/11] io_uring: add interface queue David Wei
2023-08-26 1:19 ` [PATCH 02/11] io_uring: add mmap support for shared ifq ringbuffers David Wei
2023-08-26 1:19 ` [PATCH 03/11] netdev: add XDP_SETUP_ZC_RX command David Wei
2023-08-26 2:21 ` David Ahern
2023-08-26 21:37 ` David Wei
2023-08-26 1:19 ` [PATCH 04/11] io_uring: setup ZC for an RX queue when registering an ifq David Wei
2023-08-26 2:26 ` David Ahern
2023-08-26 22:00 ` David Wei
2023-08-26 1:19 ` [PATCH 05/11] io_uring: add ZC buf and pool David Wei
2023-08-26 1:19 ` [PATCH 06/11] io_uring: add ZC pool API David Wei
2023-08-26 1:19 ` [PATCH 07/11] skbuff: add SKBFL_FIXED_FRAG and skb_fixed() David Wei
2023-08-26 1:19 ` [PATCH 08/11] io_uring: allocate a uarg for freeing zero copy skbs David Wei
2023-08-26 1:19 ` [PATCH 09/11] io_uring: delay ZC pool destruction David Wei
2023-08-26 1:19 ` [PATCH 10/11] netdev/bnxt: add data pool and use it in BNXT driver David Wei
2023-08-26 1:19 ` [PATCH 11/11] io_uring: add io_recvzc request David Wei
2023-10-22 19:06 ` [RFC RESEND 00/11] Zero copy network RX using io_uring Gal Pressman
2023-10-23 3:35 ` David Wei [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=afcb3c40-0148-46ef-b2be-fa4adc57b88a@davidwei.uk \
--to=dw@davidwei.uk \
--cc=almasrymina@google.com \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=gal@nvidia.com \
--cc=io-uring@vger.kernel.org \
--cc=kuba@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).