bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kal Conley <kal.conley@dectris.com>
To: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>
Cc: Kal Conley <kal.conley@dectris.com>,
	netdev@vger.kernel.org, bpf@vger.kernel.org
Subject: [PATCH bpf-next v2 00/10] xsk: Support UMEM chunk_size > PAGE_SIZE
Date: Wed, 29 Mar 2023 20:04:52 +0200	[thread overview]
Message-ID: <20230329180502.1884307-1-kal.conley@dectris.com> (raw)

The main purpose of this patchset is to add AF_XDP support for UMEM
chunk sizes > PAGE_SIZE. This is enabled for UMEMs backed by HugeTLB
pages.

The patchset starts off with many fixes and improvements to the XSK
selftests. Next, an existing issue is fixed whereby unaligned
descriptors may overrun the end of the UMEM in certain cases. Finally,
AF_XDP support for UMEM chunk_size > PAGE_SIZE is added.

v2 contains major improvements over v1. It should be both a joy to read
and review. :-)

Changes since v1:
  * Add many fixes/improvements to the XSK selftests.
  * Add check for unaligned descriptors that overrun UMEM.
  * Fix compile errors when CONFIG_HUGETLB_PAGE is not set.
  * Fix incorrect use of _Static_assert.
  * Update AF_XDP documentation.
  * Rename unaligned 9K frame size test.
  * Make xp_check_dma_contiguity less conservative.
  * Add more information to benchmark table.

Thanks to Magnus Karlsson for his initial feedback!

Kal Conley (10):
  selftests: xsk: Add xskxceiver.h dependency to Makefile
  selftests: xsk: Use correct UMEM size in testapp_invalid_desc
  selftests: xsk: Add test case for packets at end of UMEM
  selftests: xsk: Deflakify STATS_RX_DROPPED test
  selftests: xsk: Disable IPv6 on VETH1
  xsk: Add check for unaligned descriptors that overrun UMEM
  selftests: xsk: Add test UNALIGNED_INV_DESC_4K1_FRAME_SIZE
  xsk: Support UMEM chunk_size > PAGE_SIZE
  selftests: xsk: Use hugepages when umem->frame_size > PAGE_SIZE
  selftests: xsk: Add tests for 8K and 9K frame sizes

 Documentation/networking/af_xdp.rst      | 19 ++++--
 include/net/xdp_sock.h                   |  3 +
 include/net/xdp_sock_drv.h               | 12 ++++
 include/net/xsk_buff_pool.h              | 24 +++++---
 net/xdp/xdp_umem.c                       | 50 ++++++++++++---
 net/xdp/xsk_buff_pool.c                  | 34 +++++++----
 net/xdp/xsk_queue.h                      |  1 +
 tools/testing/selftests/bpf/Makefile     |  2 +-
 tools/testing/selftests/bpf/test_xsk.sh  |  1 +
 tools/testing/selftests/bpf/xskxceiver.c | 77 +++++++++++++++++++++---
 tools/testing/selftests/bpf/xskxceiver.h |  4 +-
 11 files changed, 183 insertions(+), 44 deletions(-)

-- 
2.39.2


             reply	other threads:[~2023-03-29 18:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29 18:04 Kal Conley [this message]
2023-03-29 18:04 ` [PATCH bpf-next v2 01/10] selftests: xsk: Add xskxceiver.h dependency to Makefile Kal Conley
2023-03-29 18:04 ` [PATCH bpf-next v2 02/10] selftests: xsk: Use correct UMEM size in testapp_invalid_desc Kal Conley
2023-03-29 18:04 ` [PATCH bpf-next v2 03/10] selftests: xsk: Add test case for packets at end of UMEM Kal Conley
2023-03-29 18:04 ` [PATCH bpf-next v2 04/10] selftests: xsk: Deflakify STATS_RX_DROPPED test Kal Conley
2023-04-03 10:54   ` Magnus Karlsson
2023-04-03 11:06     ` Kal Cutter Conley
2023-04-03 11:40       ` Kal Cutter Conley
2023-04-03 11:38         ` Magnus Karlsson
2023-04-03 11:47           ` Kal Cutter Conley
2023-03-29 18:04 ` [PATCH bpf-next v2 05/10] selftests: xsk: Disable IPv6 on VETH1 Kal Conley
2023-03-29 18:04 ` [PATCH bpf-next v2 06/10] xsk: Add check for unaligned descriptors that overrun UMEM Kal Conley
2023-04-03 12:23   ` Magnus Karlsson
2023-04-03 12:50     ` Kal Cutter Conley
2023-03-29 18:04 ` [PATCH bpf-next v2 07/10] selftests: xsk: Add test UNALIGNED_INV_DESC_4K1_FRAME_SIZE Kal Conley
2023-04-03 12:25   ` Magnus Karlsson
2023-03-29 18:05 ` [PATCH bpf-next v2 08/10] xsk: Support UMEM chunk_size > PAGE_SIZE Kal Conley
2023-04-04  7:39   ` Magnus Karlsson
2023-04-04  8:20     ` Kal Cutter Conley
2023-04-04  9:29       ` Magnus Karlsson
2023-04-04 10:33         ` Kal Cutter Conley
2023-04-04 11:14           ` Magnus Karlsson
2023-04-04 12:18             ` Kal Cutter Conley
2023-04-04 12:37               ` Kal Cutter Conley
2023-04-04 12:54                 ` Magnus Karlsson
2023-03-29 18:05 ` [PATCH bpf-next v2 09/10] selftests: xsk: Use hugepages when umem->frame_size " Kal Conley
2023-03-29 18:05 ` [PATCH bpf-next v2 10/10] selftests: xsk: Add tests for 8K and 9K frame sizes Kal Conley

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=20230329180502.1884307-1-kal.conley@dectris.com \
    --to=kal.conley@dectris.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --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).