summaryrefslogtreecommitdiff
path: root/drivers/net/mlx4/mlx4.c
diff options
context:
space:
mode:
authorYongseok Koh <yskoh@mellanox.com>2019-04-08 11:23:13 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2019-04-12 11:02:02 +0200
commitb27669d691b15042333d472e2edc883046cd8c89 (patch)
treedc01e5bcdc82f55194cb6843820072e2a5e774d3 /drivers/net/mlx4/mlx4.c
parentbbda883ca068d430f289190e49ecbdf6ab2a0761 (diff)
downloaddpdk-b27669d691b15042333d472e2edc883046cd8c89.zip
dpdk-b27669d691b15042333d472e2edc883046cd8c89.tar.gz
dpdk-b27669d691b15042333d472e2edc883046cd8c89.tar.xz
net/mlx4: fix Tx doorbell register unmap
If rdma-core library doesn't support remapping UAR registers, the register shouldn't be unmapped on device stop. Fixes: 0203d33a1059 ("net/mlx4: support secondary process") Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Diffstat (limited to 'drivers/net/mlx4/mlx4.c')
-rw-r--r--drivers/net/mlx4/mlx4.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 252658f..9bca0ce 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -314,8 +314,10 @@ static void
mlx4_dev_stop(struct rte_eth_dev *dev)
{
struct mlx4_priv *priv = dev->data->dev_private;
+#ifdef HAVE_IBV_MLX4_UAR_MMAP_OFFSET
const size_t page_size = sysconf(_SC_PAGESIZE);
int i;
+#endif
if (!priv->started)
return;
@@ -329,6 +331,7 @@ mlx4_dev_stop(struct rte_eth_dev *dev)
mlx4_flow_sync(priv, NULL);
mlx4_rxq_intr_disable(priv);
mlx4_rss_deinit(priv);
+#ifdef HAVE_IBV_MLX4_UAR_MMAP_OFFSET
for (i = 0; i != dev->data->nb_tx_queues; ++i) {
struct txq *txq;
@@ -338,6 +341,7 @@ mlx4_dev_stop(struct rte_eth_dev *dev)
munmap((void *)RTE_ALIGN_FLOOR((uintptr_t)txq->msq.db,
page_size), page_size);
}
+#endif
}
/**