diff options
author | Tariq Toukan | 2017-07-03 09:18:19 +0200 |
---|---|---|
committer | Saeed Mahameed | 2017-09-03 05:34:09 +0200 |
commit | a071cb9f25bef32ec309ca9d123022c52175341b (patch) | |
tree | 809372e231c0dd27f6f116a41c16c4ebf9dacb17 /drivers/net/ethernet/mellanox/mlx5/core/en_main.c | |
parent | net/mlx5e: Non-atomic indicator for ring enabled state (diff) | |
download | kernel-qcow2-linux-a071cb9f25bef32ec309ca9d123022c52175341b.tar.gz kernel-qcow2-linux-a071cb9f25bef32ec309ca9d123022c52175341b.tar.xz kernel-qcow2-linux-a071cb9f25bef32ec309ca9d123022c52175341b.zip |
net/mlx5e: Non-atomic RQ state indicator for UMR WQE in progress
The indication for a UMR WQE in progress is needed only within
the NAPI context, and hence no races possible and no need for
the use of atomic operations.
The only place the flag is read outside of NAPI context is
in closure flow, after RQ is disabled flag is no more accessed
in NAPI.
Use a boolean instead of a bit in ring state, so that its
non-atomic set operations do not race with the atomic sets of
the other bits.
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_main.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 411fb68794bc..2767a3ee81bc 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -886,7 +886,8 @@ static void mlx5e_free_rx_descs(struct mlx5e_rq *rq) u16 wqe_ix; /* UMR WQE (if in progress) is always at wq->head */ - if (test_bit(MLX5E_RQ_STATE_UMR_WQE_IN_PROGRESS, &rq->state)) + if (rq->wq_type == MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ && + rq->mpwqe.umr_in_progress) mlx5e_free_rx_mpwqe(rq, &rq->mpwqe.info[wq->head]); while (!mlx5_wq_ll_is_empty(wq)) { |