[dpdk-dev,v2,08/30] net/mlx5: fix rxqs vector support verification

Message ID d53a25f1c1c3963956d92ce38afe0d6716908417.1507207731.git.nelio.laranjeiro@6wind.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply patch file failure

Commit Message

Nélio Laranjeiro Oct. 5, 2017, 12:49 p.m. UTC
  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: yskoh@mellanox.com
Cc: stable@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_rxtx_vec_sse.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Yongseok Koh Oct. 6, 2017, 12:51 a.m. UTC | #1
> On Oct 5, 2017, at 5:49 AM, Nelio Laranjeiro <nelio.laranjeiro@6wind.com> wrote:
> 
> 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: yskoh@mellanox.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> ---
Acked-by: Yongseok Koh <yskoh@mellanox.com>
 
Thanks
  

Patch

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c
index 2750eac..20ea38e 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c
@@ -1367,6 +1367,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;
 	}