net/mlx5e: Expose catastrophic steering error counters
authorLama Kayal <lkayal@nvidia.com>
Tue, 6 Jun 2023 07:12:14 +0000 (00:12 -0700)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 7 Jun 2023 21:00:43 +0000 (14:00 -0700)
Add generated_pkt_steering_fail and handled_pkt_steering_fail to devlink
heatlth reporter.
generated_pkt_steering_fail indicates the number of packets dropped due to
illegal steering operation within the vport steering domain.
handled_pkt_steering_fail indicates the number of packets dropped due to
illegal steering operation, originated by the vport.

Also, update devlink reporter functionality documentation with the newly
exposed counters.

Signed-off-by: Lama Kayal <lkayal@nvidia.com>
Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Documentation/networking/device_drivers/ethernet/mellanox/mlx5/devlink.rst
drivers/net/ethernet/mellanox/mlx5/core/diag/reporter_vnic.c
include/linux/mlx5/mlx5_ifc.h

index 3354ca3608ee671adc06939d78302420099b3110..a4edf908b707c2a61a007319d31c6e03c182e39a 100644 (file)
@@ -290,6 +290,13 @@ Description of the vnic counters:
 - nic_receive_steering_discard
         number of packets that completed RX flow
         steering but were discarded due to a mismatch in flow table.
+- generated_pkt_steering_fail
+       number of packets generated by the VNIC experiencing unexpected steering
+       failure (at any point in steering flow).
+- handled_pkt_steering_fail
+       number of packets handled by the VNIC experiencing unexpected steering
+       failure (at any point in steering flow owned by the VNIC, including the FDB
+       for the eswitch owner).
 
 User commands examples:
 
index 9114661cd967916abd717abda2ecf5fd68b9d027..b0128336ff01a0028a3d6c8ad524d4f071714a00 100644 (file)
@@ -76,6 +76,16 @@ int mlx5_reporter_vnic_diagnose_counters(struct mlx5_core_dev *dev,
        if (err)
                return err;
 
+       err = devlink_fmsg_u64_pair_put(fmsg, "generated_pkt_steering_fail",
+                                       VNIC_ENV_GET64(&vnic, generated_pkt_steering_fail));
+       if (err)
+               return err;
+
+       err = devlink_fmsg_u64_pair_put(fmsg, "handled_pkt_steering_fail",
+                                       VNIC_ENV_GET64(&vnic, handled_pkt_steering_fail));
+       if (err)
+               return err;
+
        err = devlink_fmsg_obj_nest_end(fmsg);
        if (err)
                return err;
index b89778d0d3267cb1e03e4078f6149579416c799c..af3a92ad2e6b1410f7ec1452c882eebbd954b1a4 100644 (file)
@@ -1755,7 +1755,9 @@ struct mlx5_ifc_cmd_hca_cap_bits {
        u8         reserved_at_328[0x2];
        u8         relaxed_ordering_read[0x1];
        u8         log_max_pd[0x5];
-       u8         reserved_at_330[0x9];
+       u8         reserved_at_330[0x7];
+       u8         vnic_env_cnt_steering_fail[0x1];
+       u8         reserved_at_338[0x1];
        u8         q_counter_aggregation[0x1];
        u8         q_counter_other_vport[0x1];
        u8         log_max_xrcd[0x5];
@@ -3673,7 +3675,13 @@ struct mlx5_ifc_vnic_diagnostic_statistics_bits {
 
        u8         eth_wqe_too_small[0x20];
 
-       u8         reserved_at_220[0xdc0];
+       u8         reserved_at_220[0xc0];
+
+       u8         generated_pkt_steering_fail[0x40];
+
+       u8         handled_pkt_steering_fail[0x40];
+
+       u8         reserved_at_360[0xc80];
 };
 
 struct mlx5_ifc_traffic_counter_bits {