From: John Fastabend <john.fastabend@gmail.com>
To: Lorenzo Bianconi <lorenzo@kernel.org>, netdev@vger.kernel.org
Cc: bpf@vger.kernel.org, davem@davemloft.net,
lorenzo.bianconi@redhat.com, brouer@redhat.com,
echaudro@redhat.com, sameehj@amazon.com, kuba@kernel.org,
john.fastabend@gmail.com, daniel@iogearbox.net, ast@kernel.org,
shayagr@amazon.com
Subject: RE: [PATCH v2 net-next 0/9] mvneta: introduce XDP multi-buffer support
Date: Thu, 03 Sep 2020 22:41:26 -0700 [thread overview]
Message-ID: <5f51d3869b4a4_3eceb20847@john-XPS-13-9370.notmuch> (raw)
In-Reply-To: <cover.1599165031.git.lorenzo@kernel.org>
Lorenzo Bianconi wrote:
> - Finalize XDP multi-buffer support for mvneta driver introducing the
> capability to map non-linear buffers on tx side.
> - Introduce multi-buffer bit (mb) in xdp_frame/xdp_buffer to specify if
> shared_info area has been properly initialized.
> - Initialize multi-buffer bit (mb) to 0 in all XDP-capable drivers.
> - Add multi-buff support to xdp_return_{buff/frame} utility routines.
> - Introduce bpf_xdp_adjust_mb_header helper to adjust frame headers moving
> *offset* bytes from/to the second buffer to/from the first one.
> This helper can be used to move headers when the hw DMA SG is not able
> to copy all the headers in the first fragment and split header and data
> pages. A possible use case for bpf_xdp_adjust_mb_header is described
> here [0]
Are those slides available anywhere? [0] is just a link to the abstract.
> - Introduce bpf_xdp_get_frag_count and bpf_xdp_get_frags_total_size helpers to
> report the total number/size of frags for a given xdp multi-buff.
>
> XDP multi-buffer design principles are described here [1]
> For the moment we have not implemented any self-test for the introduced the bpf
> helpers. We can address this in a follow up series if the proposed approach
> is accepted.
Will need to include selftests with series.
>
> Changes since v1:
> - Fix use-after-free in xdp_return_{buff/frame}
> - Introduce bpf helpers
> - Introduce xdp_mb sample program
> - access skb_shared_info->nr_frags only on the last fragment
>
> Changes since RFC:
> - squash multi-buffer bit initialization in a single patch
> - add mvneta non-linear XDP buff support for tx side
>
> [0] https://netdevconf.info/0x14/session.html?talk-the-path-to-tcp-4k-mtu-and-rx-zerocopy
> [1] https://github.com/xdp-project/xdp-project/blob/master/areas/core/xdp-multi-buffer01-design.org
>
> Lorenzo Bianconi (7):
> xdp: introduce mb in xdp_buff/xdp_frame
> xdp: initialize xdp_buff mb bit to 0 in all XDP drivers
> net: mvneta: update mb bit before passing the xdp buffer to eBPF layer
> xdp: add multi-buff support to xdp_return_{buff/frame}
> net: mvneta: add multi buffer support to XDP_TX
> bpf: helpers: add bpf_xdp_adjust_mb_header helper
> net: mvneta: enable jumbo frames for XDP
>
> Sameeh Jubran (2):
> bpf: helpers: add multibuffer support
> samples/bpf: add bpf program that uses xdp mb helpers
>
> drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 +
> drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 1 +
> .../net/ethernet/cavium/thunder/nicvf_main.c | 1 +
> .../net/ethernet/freescale/dpaa2/dpaa2-eth.c | 1 +
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 1 +
> drivers/net/ethernet/intel/ice/ice_txrx.c | 1 +
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 1 +
> .../net/ethernet/intel/ixgbevf/ixgbevf_main.c | 1 +
> drivers/net/ethernet/marvell/mvneta.c | 126 ++++++------
> .../net/ethernet/marvell/mvpp2/mvpp2_main.c | 1 +
> drivers/net/ethernet/mellanox/mlx4/en_rx.c | 1 +
> .../net/ethernet/mellanox/mlx5/core/en_rx.c | 1 +
> .../ethernet/netronome/nfp/nfp_net_common.c | 1 +
> drivers/net/ethernet/qlogic/qede/qede_fp.c | 1 +
> drivers/net/ethernet/sfc/rx.c | 1 +
> drivers/net/ethernet/socionext/netsec.c | 1 +
> drivers/net/ethernet/ti/cpsw.c | 1 +
> drivers/net/ethernet/ti/cpsw_new.c | 1 +
> drivers/net/hyperv/netvsc_bpf.c | 1 +
> drivers/net/tun.c | 2 +
> drivers/net/veth.c | 1 +
> drivers/net/virtio_net.c | 2 +
> drivers/net/xen-netfront.c | 1 +
> include/net/xdp.h | 26 ++-
> include/uapi/linux/bpf.h | 39 +++-
> net/core/dev.c | 1 +
> net/core/filter.c | 93 +++++++++
> net/core/xdp.c | 40 ++++
> samples/bpf/Makefile | 3 +
> samples/bpf/xdp_mb_kern.c | 68 +++++++
> samples/bpf/xdp_mb_user.c | 182 ++++++++++++++++++
> tools/include/uapi/linux/bpf.h | 40 +++-
> 32 files changed, 572 insertions(+), 70 deletions(-)
> create mode 100644 samples/bpf/xdp_mb_kern.c
> create mode 100644 samples/bpf/xdp_mb_user.c
>
> --
> 2.26.2
>
next prev parent reply other threads:[~2020-09-04 5:41 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 20:58 [PATCH v2 net-next 0/9] mvneta: introduce XDP multi-buffer support Lorenzo Bianconi
2020-09-03 20:58 ` [PATCH v2 net-next 1/9] xdp: introduce mb in xdp_buff/xdp_frame Lorenzo Bianconi
2020-09-04 1:07 ` Alexei Starovoitov
2020-09-04 7:19 ` Jesper Dangaard Brouer
2020-09-04 15:15 ` David Ahern
2020-09-04 15:59 ` Jesper Dangaard Brouer
2020-09-04 16:30 ` David Ahern
2020-09-07 18:02 ` Jesper Dangaard Brouer
2020-09-08 1:22 ` David Ahern
2020-09-03 20:58 ` [PATCH v2 net-next 2/9] xdp: initialize xdp_buff mb bit to 0 in all XDP drivers Lorenzo Bianconi
2020-09-04 7:35 ` Jesper Dangaard Brouer
2020-09-04 7:54 ` Lorenzo Bianconi
2020-09-03 20:58 ` [PATCH v2 net-next 3/9] net: mvneta: update mb bit before passing the xdp buffer to eBPF layer Lorenzo Bianconi
2020-09-06 7:33 ` Shay Agroskin
2020-09-06 9:05 ` Lorenzo Bianconi
2020-09-03 20:58 ` [PATCH v2 net-next 4/9] xdp: add multi-buff support to xdp_return_{buff/frame} Lorenzo Bianconi
2020-09-03 20:58 ` [PATCH v2 net-next 5/9] net: mvneta: add multi buffer support to XDP_TX Lorenzo Bianconi
2020-09-06 7:20 ` Shay Agroskin
2020-09-06 8:43 ` Lorenzo Bianconi
2020-09-03 20:58 ` [PATCH v2 net-next 6/9] bpf: helpers: add bpf_xdp_adjust_mb_header helper Lorenzo Bianconi
2020-09-04 1:09 ` Alexei Starovoitov
2020-09-04 8:07 ` Lorenzo Bianconi
2020-09-04 1:13 ` Alexei Starovoitov
2020-09-04 7:50 ` Lorenzo Bianconi
2020-09-04 13:52 ` Jesper Dangaard Brouer
2020-09-04 14:27 ` Lorenzo Bianconi
2020-09-04 6:47 ` John Fastabend
2020-09-04 9:45 ` Lorenzo Bianconi
2020-09-04 15:23 ` John Fastabend
2020-09-06 13:36 ` Lorenzo Bianconi
2020-09-08 19:57 ` John Fastabend
2020-09-08 21:31 ` Lorenzo Bianconi
2020-09-09 20:51 ` Lorenzo Bianconi
2020-09-03 20:58 ` [PATCH v2 net-next 7/9] bpf: helpers: add multibuffer support Lorenzo Bianconi
2020-09-03 21:24 ` Maciej Fijalkowski
2020-09-04 9:47 ` Lorenzo Bianconi
2020-09-03 20:58 ` [PATCH v2 net-next 8/9] samples/bpf: add bpf program that uses xdp mb helpers Lorenzo Bianconi
2020-09-03 20:58 ` [PATCH v2 net-next 9/9] net: mvneta: enable jumbo frames for XDP Lorenzo Bianconi
2020-09-04 1:08 ` [PATCH v2 net-next 0/9] mvneta: introduce XDP multi-buffer support Alexei Starovoitov
2020-09-04 7:40 ` Lorenzo Bianconi
2020-09-04 5:41 ` John Fastabend [this message]
2020-09-04 7:39 ` Lorenzo Bianconi
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=5f51d3869b4a4_3eceb20847@john-XPS-13-9370.notmuch \
--to=john.fastabend@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=echaudro@redhat.com \
--cc=kuba@kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sameehj@amazon.com \
--cc=shayagr@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 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).