mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
RDMA/mlx5: Clear old rate limit when closing QP
[ Upstream commitc8973df2da] Before QP is closed it changes to ERROR state, when this happens the QP was left with old rate limit that was already removed from the table. Fixes:7d29f349a4("IB/mlx5: Properly adjust rate limit on QP state transitions") Signed-off-by: Rafi Wiener <rafiw@mellanox.com> Signed-off-by: Oleg Kuporosov <olegk@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Link: https://lore.kernel.org/r/20191002120243.16971-1-leon@kernel.org Signed-off-by: Doug Ledford <dledford@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d6706b2ec1
commit
89aa9e2626
@@ -2828,10 +2828,12 @@ static int modify_raw_packet_qp_sq(struct mlx5_core_dev *dev,
|
||||
}
|
||||
|
||||
/* Only remove the old rate after new rate was set */
|
||||
if ((old_rl.rate &&
|
||||
!mlx5_rl_are_equal(&old_rl, &new_rl)) ||
|
||||
(new_state != MLX5_SQC_STATE_RDY))
|
||||
if ((old_rl.rate && !mlx5_rl_are_equal(&old_rl, &new_rl)) ||
|
||||
(new_state != MLX5_SQC_STATE_RDY)) {
|
||||
mlx5_rl_remove_rate(dev, &old_rl);
|
||||
if (new_state != MLX5_SQC_STATE_RDY)
|
||||
memset(&new_rl, 0, sizeof(new_rl));
|
||||
}
|
||||
|
||||
ibqp->rl = new_rl;
|
||||
sq->state = new_state;
|
||||
|
||||
Reference in New Issue
Block a user