[dpdk-dev] net/mlx5: fix counting consumed Tx descriptors

Message ID 20170725164216.34122-1-yskoh@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Yongseok Koh July 25, 2017, 4:42 p.m. UTC
  When advancing Tx ring index (txq->wqe_ci) in txq_scatter_v(), the title
descriptor of multi-packet send isn't taken into account if it doesn't
cross 64B boundary.

Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_rxtx_vec_sse.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Comments

Ferruh Yigit July 31, 2017, 4:19 p.m. UTC | #1
On 7/25/2017 5:42 PM, Yongseok Koh wrote:
> When advancing Tx ring index (txq->wqe_ci) in txq_scatter_v(), the title
> descriptor of multi-packet send isn't taken into account if it doesn't
> cross 64B boundary.
> 
> Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86")
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c
index 95e96baa2..0a65502fb 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c
@@ -288,8 +288,7 @@  txq_scatter_v(struct txq *txq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			(*txq->elts)[elts_head++ & elts_m] = buf;
 			buf = buf->next;
 		} while (--segs_n);
-		if (ds % nb_dword_per_wqebb)
-			++wqe_ci;
+		++wqe_ci;
 		/* Fill CTRL in the header. */
 		ctrl = _mm_set_epi32(0, 0, txq->qp_num_8s | ds,
 				     MLX5_OPC_MOD_MPW << 24 |