netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 bpf-next 00/10] AF_XDP ZC selftests
@ 2022-06-16 18:05 Maciej Fijalkowski
  2022-06-16 18:06 ` [PATCH v4 bpf-next 01/10] ice: compress branches in ice_set_features() Maciej Fijalkowski
                   ` (9 more replies)
  0 siblings, 10 replies; 27+ messages in thread
From: Maciej Fijalkowski @ 2022-06-16 18:05 UTC (permalink / raw)
  To: bpf, ast, daniel; +Cc: netdev, magnus.karlsson, bjorn, kuba, Maciej Fijalkowski

v3->v4:
* use ice_{down,up} rather than ice_{stop,open} and check retvals
  when toggling loopback mode (Jakub)
* Remove patch that was throwing away xsk->outstanding_tx (Magnus)

v2->v3:
* split loopback patch to ice_set_features() refactor part and other
  part with actual loopback toggling support (Alexandr)
* collect more acks from Magnus

v1->v2:
* collect acks from Magnus
* drop redundant 'ret' variable in patch 4 (Magnus)
* drop redundant assignments to ifobject->xdp_flags in patch 10 (Magnus)
* use NETIF_F_LOOPBACK instead of introducing priv-flag (Alexandr)

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 ice_set_features() is refactored and
then in second patch NETIF_F_LOOPBACK support is added to it.
Furthermore, ethtool's loopback test is fixed for ice (patch 3 and 4).
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 6 restores close() on netns fd that was removed by accident.

In patch 7, 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 8 adds support for running
xdpxceiver on physical devices.

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

v1 is here [2].
v2 is here [3].
v3 is here [4].

[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/
[2]: https://lore.kernel.org/bpf/20220610150923.583202-1-maciej.fijalkowski@intel.com/
[3]: https://lore.kernel.org/bpf/20220614174749.901044-1-maciej.fijalkowski@intel.com/
[4]: https://lore.kernel.org/bpf/20220615161041.902916-1-maciej.fijalkowski@intel.com/

Thank you.


Maciej Fijalkowski (10):
  ice: compress branches in ice_set_features()
  ice: allow toggling loopback mode via ndo_set_features callback
  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: add support for zero copy testing

 drivers/net/ethernet/intel/ice/ice_ethtool.c |   2 +-
 drivers/net/ethernet/intel/ice/ice_main.c    |  81 ++--
 tools/testing/selftests/bpf/test_xsk.sh      |  52 ++-
 tools/testing/selftests/bpf/xdpxceiver.c     | 380 ++++++++++++++-----
 tools/testing/selftests/bpf/xdpxceiver.h     |   9 +-
 5 files changed, 378 insertions(+), 146 deletions(-)

-- 
2.27.0


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

end of thread, other threads:[~2022-06-20 16:36 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-16 18:05 [PATCH v4 bpf-next 00/10] AF_XDP ZC selftests Maciej Fijalkowski
2022-06-16 18:06 ` [PATCH v4 bpf-next 01/10] ice: compress branches in ice_set_features() Maciej Fijalkowski
2022-06-18  1:46   ` John Fastabend
2022-06-20  9:48     ` Maciej Fijalkowski
2022-06-16 18:06 ` [PATCH v4 bpf-next 02/10] ice: allow toggling loopback mode via ndo_set_features callback Maciej Fijalkowski
2022-06-16 18:21   ` Jakub Kicinski
2022-06-18  1:57   ` John Fastabend
2022-06-20  9:52     ` Maciej Fijalkowski
2022-06-16 18:06 ` [PATCH v4 bpf-next 03/10] ice: check DD bit on Rx descriptor rather than (EOP | RS) Maciej Fijalkowski
2022-06-18  1:58   ` John Fastabend
2022-06-20 10:53     ` Maciej Fijalkowski
2022-06-16 18:06 ` [PATCH v4 bpf-next 04/10] ice: do not setup vlan for loopback VSI Maciej Fijalkowski
2022-06-18  2:01   ` John Fastabend
2022-06-16 18:06 ` [PATCH v4 bpf-next 05/10] selftests: xsk: query for native XDP support Maciej Fijalkowski
2022-06-18  2:12   ` John Fastabend
2022-06-20 10:55     ` Maciej Fijalkowski
2022-06-16 18:06 ` [PATCH v4 bpf-next 06/10] selftests: xsk: add missing close() on netns fd Maciej Fijalkowski
2022-06-18  2:14   ` John Fastabend
2022-06-16 18:06 ` [PATCH v4 bpf-next 07/10] selftests: xsk: introduce default Rx pkt stream Maciej Fijalkowski
2022-06-18  2:41   ` John Fastabend
2022-06-20  8:41     ` Magnus Karlsson
2022-06-16 18:06 ` [PATCH v4 bpf-next 08/10] selftests: xsk: add support for executing tests on physical device Maciej Fijalkowski
2022-06-16 18:06 ` [PATCH v4 bpf-next 09/10] selftests: xsk: rely on pkts_in_flight in wait_for_tx_completion() Maciej Fijalkowski
2022-06-18  2:56   ` John Fastabend
2022-06-20 12:02     ` Maciej Fijalkowski
2022-06-20 16:36       ` John Fastabend
2022-06-16 18:06 ` [PATCH v4 bpf-next 10/10] selftests: xsk: add support for zero copy testing Maciej Fijalkowski

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