>From the first days of XDP implementation in idpf, it relied and
worked solely on top of the queue-based scheduling Tx mode, which
basically means simple FIFO. However, turned out not every firmware
supports this mode and XDP doesn't work there at all.
First, fix two already existing issues found by Sashiko, then
introduce the flow-based fallback for all XDP paths which is always
supported by any FW. The actual implementation is selected during
XDP program setup basing on the caps that the FW advertises, so
that firmwares that already work correctly won't get performance
regressions the fallback brings.
Alexander Lobakin (3):
idpf: always reserve one empty descriptor on XDPSQs
idpf: enforce strict ordering on BE when reading XDPCQEs
idpf: add flow-based XDP fallback for FWs without Tx FIFO support
drivers/net/ethernet/intel/idpf/idpf_txrx.h | 18 ++-
drivers/net/ethernet/intel/idpf/xdp.h | 60 ++++++++
include/net/libeth/xdp.h | 13 ++
drivers/net/ethernet/intel/idpf/idpf_txrx.c | 19 ++-
drivers/net/ethernet/intel/idpf/xdp.c | 152 ++++++++++++++++++--
drivers/net/ethernet/intel/idpf/xsk.c | 2 +-
6 files changed, 242 insertions(+), 22 deletions(-)
---
>From v2[0]:
* new fix (0001): fix already existing issue with not reserving
a required free Tx descriptor in case of XDP Tx, xmit, and XSk Tx
(Sashiko);
* new fix (0002): enforce strict ordering when parsing XDPCQEs on
Big Endian (Intel's Sashiko);
* rewrite the bitmap set-reset implementation from scratch to fix
fix S/G: HW generates a completion per packet, not per descriptor
(Sashiko);
* fix excessive allocations, possible pointer overwrites, and corner
case static key imbalance when setting up XDPSQs (Intel's Sashiko).
>From v1[1]:
* rework static key management: move to idpf_xdpsqs_{get,put}() to
avoid refcount imbalance issues as .ndo_bpf() is not always called
in pairs (hardware reset etc.) (Sashiko, Intel's Sashiko);
* don't zero the whole pending window but only the frames sent since
the last batch to avoid missed OOO completions (Intel's Sashiko);
* micro-optimize idpf_xdpsq_set_rs{,_fb}().
Sorry I've had health issues for the last year. I hope I'll be
restoring my usual "usefulness" (reviews, submissions) on
the LKML bit by bit.
[0]
https://lore.kernel.org/intel-wired-lan/[email protected]
[1]
https://lore.kernel.org/intel-wired-lan/[email protected]
--
2.56.1