From: Maxim Mikityanskiy <maximmi@mellanox.com>
To: "Alexei Starovoitov" <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Björn Töpel" <bjorn.topel@intel.com>,
"Magnus Karlsson" <magnus.karlsson@intel.com>
Cc: "bpf@vger.kernel.org" <bpf@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Saeed Mahameed <saeedm@mellanox.com>, Jonathan Lemon <bsd@fb.com>,
Tariq Toukan <tariqt@mellanox.com>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>,
Jakub Kicinski <jakub.kicinski@netronome.com>,
Maciej Fijalkowski <maciejromanfijalkowski@gmail.com>,
Maxim Mikityanskiy <maximmi@mellanox.com>
Subject: [PATCH bpf-next v2 00/16] AF_XDP infrastructure improvements and mlx5e support
Date: Tue, 30 Apr 2019 18:12:32 +0000 [thread overview]
Message-ID: <20190430181215.15305-1-maximmi@mellanox.com> (raw)
This series contains improvements to the AF_XDP kernel infrastructure
and AF_XDP support in mlx5e. The infrastructure improvements are
required for mlx5e, but also some of them benefit to all drivers, and
some can be useful for other drivers that want to implement AF_XDP.
The performance testing was performed on a machine with the following
configuration:
- 24 cores of Intel Xeon E5-2620 v3 @ 2.40 GHz
- Mellanox ConnectX-5 Ex with 100 Gbit/s link
The results with retpoline disabled, single stream:
txonly: 33.3 Mpps (21.5 Mpps with queue and app pinned to the same CPU)
rxdrop: 12.2 Mpps
l2fwd: 9.4 Mpps
The results with retpoline enabled, single stream:
txonly: 21.3 Mpps (14.1 Mpps with queue and app pinned to the same CPU)
rxdrop: 9.9 Mpps
l2fwd: 6.8 Mpps
v2 changes:
Added patches for mlx5e and addressed the comments for v1. Rebased for
bpf-next (net-next has to be merged first, because this series depends
on some patches from there).
Maxim Mikityanskiy (16):
xsk: Add API to check for available entries in FQ
xsk: Add getsockopt XDP_OPTIONS
libbpf: Support getsockopt XDP_OPTIONS
xsk: Extend channels to support combined XSK/non-XSK traffic
xsk: Change the default frame size to 4096 and allow controlling it
xsk: Return the whole xdp_desc from xsk_umem_consume_tx
net/mlx5e: Replace deprecated PCI_DMA_TODEVICE
net/mlx5e: Calculate linear RX frag size considering XSK
net/mlx5e: Allow ICO SQ to be used by multiple RQs
net/mlx5e: Refactor struct mlx5e_xdp_info
net/mlx5e: Share the XDP SQ for XDP_TX between RQs
net/mlx5e: XDP_TX from UMEM support
net/mlx5e: Consider XSK in XDP MTU limit calculation
net/mlx5e: Encapsulate open/close queues into a function
net/mlx5e: Move queue param structs to en/params.h
net/mlx5e: Add XSK support
drivers/net/ethernet/intel/i40e/i40e_xsk.c | 12 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 15 +-
.../net/ethernet/mellanox/mlx5/core/Makefile | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en.h | 147 +++-
.../ethernet/mellanox/mlx5/core/en/params.c | 108 ++-
.../ethernet/mellanox/mlx5/core/en/params.h | 87 ++-
.../net/ethernet/mellanox/mlx5/core/en/xdp.c | 231 ++++--
.../net/ethernet/mellanox/mlx5/core/en/xdp.h | 36 +-
.../mellanox/mlx5/core/en/xsk/Makefile | 1 +
.../ethernet/mellanox/mlx5/core/en/xsk/rx.c | 192 +++++
.../ethernet/mellanox/mlx5/core/en/xsk/rx.h | 27 +
.../mellanox/mlx5/core/en/xsk/setup.c | 220 ++++++
.../mellanox/mlx5/core/en/xsk/setup.h | 25 +
.../ethernet/mellanox/mlx5/core/en/xsk/tx.c | 108 +++
.../ethernet/mellanox/mlx5/core/en/xsk/tx.h | 15 +
.../ethernet/mellanox/mlx5/core/en/xsk/umem.c | 252 +++++++
.../ethernet/mellanox/mlx5/core/en/xsk/umem.h | 34 +
.../ethernet/mellanox/mlx5/core/en_ethtool.c | 21 +-
.../mellanox/mlx5/core/en_fs_ethtool.c | 44 +-
.../net/ethernet/mellanox/mlx5/core/en_main.c | 680 +++++++++++-------
.../net/ethernet/mellanox/mlx5/core/en_rep.c | 12 +-
.../net/ethernet/mellanox/mlx5/core/en_rx.c | 104 ++-
.../ethernet/mellanox/mlx5/core/en_stats.c | 115 ++-
.../ethernet/mellanox/mlx5/core/en_stats.h | 30 +
.../net/ethernet/mellanox/mlx5/core/en_txrx.c | 42 +-
.../ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 14 +-
drivers/net/ethernet/mellanox/mlx5/core/wq.h | 5 -
include/net/xdp_sock.h | 27 +-
include/uapi/linux/if_xdp.h | 18 +
net/xdp/xsk.c | 43 +-
net/xdp/xsk_queue.h | 14 +
samples/bpf/xdpsock_user.c | 52 +-
tools/include/uapi/linux/if_xdp.h | 18 +
tools/lib/bpf/xsk.c | 127 +++-
tools/lib/bpf/xsk.h | 6 +-
35 files changed, 2384 insertions(+), 500 deletions(-)
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/xsk/Makefile
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.h
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.h
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/xsk/tx.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/xsk/tx.h
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/xsk/umem.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/xsk/umem.h
--
2.19.1
next reply other threads:[~2019-04-30 18:12 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-30 18:12 Maxim Mikityanskiy [this message]
2019-04-30 18:12 ` [PATCH bpf-next v2 01/16] xsk: Add API to check for available entries in FQ Maxim Mikityanskiy
2019-04-30 18:12 ` [PATCH bpf-next v2 02/16] xsk: Add getsockopt XDP_OPTIONS Maxim Mikityanskiy
2019-05-04 17:25 ` Björn Töpel
2019-05-06 13:45 ` Maxim Mikityanskiy
2019-05-06 16:35 ` Alexei Starovoitov
2019-04-30 18:12 ` [PATCH bpf-next v2 03/16] libbpf: Support " Maxim Mikityanskiy
2019-04-30 18:12 ` [PATCH bpf-next v2 04/16] xsk: Extend channels to support combined XSK/non-XSK traffic Maxim Mikityanskiy
2019-05-04 17:26 ` Björn Töpel
2019-05-06 13:45 ` Maxim Mikityanskiy
2019-05-06 14:23 ` Magnus Karlsson
2019-05-07 14:19 ` Maxim Mikityanskiy
2019-05-08 13:06 ` Magnus Karlsson
2019-05-13 14:52 ` Maxim Mikityanskiy
2019-04-30 18:12 ` [PATCH bpf-next v2 05/16] xsk: Change the default frame size to 4096 and allow controlling it Maxim Mikityanskiy
2019-04-30 18:12 ` [PATCH bpf-next v2 06/16] xsk: Return the whole xdp_desc from xsk_umem_consume_tx Maxim Mikityanskiy
2019-04-30 18:12 ` [PATCH bpf-next v2 07/16] net/mlx5e: Replace deprecated PCI_DMA_TODEVICE Maxim Mikityanskiy
2019-04-30 18:12 ` [PATCH bpf-next v2 08/16] net/mlx5e: Calculate linear RX frag size considering XSK Maxim Mikityanskiy
2019-04-30 18:12 ` [PATCH bpf-next v2 09/16] net/mlx5e: Allow ICO SQ to be used by multiple RQs Maxim Mikityanskiy
2019-04-30 18:12 ` [PATCH bpf-next v2 10/16] net/mlx5e: Refactor struct mlx5e_xdp_info Maxim Mikityanskiy
2019-04-30 18:12 ` [PATCH bpf-next v2 11/16] net/mlx5e: Share the XDP SQ for XDP_TX between RQs Maxim Mikityanskiy
2019-04-30 18:13 ` [PATCH bpf-next v2 12/16] net/mlx5e: XDP_TX from UMEM support Maxim Mikityanskiy
2019-04-30 18:13 ` [PATCH bpf-next v2 13/16] net/mlx5e: Consider XSK in XDP MTU limit calculation Maxim Mikityanskiy
2019-04-30 18:13 ` [PATCH bpf-next v2 14/16] net/mlx5e: Encapsulate open/close queues into a function Maxim Mikityanskiy
2019-04-30 18:13 ` [PATCH bpf-next v2 15/16] net/mlx5e: Move queue param structs to en/params.h Maxim Mikityanskiy
2019-04-30 18:13 ` [PATCH bpf-next v2 16/16] net/mlx5e: Add XSK support Maxim Mikityanskiy
2019-05-04 17:25 ` [PATCH bpf-next v2 00/16] AF_XDP infrastructure improvements and mlx5e support 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=20190430181215.15305-1-maximmi@mellanox.com \
--to=maximmi@mellanox.com \
--cc=ast@kernel.org \
--cc=bjorn.topel@intel.com \
--cc=bpf@vger.kernel.org \
--cc=bsd@fb.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=jakub.kicinski@netronome.com \
--cc=kafai@fb.com \
--cc=maciejromanfijalkowski@gmail.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=songliubraving@fb.com \
--cc=tariqt@mellanox.com \
--cc=yhs@fb.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).