summaryrefslogtreecommitdiff
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorKeno Fischer <keno@juliahub.com>2026-05-18 01:31:31 -0400
committerJakub Kicinski <kuba@kernel.org>2026-05-20 17:08:00 -0700
commita2b5e31b668fbd59b3d5bff634d923fe9d1ac8b4 (patch)
treeafa3ff06a51f402f10f36ab9ad4e388c39201bf3 /scripts/patch-kernel
parentb63ef8e7c12932fe4f9a5f0ce85099a02e2174ce (diff)
mlxsw: spectrum_ethtool: expose per-PG rx_discards
PPCNT group 0x10 (per-priority counters) carries an rx_discards field at offset 0x78. These counters aggregate up into if_in_discards, but don't show up anywhere else. Since there are many things that aggregate into `if_in_discards`, having these counters helps distinguish what caused those discards (in my case they were caused by headroom buffer overruns due to inappropriately configured buffer sizes). Of note, from emperical testing, these counter are per-"priority group" (PG) not per-"switch priority". It's a bit confusing, because the rest of these counter are per-"switch priority" and the header file calls these "Per Priority Group Counters". However, that should be read as "(Per Priority) Group Counters", not "Per (Priority Group) Counters". I attempted to distinguish this in the counter naming by calling these `rx_discards_pg_N` rather than `rx_discards_prio_N` (which is the naming scheme of the other counters in this PPCNT group). I will also note that the mlx5 driver (which already has this counter) uses the schme `rx_prioN_discards` (and same for the other counters in this group). However, I was unable to determine whether the mlx5 counters behave the same as the mlxsw counters with respect to PG mapping. An attempt to remap to a different PG there did not change which counter incremented, but the mlx5 configuration code is quite different, so it's possible the remapping needs to be done differently. Signed-off-by: Keno Fischer <keno@juliahub.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Link: https://patch.msgid.link/agqkMwgM1PdkyMUR@juliahub.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions