Skip to content

ice: share RSS hash profile IDs between PFs

Jakub Ramaseuski intel-wired-lan netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ice: release the profile ID on ice_add_prof() error pathsdrivers/net/ethernet/intel/ice/ice_flex_pipe.c+7 -20 replies
2/3ice: share default RSS hash profiles between PFsdrivers/net/ethernet/intel/ice/devlink/devlink.c drivers/net/ethernet/intel/ice/ice_adapter.c drivers/net/ethernet/intel/ice/ice_adapter.h +9 more+427 -281 reply
3/3ice: share all RSS hash profiles between PFsdrivers/net/ethernet/intel/ice/ice_flow.c drivers/net/ethernet/intel/ice/ice_flow.h drivers/net/ethernet/intel/ice/ice_lib.c+18 -431 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH iwl-next 0/3] ice: share RSS hash profile IDs between PFs

The DDP package gives all PFs of a device 126 RSS hash profile IDs, and since commit a6d63bbf2c52 ("ice: Implement RSS settings for GTP using ethtool") the default RSS configuration of each PF takes 19 of them. On devices with 8 PFs, like the E830-XXVDA8F, the PFs probed last lose part or all of their default RSS, and RSS configurations requested later fail, for example for VFs:

ice 0000:6c:00.0: ice_add_rss_cfg failed for VF 0, VSI 2, error:-5

The PFs configure the same profiles, and firmware already lets them share an ID; what is missing is a way for a PF to find the ID another PF uses for an extraction sequence. This series keeps a list of the shared IDs in struct ice_adapter.

Dropping part of the default RSS configuration, for example the 12 GTP entries added by a6d63bbf2c52, would also make it fit, but it would take the default GTP hashing away from users, which feels more like a step back, and it only moves the limit: without sharing, the IDs grow with the number of PFs times the configurations of each, so VFs and ethtool settings can exhaust them again. With sharing, they grow with the number of distinct configurations.

Patch 1 fixes a profile ID leak on the error paths of ice_add_prof(). It is independent of the rest and comes first, so that it can be backported on its own.
Patch 2 shares the IDs of the default RSS configuration, which fixes the exhaustion.
Patch 3 shares the IDs of all RSS profiles added through the flow API (ethtool, VFs, replay).

On an E810-CQDA2 split to 8 PFs, with a VF on each PF and the same "rx-flow-hash" settings on every VF, the PFs hold 126 IDs and fail 70 allocations before the series, and hold 37 IDs with no failures after it.

Patch 2 and 3 were also checked on an E830-XXVDA8F with one VF per PF and "rx-flow-hash {tcp,udp}{4,6} fn" on each, all 32 changes succeed with no ice errors.

The series is for iwl-next although patches 1 and 2 carry Fixes tags:
sharing profile IDs between PFs is a new feature rather than a plain
fix, and patch 2 builds on the shared devlink instance holding struct ice_adapter, added by
commit 6381ef1b1338 ("ice: use shared devlink to store ice_adapters instead of custom xarray") which is not in net, and it is too large for net.

Notes for reviewers:
- CORER, GLOBR and EMPR clear the IDs of all PFs, and every PF empties the list while preparing for such a reset, before it can allocate again. A PF that prepares late can drop entries made by a PF that has already rebuilt; that only costs sharing, the IDs stay valid and are freed as private ones. Skipping the flush on some PFs would instead let a PF join an ID the reset freed, which firmware may meanwhile have given to a PF the list does not track (DPDK, a PF assigned to a VM).
- Sharing relies on the device serial number identifying one device, like the rest of struct ice_adapter; E825C and devices without a serial number don't share.

Jakub Ramaseuski (3):
ice: release the profile ID on ice_add_prof() error paths
ice: share default RSS hash profiles between PFs
ice: share all RSS hash profiles between PFs

 .../net/ethernet/intel/ice/devlink/devlink.c  |   2 +
 drivers/net/ethernet/intel/ice/ice_adapter.c  |  13 +
 drivers/net/ethernet/intel/ice/ice_adapter.h  |   7 +
 drivers/net/ethernet/intel/ice/ice_ethtool.c  |   2 +-
 .../net/ethernet/intel/ice/ice_flex_pipe.c    | 356 +++++++++++++++++-
 .../net/ethernet/intel/ice/ice_flex_pipe.h    |   9 +-
 .../net/ethernet/intel/ice/ice_flex_type.h    |   1 +
 drivers/net/ethernet/intel/ice/ice_flow.c     |  14 +-
 drivers/net/ethernet/intel/ice/ice_main.c     |   5 +
 drivers/net/ethernet/intel/ice/virt/rss.c     |   2 +-
 10 files changed, 395 insertions(+), 16 deletions(-)
Signature · 1 line
2.56.0