diff options
author | Tim Wright <tim@binbash.co.uk> | 2017-05-01 12:30:08 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-05-01 15:04:23 -0400 |
commit | 133bea04ff6fd715d8140edca9d6c7337249571b (patch) | |
tree | d6067da9d2dadc7d91a6e6e20e834d6714a9389e | |
parent | 062d0f22a30c39840ea49b72cfcfc1aa4cc538fa (diff) |
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).
Signed-off-by: Tim Wright <tim@binbash.co.uk>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/infiniband/hw/mlx5/mad.c | 2 | ||||
-rw-r--r-- | include/linux/mlx5/mlx5_ifc.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/mad.c b/drivers/infiniband/hw/mlx5/mad.c index 8dacb49eabd9..f1b56de64871 100644 --- a/drivers/infiniband/hw/mlx5/mad.c +++ b/drivers/infiniband/hw/mlx5/mad.c | |||
@@ -187,6 +187,8 @@ static void pma_cnt_assign(struct ib_pma_portcounters *pma_cnt, | |||
187 | port_xmit_discards); | 187 | port_xmit_discards); |
188 | MLX5_ASSIGN_PMA_CNTR(pma_cnt->port_xmit_constraint_errors, | 188 | MLX5_ASSIGN_PMA_CNTR(pma_cnt->port_xmit_constraint_errors, |
189 | port_xmit_constraint_errors); | 189 | port_xmit_constraint_errors); |
190 | MLX5_ASSIGN_PMA_CNTR(pma_cnt->port_xmit_wait, | ||
191 | port_xmit_wait); | ||
190 | MLX5_ASSIGN_PMA_CNTR(pma_cnt->port_rcv_constraint_errors, | 192 | MLX5_ASSIGN_PMA_CNTR(pma_cnt->port_rcv_constraint_errors, |
191 | port_rcv_constraint_errors); | 193 | port_rcv_constraint_errors); |
192 | MLX5_ASSIGN_PMA_CNTR(pma_cnt->link_overrun_errors, | 194 | MLX5_ASSIGN_PMA_CNTR(pma_cnt->link_overrun_errors, |
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h index 954f42c268a4..32de0724b400 100644 --- a/include/linux/mlx5/mlx5_ifc.h +++ b/include/linux/mlx5/mlx5_ifc.h | |||
@@ -1456,7 +1456,9 @@ struct mlx5_ifc_ib_port_cntrs_grp_data_layout_bits { | |||
1456 | 1456 | ||
1457 | u8 vl_15_dropped[0x10]; | 1457 | u8 vl_15_dropped[0x10]; |
1458 | 1458 | ||
1459 | u8 reserved_at_a0[0xa0]; | 1459 | u8 reserved_at_a0[0x80]; |
1460 | |||
1461 | u8 port_xmit_wait[0x20]; | ||
1460 | }; | 1462 | }; |
1461 | 1463 | ||
1462 | struct mlx5_ifc_eth_per_traffic_grp_data_layout_bits { | 1464 | struct mlx5_ifc_eth_per_traffic_grp_data_layout_bits { |