net/mlx5: DR, Enable QP retransmission
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Thu, 24 Sep 2020 17:58:50 +0000 (20:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:40:34 +0000 (13:40 +0200)
[ Upstream commit ec449ed8230cd30769de3cb70ee0fce293047372 ]

Under high stress, SW steering might get stuck on polling for completion
that never comes.
For such cases QP needs to have protocol retransmission mechanism enabled.
Currently the retransmission timeout is defined as 0 (unlimited). Fix this
by defining a real timeout.

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Alex Vesker <valex@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c

index ea3c6cf27db423f48ccd95a7b37f03596d4f3e5a..eb6677f737a0f7ecaeae2001f3def04b36a6536e 100644 (file)
@@ -605,6 +605,7 @@ static int dr_cmd_modify_qp_rtr2rts(struct mlx5_core_dev *mdev,
 
        MLX5_SET(qpc, qpc, retry_count, attr->retry_cnt);
        MLX5_SET(qpc, qpc, rnr_retry, attr->rnr_retry);
+       MLX5_SET(qpc, qpc, primary_address_path.ack_timeout, 0x8); /* ~1ms */
 
        MLX5_SET(rtr2rts_qp_in, in, opcode, MLX5_CMD_OP_RTR2RTS_QP);
        MLX5_SET(rtr2rts_qp_in, in, qpn, dr_qp->qpn);