IB/mlx5: Add port_xmit_wait to counter registers read
authorTim Wright <tim@binbash.co.uk>
Mon, 1 May 2017 16:30:08 +0000 (17:30 +0100)
committerDoug Ledford <dledford@redhat.com>
Mon, 1 May 2017 19:04:23 +0000 (15:04 -0400)
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).

Signed-off-by: Tim Wright <tim@binbash.co.uk>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/mad.c
include/linux/mlx5/mlx5_ifc.h

index 8dacb49..f1b56de 100644 (file)
@@ -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,
index 954f42c..32de072 100644 (file)
@@ -1456,7 +1456,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 {