Netdev List
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: "Björn Töpel" <bjorn.topel@gmail.com>,
	magnus.karlsson@intel.com, alexander.h.duyck@intel.com,
	alexander.duyck@gmail.com, john.fastabend@gmail.com, ast@fb.com,
	brouer@redhat.com, willemdebruijn.kernel@gmail.com,
	mst@redhat.com, netdev@vger.kernel.org,
	"Björn Töpel" <bjorn.topel@intel.com>,
	michael.lundkvist@ericsson.com, jesse.brandeburg@intel.com,
	anjali.singhai@intel.com, qi.z.zhang@intel.com
Subject: Re: [PATCH bpf-next v3 00/15] Introducing AF_XDP support
Date: Thu, 3 May 2018 16:38:21 -0700	[thread overview]
Message-ID: <20180503233819.2tplfjd32auudys2@ast-mbp> (raw)
In-Reply-To: <c93fd33b-2fde-783b-7953-4673171e2f48@iogearbox.net>

On Fri, May 04, 2018 at 12:49:09AM +0200, Daniel Borkmann wrote:
> On 05/02/2018 01:01 PM, Björn Töpel wrote:
> > From: Björn Töpel <bjorn.topel@intel.com>
> > 
> > This patch set introduces a new address family called AF_XDP that is
> > optimized for high performance packet processing and, in upcoming
> > patch sets, zero-copy semantics. In this patch set, we have removed
> > all zero-copy related code in order to make it smaller, simpler and
> > hopefully more review friendly. This patch set only supports copy-mode
> > for the generic XDP path (XDP_SKB) for both RX and TX and copy-mode
> > for RX using the XDP_DRV path. Zero-copy support requires XDP and
> > driver changes that Jesper Dangaard Brouer is working on. Some of his
> > work has already been accepted. We will publish our zero-copy support
> > for RX and TX on top of his patch sets at a later point in time.
> 
> +1, would be great to see it land this cycle. Saw few minor nits here
> and there but nothing to hold it up, for the series:
> 
> Acked-by: Daniel Borkmann <daniel@iogearbox.net>
> 
> Thanks everyone!

Great stuff!

Applied to bpf-next, with one condition.
Upcoming zero-copy patches for both RX and TX need to be posted
and reviewed within this release window.
If netdev community as a whole won't be able to agree on the zero-copy
bits we'd need to revert this feature before the next merge window.

Few other minor nits:
patch 3:
+struct xdp_ring {
+       __u32 producer __attribute__((aligned(64)));
+       __u32 consumer __attribute__((aligned(64)));
+};
It kinda begs for ____cacheline_aligned_in_smp to be introduced for uapi headers.

