Skip to content

Commit 4b7a632

Browse files
pmachataPaolo Abeni
authored andcommitted
mlxsw: spectrum_cnt: Reorder counter pools
Both RIF and ACL flow counters use a 24-bit SW-managed counter address to communicate which counter they want to bind. In a number of Spectrum FW releases, binding a RIF counter is broken and slices the counter index to 16 bits. As a result, on Spectrum-2 and above, no more than about 410 RIF counters can be effectively used. This translates to 205 netdevices for which L3 HW stats can be enabled. (This does not happen on Spectrum-1, because there are fewer counters available overall and the counter index never exceeds 16 bits.) Binding counters to ACLs does not have this issue. Therefore reorder the counter allocation scheme so that RIF counters come first and therefore get lower indices that are below the 16-bit barrier. Fixes: 98e60dc ("Merge branch 'mlxsw-Introduce-initial-Spectrum-2-support'") Reported-by: Maksym Yaremchuk <[email protected]> Signed-off-by: Petr Machata <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 9cc8ea9 commit 4b7a632

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#include "spectrum.h"
99

1010
enum mlxsw_sp_counter_sub_pool_id {
11-
MLXSW_SP_COUNTER_SUB_POOL_FLOW,
1211
MLXSW_SP_COUNTER_SUB_POOL_RIF,
12+
MLXSW_SP_COUNTER_SUB_POOL_FLOW,
1313
};
1414

1515
int mlxsw_sp_counter_alloc(struct mlxsw_sp *mlxsw_sp,

0 commit comments

Comments
 (0)