Commit 8a8878b1 authored by Eugenia Emantayev's avatar Eugenia Emantayev Committed by Sasha Levin

net/mlx4_en: Fix bad WQE issue

[ Upstream commit 6496bbf0 ]

Single send WQE in RX buffer should be stamped with software
ownership in order to prevent the flow of QP in error in FW
once UPDATE_QP is called.

Fixes: 9f519f68 ('mlx4_en: Not using Shared Receive Queues')
Signed-off-by: default avatarEugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent 037948b4
...@@ -445,8 +445,14 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv) ...@@ -445,8 +445,14 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv)
ring->cqn = priv->rx_cq[ring_ind]->mcq.cqn; ring->cqn = priv->rx_cq[ring_ind]->mcq.cqn;
ring->stride = stride; ring->stride = stride;
if (ring->stride <= TXBB_SIZE) if (ring->stride <= TXBB_SIZE) {
/* Stamp first unused send wqe */
__be32 *ptr = (__be32 *)ring->buf;
__be32 stamp = cpu_to_be32(1 << STAMP_SHIFT);
*ptr = stamp;
/* Move pointer to start of rx section */
ring->buf += TXBB_SIZE; ring->buf += TXBB_SIZE;
}
ring->log_stride = ffs(ring->stride) - 1; ring->log_stride = ffs(ring->stride) - 1;
ring->buf_size = ring->size * ring->stride; ring->buf_size = ring->size * ring->stride;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment