[PATCH mlx5-next 2/3] net/mlx5: Add IFC bits for SW RoCE monitor matched packets counter
From: Tariq Toukan
Date: Mon Nov 16 2026 - 09:47:14 EST
From: Moshe Shemesh <moshe@xxxxxxxxxx>
Add the sw_roce_monitor_matched_packets counter to the query_vnic_env
command output. The counter reports the number of packets generated by
the Ethernet SQs of the vNIC that matched the configured SW RoCE
monitor classifier. Additionally, add the NIC_CAP_REG capability field
sw_roce_monitor_classifier. The field is a bitmask of the supported
classifiers, of which only bit 0, RoCEv2, is currently defined.
Signed-off-by: Moshe Shemesh <moshe@xxxxxxxxxx>
Reviewed-by: Shay Drori <shayd@xxxxxxxxxx>
Signed-off-by: Tariq Toukan <tariqt@xxxxxxxxxx>
---
include/linux/mlx5/mlx5_ifc.h | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index 04300c8765a0..06e17581fa51 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -3448,7 +3448,13 @@ struct mlx5_ifc_nic_cap_reg_bits {
u8 vhca_icm_ctrl[0x1];
u8 reserved_at_1b[0x5];
- u8 reserved_at_20[0x3e0];
+ u8 reserved_at_20[0x80];
+
+ u8 reserved_at_a0[0x4];
+ u8 sw_roce_monitor_classifier[0x4];
+ u8 reserved_at_a8[0x18];
+
+ u8 reserved_at_c0[0x340];
};
struct mlx5_ifc_default_timeout_bits {
@@ -4077,7 +4083,11 @@ struct mlx5_ifc_vnic_diagnostic_statistics_bits {
u8 odp_remote_triggered_page_fault[0x20];
- u8 reserved_at_3c0[0xc20];
+ u8 reserved_at_3e0[0x20];
+
+ u8 sw_roce_monitor_matched_packets[0x20];
+
+ u8 reserved_at_420[0xbe0];
};
struct mlx5_ifc_traffic_counter_bits {
--
2.44.0