bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 00/10] xsk: Support UMEM chunk_size > PAGE_SIZE
@ 2023-03-29 18:04 Kal Conley
  2023-03-29 18:04 ` [PATCH bpf-next v2 01/10] selftests: xsk: Add xskxceiver.h dependency to Makefile Kal Conley
                   ` (9 more replies)
  0 siblings, 10 replies; 27+ messages in thread
From: Kal Conley @ 2023-03-29 18:04 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, David S. Miller,
	Jakub Kicinski, Jesper Dangaard Brouer, John Fastabend
  Cc: Kal Conley, netdev, bpf

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


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2023-04-04 12:54 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-29 18:04 [PATCH bpf-next v2 00/10] xsk: Support UMEM chunk_size > PAGE_SIZE Kal Conley
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

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).