patch 5:
+struct sockaddr_xdp {
+       __u16 sxdp_family;
+       __u32 sxdp_ifindex;
Not great to have a hole in uapi struct. Please fix it in the follow up.

patch 7:
Has a lot of synchronize_net(). I think udpate/delete side
can be improved to avoid them. Otherwise users may unknowingly DoS.

As the next steps I suggest to prioritize the highest to ship
zero-copy rx/tx patches and to add selftests.

Thanks!

  reply	other threads:[~2018-05-03 23:38 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-02 11:01 [PATCH bpf-next v3 00/15] Introducing AF_XDP support Björn Töpel
2018-05-02 11:01 ` [PATCH bpf-next v3 01/15] net: initial AF_XDP skeleton Björn Töpel
2018-05-23 22:50   ` Stephen Hemminger
2018-05-24  6:38     ` Björn Töpel
2018-05-24 17:57     ` Alexei Starovoitov
2018-05-02 11:01 ` [PATCH bpf-next v3 02/15] xsk: add user memory registration support sockopt Björn Töpel
2018-05-04 12:34   ` Daniel Borkmann
2018-05-02 11:01 ` [PATCH bpf-next v3 03/15] xsk: add umem fill queue support and mmap Björn Töpel
2018-05-04 12:49   ` Daniel Borkmann
2018-05-02 11:01 ` [PATCH bpf-next v3 04/15] xsk: add Rx queue setup and mmap support Björn Töpel
2018-05-02 11:01 ` [PATCH bpf-next v3 05/15] xsk: add support for bind for Rx Björn Töpel
2018-05-02 11:01 ` [PATCH bpf-next v3 06/15] xsk: add Rx receive functions and poll support Björn Töpel
2018-05-04 12:59   ` Daniel Borkmann
2018-05-22  7:42     ` Björn Töpel
2018-05-02 11:01 ` [PATCH bpf-next v3 07/15] bpf: introduce new bpf AF_XDP map type BPF_MAP_TYPE_XSKMAP Björn Töpel
2018-10-08 15:31   ` Eric Dumazet
2018-10-08 16:05     ` Björn Töpel
2018-10-08 16:52       ` Björn Töpel
2018-10-08 16:55       ` Eric Dumazet
2018-10-08 17:04         ` Björn Töpel
2018-10-08 17:40           ` [PATCH bpf] xsk: do not call synchronize_net() under RCU read lock Björn Töpel
2018-10-09  0:30             ` Song Liu
2018-10-11  8:22             ` Daniel Borkmann
2018-05-02 11:01 ` [PATCH bpf-next v3 08/15] xsk: wire up XDP_DRV side of AF_XDP Björn Töpel
2018-05-02 11:01 ` [PATCH bpf-next v3 09/15] xsk: wire up XDP_SKB " Björn Töpel
2018-05-02 11:01 ` [PATCH bpf-next v3 10/15] xsk: add umem completion queue support and mmap Björn Töpel
2018-05-02 11:01 ` [PATCH bpf-next v3 11/15] xsk: add Tx queue setup and mmap support Björn Töpel
2018-05-02 11:01 ` [PATCH bpf-next v3 12/15] dev: packet: make packet_direct_xmit a common function Björn Töpel
2018-05-02 11:01 ` [PATCH bpf-next v3 13/15] xsk: support for Tx Björn Töpel
2018-05-02 11:01 ` [PATCH bpf-next v3 14/15] xsk: statistics support Björn Töpel
2018-05-02 11:01 ` [PATCH bpf-next v3 15/15] samples/bpf: sample application and documentation for AF_XDP sockets Björn Töpel
2018-05-02 20:59   ` Jesper Dangaard Brouer
2018-05-03 13:55 ` [PATCH bpf-next v3 00/15] Introducing AF_XDP support Willem de Bruijn
2018-05-03 15:07 ` David Miller
2018-05-03 22:49 ` Daniel Borkmann
2018-05-03 23:38   ` Alexei Starovoitov [this message]
2018-05-04 11:22     ` Magnus Karlsson
2018-05-05  0:34       ` Alexei Starovoitov
2018-05-07  9:13         ` Magnus Karlsson
2018-05-07 13:09           ` Jesper Dangaard Brouer
2018-05-07 19:47             ` Björn Töpel
2018-05-17  6:46     ` Björn Töpel
2018-05-18  3:38       ` Alexei Starovoitov
2018-05-18 13:43         ` Daniel Borkmann
2018-05-18 15:18           ` Björn Töpel
2018-05-18 16:17             ` Daniel Borkmann
2018-05-18 16:32               ` Björn Töpel

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=20180503233819.2tplfjd32auudys2@ast-mbp \
    --to=alexei.starovoitov@gmail.com \
    --cc=alexander.duyck@gmail.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=anjali.singhai@intel.com \
    --cc=ast@fb.com \
    --cc=bjorn.topel@gmail.com \
    --cc=bjorn.topel@intel.com \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.fastabend@gmail.com \
    --cc=magnus.karlsson@intel.com \
    --cc=michael.lundkvist@ericsson.com \
    --cc=mst@redhat.com \
    --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