[dpdk-dev] net/mlx5: fix creation of compressed Rx completion queue

Message ID 20171013200019.8426-1-yskoh@mellanox.com (mailing list archive)
State Accepted, archived
Headers

Checks

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

Commit Message

Yongseok Koh Oct. 13, 2017, 8 p.m. UTC
  The size of Rx completion queue should be doubled if compression is enabled
in case of non-vectorized Rx.

Fixes: 523f5a742102 ("net/mlx5: fix configuration of Rx CQE compression")
Cc: stable@dpdk.org

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

Comments

Thomas Monjalon Oct. 13, 2017, 8:11 p.m. UTC | #1
13/10/2017 22:00, Yongseok Koh:
> The size of Rx completion queue should be doubled if compression is enabled
> in case of non-vectorized Rx.
> 
> Fixes: 523f5a742102 ("net/mlx5: fix configuration of Rx CQE compression")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

Applied, thanks
  

Patch

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 632d45103..ad741ef44 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -617,7 +617,7 @@  mlx5_priv_rxq_ibv_new(struct priv *priv, uint16_t idx)
 		 * make cq_ci and rq_ci aligned.
 		 */
 		if (rxq_check_vec_support(rxq_data) < 0)
-			cqe_n *= 2;
+			attr.cq.ibv.cqe *= 2;
 	} else if (priv->cqe_comp && rxq_data->hw_timestamp) {
 		DEBUG("Rx CQE compression is disabled for HW timestamp");
 	}