]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net/mlx5: Add IFC bits for PPCNT recovery counters group
authorYael Chemla <ychemla@nvidia.com>
Sun, 9 Mar 2025 18:41:37 +0000 (20:41 +0200)
committerLeon Romanovsky <leon@kernel.org>
Mon, 10 Mar 2025 08:31:15 +0000 (04:31 -0400)
Add recovery counters group layout of PPCNT (Ports Performance Counters
Register). This group counts recovery events per link. Also add the
corresponding bit in PCAM to indicate this group is supported.

Signed-off-by: Yael Chemla <ychemla@nvidia.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1741545697-23041-1-git-send-email-tariqt@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
include/linux/mlx5/device.h
include/linux/mlx5/mlx5_ifc.h

index 8fe56d0362c62665471357f0658084b84f356e0e..904804e995aa81e54ea5ae092e491854f78e8974 100644 (file)
@@ -1517,6 +1517,7 @@ enum {
        MLX5_PHYSICAL_LAYER_COUNTERS_GROUP    = 0x12,
        MLX5_PER_TRAFFIC_CLASS_CONGESTION_GROUP = 0x13,
        MLX5_PHYSICAL_LAYER_STATISTICAL_GROUP = 0x16,
+       MLX5_PHYSICAL_LAYER_RECOVERY_GROUP    = 0x1a,
        MLX5_INFINIBAND_PORT_COUNTERS_GROUP   = 0x20,
        MLX5_INFINIBAND_EXTENDED_PORT_COUNTERS_GROUP = 0x21,
 };
index fea8af42f95480b2833c71d1dccbb72dbe17ada2..2c09df4ee57428d11101523cc3c0c77220408144 100644 (file)
@@ -2645,6 +2645,12 @@ struct mlx5_ifc_field_select_802_1qau_rp_bits {
        u8         field_select_8021qaurp[0x20];
 };
 
+struct mlx5_ifc_phys_layer_recovery_cntrs_bits {
+       u8         total_successful_recovery_events[0x20];
+
+       u8         reserved_at_20[0x7a0];
+};
+
 struct mlx5_ifc_phys_layer_cntrs_bits {
        u8         time_since_last_clear_high[0x20];
 
@@ -4846,6 +4852,7 @@ union mlx5_ifc_eth_cntrs_grp_data_layout_auto_bits {
        struct mlx5_ifc_ib_ext_port_cntrs_grp_data_layout_bits ib_ext_port_cntrs_grp_data_layout;
        struct mlx5_ifc_phys_layer_cntrs_bits phys_layer_cntrs;
        struct mlx5_ifc_phys_layer_statistical_cntrs_bits phys_layer_statistical_cntrs;
+       struct mlx5_ifc_phys_layer_recovery_cntrs_bits phys_layer_recovery_cntrs;
        u8         reserved_at_0[0x7c0];
 };
 
@@ -10584,7 +10591,9 @@ struct mlx5_ifc_mtutc_reg_bits {
 };
 
 struct mlx5_ifc_pcam_enhanced_features_bits {
-       u8         reserved_at_0[0x1d];
+       u8         reserved_at_0[0x10];
+       u8         ppcnt_recovery_counters[0x1];
+       u8         reserved_at_11[0xc];
        u8         fec_200G_per_lane_in_pplm[0x1];
        u8         reserved_at_1e[0x2a];
        u8         fec_100G_per_lane_in_pplm[0x1];