From: NĂ©lio Laranjeiro Date: Mon, 9 Oct 2017 14:44:44 +0000 (+0200) Subject: net/mlx5: fix SSE Rx support verification X-Git-Tag: spdx-start~1526 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9c7dd1ccaf6e361f5a1c76dfdfd8713afda33905;p=dpdk.git net/mlx5: fix SSE Rx support verification The number of queues in DPDK does not means that the array of queue will be totally filled, those information are uncorrelated. The number of queues is provided in the port configuration whereas the array is filled by calling tx/rx_queue_setup(). As this number of queue is not increased or decrease according to tx/rx_queue_setup() or tx/rx_queue_release(), PMD must consider a queue may not be initialised in some position of the array. Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86") Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro Acked-by: Yongseok Koh --- diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c index 7e5ce6dae7..6d337ecd30 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c +++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c @@ -1376,6 +1376,8 @@ priv_check_vec_rx_support(struct priv *priv) for (i = 0; i < priv->rxqs_n; ++i) { struct mlx5_rxq_data *rxq = (*priv->rxqs)[i]; + if (!rxq) + continue; if (rxq_check_vec_support(rxq) < 0) break; }