Skip to contentSkip to conversation

IB/mlx5: Add port_xmit_wait to counter registers read

PATCH Applied Tim Wright 3 participants 3 messages May 1, 2017 – May 3, 2017 1 message not in the archive

Subsystems (5)
lore
Share & tools
lore

Tim Wright

author
#0 lore raw

PATCH 1/1 IB/mlx5: Add port_xmit_wait to counter registers read

Add port_xmit_wait to the error counters read by mlx5_ib_process_mad to ensure sysfs port counter provides correct value for PortXmitWait. Otherwise the sysfs port_xmit_wait file always contains zero.

The previous MAD_IFC implementation populated this counter, but it was removed during the migration to PPCNT for error counters (32-bit only).

---
 drivers/infiniband/hw/mlx5/mad.c | 2 ++
 include/linux/mlx5/mlx5_ifc.h    | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/mad.c +2 -0
index 8dacb49..f1b56de6 100644
@@ -187,6 +187,8 @@ static void pma_cnt_assign(struct ib_pma_portcounters *pma_cnt,
 			     port_xmit_discards);
 	MLX5_ASSIGN_PMA_CNTR(pma_cnt->port_xmit_constraint_errors,
 			     port_xmit_constraint_errors);
+	MLX5_ASSIGN_PMA_CNTR(pma_cnt->port_xmit_wait,
+			     port_xmit_wait);
 	MLX5_ASSIGN_PMA_CNTR(pma_cnt->port_rcv_constraint_errors,
 			     port_rcv_constraint_errors);
 	MLX5_ASSIGN_PMA_CNTR(pma_cnt->link_overrun_errors,
include/linux/mlx5/mlx5_ifc.h +3 -1
index 8382426..e641bc3 100644
@@ -1452,7 +1452,9 @@ struct mlx5_ifc_ib_port_cntrs_grp_data_layout_bits {
 
 	u8         vl_15_dropped[0x10];
 
-	u8	   reserved_at_a0[0xa0];
+	u8	   reserved_at_a0[0x80];
+
+	u8         port_xmit_wait[0x20];
 };
 
 struct mlx5_ifc_eth_per_traffic_grp_data_layout_bits {
Signature · 1 line
1.8.3.1

A message that is not in the archive (sent off-list or not yet received): 20170501163008.27043-1-tim-r/[email protected]

Applied
#2 lore raw
Quoted 11 lines · Tim Wright

Add port_xmit_wait to the error counters read by mlx5_ib_process_mad to
ensure sysfs port counter provides correct value for PortXmitWait. Otherwise the sysfs port_xmit_wait file always contains zero.

The previous MAD_IFC implementation populated this counter, but it was
removed during the migration to PPCNT for error counters (32-bit only).

Thanks, applied.

Signature · 9 lines
Doug Ledford <[email protected]>
    GPG KeyID: B826A3330E572FDD
   
Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw
In reply to a message not in the archive
Quoted 4 lines · Tim Wright

Add port_xmit_wait to the error counters read by mlx5_ib_process_mad to ensure sysfs port counter provides correct value for PortXmitWait. Otherwise the sysfs port_xmit_wait file always contains zero.

Quoted 9 lines

The previous MAD_IFC implementation populated this counter, but it was removed during the migration to PPCNT for error counters (32-bit only).

---
 drivers/infiniband/hw/mlx5/mad.c | 2 ++
 include/linux/mlx5/mlx5_ifc.h    | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

Thanks,