From: Jesper Dangaard Brouer <brouer@redhat.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [RFC PATCH bpf-next 05/12] xdp: add MEM_TYPE_ZERO_COPY
Date: Thu, 17 May 2018 07:57:56 +0200 [thread overview]
Message-ID: <20180517075756.52e7f82a@redhat.com> (raw)
In-Reply-To: <20180515190615.23099-6-bjorn.topel@gmail.com>
On Tue, 15 May 2018 21:06:08 +0200
Bj?rn T?pel <bjorn.topel@gmail.com> wrote:
> @@ -82,6 +88,10 @@ struct xdp_frame *convert_to_xdp_frame(struct xdp_buff *xdp)
> int metasize;
> int headroom;
>
> + // XXX implement clone, copy, use "native" MEM_TYPE
> + if (xdp->rxq->mem.type == MEM_TYPE_ZERO_COPY)
> + return NULL;
> +
There is going to be significant tradeoffs between AF_XDP zero-copy and
copy-variant. The copy-variant, still have very attractive
RX-performance, and other benefits like no exposing unrelated packets
to userspace (but limit these to the XDP filter).
Thus, as a user I would like to choose between AF_XDP zero-copy and
copy-variant. Even if my NIC support zero-copy, I can be interested in
only enabling the copy-variant. This patchset doesn't let me choose.
How do we expose this to userspace?
(Maybe as simple as an sockaddr_xdp->sxdp_flags flag?)
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
next prev parent reply other threads:[~2018-05-17 5:57 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-15 19:06 [Intel-wired-lan] [RFC PATCH bpf-next 00/12] AF_XDP, zero-copy support =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-15 19:06 ` [Intel-wired-lan] [RFC PATCH bpf-next 01/12] xsk: remove rebind support =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-15 19:06 ` [Intel-wired-lan] [RFC PATCH bpf-next 02/12] xsk: moved struct xdp_umem definition =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-15 19:06 ` [Intel-wired-lan] [RFC PATCH bpf-next 03/12] xsk: introduce xdp_umem_frame =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-15 19:06 ` [Intel-wired-lan] [RFC PATCH bpf-next 04/12] net: xdp: added bpf_netdev_command XDP_SETUP_XSK_UMEM =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-15 19:06 ` [Intel-wired-lan] [RFC PATCH bpf-next 05/12] xdp: add MEM_TYPE_ZERO_COPY =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-17 5:57 ` Jesper Dangaard Brouer [this message]
2018-05-17 7:08 ` =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-17 7:09 ` =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-15 19:06 ` [Intel-wired-lan] [RFC PATCH bpf-next 06/12] xsk: add zero-copy support for Rx =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-15 19:06 ` [Intel-wired-lan] [RFC PATCH bpf-next 07/12] net: added netdevice operation for Tx =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-15 19:06 ` [Intel-wired-lan] [RFC PATCH bpf-next 08/12] xsk: wire upp Tx zero-copy functions =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-15 19:06 ` [Intel-wired-lan] [RFC PATCH bpf-next 09/12] samples/bpf: minor *_nb_free performance fix =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-15 19:06 ` [Intel-wired-lan] [RFC PATCH bpf-next 10/12] i40e: added queue pair disable/enable functions =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-15 19:06 ` [Intel-wired-lan] [RFC PATCH bpf-next 11/12] i40e: implement AF_XDP zero-copy support for Rx =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-15 20:25 ` Alexander Duyck
2018-05-15 19:06 ` [Intel-wired-lan] [RFC PATCH bpf-next 12/12] i40e: implement Tx zero-copy =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-16 14:28 ` Jesper Dangaard Brouer
2018-05-16 14:38 ` Magnus Karlsson
2018-05-16 15:38 ` Magnus Karlsson
2018-05-16 18:53 ` Jesper Dangaard Brouer
2018-05-17 21:31 ` Jesper Dangaard Brouer
2018-05-18 4:23 ` =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-16 10:47 ` [Intel-wired-lan] [RFC PATCH bpf-next 00/12] AF_XDP, zero-copy support Jesper Dangaard Brouer
2018-05-16 17:04 ` Alexei Starovoitov
2018-05-16 17:49 ` =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?=
2018-05-16 18:14 ` Jeff Kirsher
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=20180517075756.52e7f82a@redhat.com \
--to=brouer@redhat.com \
--cc=intel-wired-lan@osuosl.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