Skip to content

mlxsw: spectrum_cnt: Expose counter resources

Ido Schimmel netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9mlxsw: spectrum_cnt: Query bank size from FW resourcesdrivers/net/ethernet/mellanox/mlxsw/resources.h drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.c+11 -60 replies
2/9selftests: spectrum-2: Adjust tc_flower_scale limit according to current counter counttools/testing/selftests/drivers/net/mlxsw/spectrum-2/tc_flower_scale.sh+2 -20 replies
3/9mlxsw: spectrum_cnt: Move sub_pools under per-instance pool structdrivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.c+27 -180 replies
4/9mlxsw: spectrum_cnt: Add entry_size_res_id for each subpool and use it to query entry sizedrivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.c+14 -120 replies
5/9mlxsw: spectrum_cnt: Expose subpool sizes over devlink resourcesdrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.c +1 more+101 -170 replies
6/9mlxsw: spectrum_cnt: Move config validation along with resource registerdrivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.c+8 -230 replies
7/9mlxsw: spectrum_cnt: Consolidate subpools initializationdrivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.c+16 -220 replies
8/9mlxsw: spectrum_cnt: Expose devlink resource occupancy for countersdrivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.c+62 -10 replies
9/9selftests: mlxsw: Add tc action hw_stats teststools/testing/selftests/drivers/net/mlxsw/tc_action_hw_stats.sh tools/testing/selftests/net/forwarding/lib.sh+139 -00 replies

Reviews trailers per patch

None of the 9 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJakub Kicinski
SeriesA-b
1/9
2/9
3/9
4/9
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/9] mlxsw: spectrum_cnt: Expose counter resources

From: Ido Schimmel <[email protected]>

Jiri says:

Capacity and utilization of existing flow and RIF counters are currently unavailable to be seen by the user. Use the existing devlink resources API to expose the information:

$ sudo devlink resource show pci/0000:00:10.0 -v
pci/0000:00:10.0:
  name kvd resource_path /kvd size 524288 unit entry dpipe_tables none
  name span_agents resource_path /span_agents size 8 occ 0 unit entry dpipe_tables none
  name counters resource_path /counters size 79872 occ 44 unit entry dpipe_tables none
    resources:
      name flow resource_path /counters/flow size 61440 occ 4 unit entry dpipe_tables none
      name rif resource_path /counters/rif size 18432 occ 40 unit entry dpipe_tables none

Jiri Pirko (9):
mlxsw: spectrum_cnt: Query bank size from FW resources
selftests: spectrum-2: Adjust tc_flower_scale limit according to
current counter count
mlxsw: spectrum_cnt: Move sub_pools under per-instance pool struct
mlxsw: spectrum_cnt: Add entry_size_res_id for each subpool and use it
to query entry size
mlxsw: spectrum_cnt: Expose subpool sizes over devlink resources
mlxsw: spectrum_cnt: Move config validation along with resource
register
mlxsw: spectrum_cnt: Consolidate subpools initialization
mlxsw: spectrum_cnt: Expose devlink resource occupancy for counters
selftests: mlxsw: Add tc action hw_stats tests

 .../net/ethernet/mellanox/mlxsw/resources.h   |   2 +
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  10 +
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |   7 +
 .../ethernet/mellanox/mlxsw/spectrum_cnt.c    | 243 +++++++++++++-----
 .../ethernet/mellanox/mlxsw/spectrum_cnt.h    |   2 +
 .../net/mlxsw/spectrum-2/tc_flower_scale.sh   |   4 +-
 .../drivers/net/mlxsw/tc_action_hw_stats.sh   | 130 ++++++++++
 tools/testing/selftests/net/forwarding/lib.sh |   9 +
 8 files changed, 343 insertions(+), 64 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/mlxsw/tc_action_hw_stats.sh
Signature · 1 line
2.24.1