summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_txq.c
diff options
context:
space:
mode:
authorNĂ©lio Laranjeiro <nelio.laranjeiro@6wind.com>2018-02-06 10:26:21 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2018-02-06 14:35:07 +0100
commitfbab400f6143b8d41af7369309334cd22ac2751c (patch)
tree92cf2cb1f700c55a48d0bf21bfa339ded5ef47bb /drivers/net/mlx5/mlx5_txq.c
parent1f30a22358f1ce5bfb70691faf38fdc9d7467992 (diff)
downloaddpdk-next-eventdev-fbab400f6143b8d41af7369309334cd22ac2751c.zip
dpdk-next-eventdev-fbab400f6143b8d41af7369309334cd22ac2751c.tar.gz
dpdk-next-eventdev-fbab400f6143b8d41af7369309334cd22ac2751c.tar.xz
net/mlx5: fix UAR remapping on non configured queues
priv_tx_uar_remap() is wrongly considering the queue is already configured and thus present in the queue array of the device. Fixes: f8b9a3bad467 ("net/mlx5: install a socket to exchange a file descriptor") Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_txq.c')
-rw-r--r--drivers/net/mlx5/mlx5_txq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 23002cf..ed1c713 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -296,6 +296,8 @@ priv_tx_uar_remap(struct priv *priv, int fd)
* Ref to libmlx5 function: mlx5_init_context()
*/
for (i = 0; i != priv->txqs_n; ++i) {
+ if (!(*priv->txqs)[i])
+ continue;
txq = (*priv->txqs)[i];
txq_ctrl = container_of(txq, struct mlx5_txq_ctrl, txq);
/* UAR addr form verbs used to find dup and offset in page. */