From: Yongseok Koh <yskoh@mellanox.com>
To: shahafs@mellanox.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] net/mlx4: fix Tx doorbell register unmap
Date: Mon, 8 Apr 2019 11:23:13 -0700 [thread overview]
Message-ID: <20190408182313.39182-1-yskoh@mellanox.com> (raw)
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>
---
drivers/net/mlx4/mlx4.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 252658fc6a..9bca0ce9cd 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
}
/**
--
2.11.0
next reply other threads:[~2019-04-08 18:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 18:23 Yongseok Koh [this message]
2019-04-08 18:23 ` Yongseok Koh
2019-04-10 6:58 ` Shahaf Shuler
2019-04-10 6:58 ` Shahaf Shuler
2019-04-10 17:50 ` Ferruh Yigit
2019-04-10 17:50 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190408182313.39182-1-yskoh@mellanox.com \
--to=yskoh@mellanox.com \
--cc=dev@dpdk.org \
--cc=shahafs@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).