bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net
Cc: netdev@vger.kernel.org, magnus.karlsson@intel.com,
	bjorn@kernel.org,
	Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Subject: [PATCH bpf-next 00/10] AF_XDP ZC selftests
Date: Fri, 10 Jun 2022 17:09:13 +0200	[thread overview]
Message-ID: <20220610150923.583202-1-maciej.fijalkowski@intel.com> (raw)

Hi!

This set makes it possible to test ice driver with test suite that
xdpxceiver provides. In order to do it, device needs to be turned on to
loopback mode, so in first patch knob is introduced that allows user to
toggle loopback mode. Furthermore, ethtool's loopback test is fixed for
ice (patch 2 and 3). Besides turning device into loopback mode, I was
limiting queue count to 1, so that none of the steering filters are
needed.

Rest of the work is related to xdpxceiver. Currently it is assumed that
underlying device supports native XDP. It is true for veth, but might
not be for other device that might be used with xdpxceiver once this
patch set land. So, patch 4 adds a logic to find out if underlying
device supports XDP so that TEST_MODE_DRV can be used for test suite.
Patch 5 restores close() on netns fd that was removed by accident.

In patch 6, default Rx pkt stream is added so physical device testing
will be able to use shared UMEM in a way that Tx will utilize first half
of buffer space and Rx second one. Then, patch 7 adds support for running
xdpxceiver on physical devices.

Patch 8 and 9 prepares xdpxceiver to address ZC drivers that clean
lazily Tx descriptors (and therefore produce XSK descs to CQ) so that
pacing algorithm works fine.

Patch 10 finally adds new TEST_MODE_ZC for testing zero copy AF_XDP
driver support.

This work already allowed us to spot and fix two bugs in AF_XDP kernel
side ([0], [1]).

[0]: https://lore.kernel.org/bpf/20220425153745.481322-1-maciej.fijalkowski@intel.com/
[1]: https://lore.kernel.org/bpf/20220607142200.576735-1-maciej.fijalkowski@intel.com/

Thank you.


Maciej Fijalkowski (10):
  ice: introduce priv-flag for toggling loopback mode
  ice: check DD bit on Rx descriptor rather than (EOP | RS)
  ice: do not setup vlan for loopback VSI
  selftests: xsk: query for native XDP support
  selftests: xsk: add missing close() on netns fd
  selftests: xsk: introduce default Rx pkt stream
  selftests: xsk: add support for executing tests on physical device
  selftests: xsk: rely on pkts_in_flight in wait_for_tx_completion()
  selftests: xsk: remove struct xsk_socket_info::outstanding_tx
  selftests: xsk: add support for zero copy testing

 drivers/net/ethernet/intel/ice/ice.h         |   1 +
 drivers/net/ethernet/intel/ice/ice_ethtool.c |  19 +-
 drivers/net/ethernet/intel/ice/ice_main.c    |   8 +-
 tools/testing/selftests/bpf/test_xsk.sh      |  52 ++-
 tools/testing/selftests/bpf/xdpxceiver.c     | 404 +++++++++++++------
 tools/testing/selftests/bpf/xdpxceiver.h     |  10 +-
 6 files changed, 352 insertions(+), 142 deletions(-)

-- 
2.27.0


             reply	other threads:[~2022-06-10 15:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 15:09 Maciej Fijalkowski [this message]
2022-06-10 15:09 ` [PATCH bpf-next 01/10] ice: introduce priv-flag for toggling loopback mode Maciej Fijalkowski
2022-06-10 15:22   ` Alexander Lobakin
2022-06-10 15:09 ` [PATCH bpf-next 02/10] ice: check DD bit on Rx descriptor rather than (EOP | RS) Maciej Fijalkowski
2022-06-10 15:09 ` [PATCH bpf-next 03/10] ice: do not setup vlan for loopback VSI Maciej Fijalkowski
2022-06-10 15:09 ` [PATCH bpf-next 04/10] selftests: xsk: query for native XDP support Maciej Fijalkowski
2022-06-13  9:47   ` Magnus Karlsson
2022-06-10 15:09 ` [PATCH bpf-next 05/10] selftests: xsk: add missing close() on netns fd Maciej Fijalkowski
2022-06-13  9:48   ` Magnus Karlsson
2022-06-10 15:09 ` [PATCH bpf-next 06/10] selftests: xsk: introduce default Rx pkt stream Maciej Fijalkowski
2022-06-13  9:52   ` Magnus Karlsson
2022-06-10 15:09 ` [PATCH bpf-next 07/10] selftests: xsk: add support for executing tests on physical device Maciej Fijalkowski
2022-06-13 11:29   ` Magnus Karlsson
2022-06-10 15:09 ` [PATCH bpf-next 08/10] selftests: xsk: rely on pkts_in_flight in wait_for_tx_completion() Maciej Fijalkowski
2022-06-13 11:31   ` Magnus Karlsson
2022-06-10 15:09 ` [PATCH bpf-next 09/10] selftests: xsk: remove struct xsk_socket_info::outstanding_tx Maciej Fijalkowski
2022-06-13 11:32   ` Magnus Karlsson
2022-06-10 15:09 ` [PATCH bpf-next 10/10] selftests: xsk: add support for zero copy testing Maciej Fijalkowski
2022-06-13 11:37   ` Magnus Karlsson

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=20220610150923.583202-1-maciej.fijalkowski@intel.com \
    --to=maciej.fijalkowski@intel.com \
    --cc=ast@kernel.org \
    --cc=bjorn@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=magnus.karlsson@intel.com \
    --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).