DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx4: fix Tx doorbell register unmap
@ 2019-04-08 18:23 Yongseok Koh
  2019-04-08 18:23 ` Yongseok Koh
  2019-04-10  6:58 ` Shahaf Shuler
  0 siblings, 2 replies; 6+ messages in thread
From: Yongseok Koh @ 2019-04-08 18:23 UTC (permalink / raw)
  To: shahafs; +Cc: dev

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH] net/mlx4: fix Tx doorbell register unmap
  2019-04-08 18:23 [dpdk-dev] [PATCH] net/mlx4: fix Tx doorbell register unmap Yongseok Koh
@ 2019-04-08 18:23 ` Yongseok Koh
  2019-04-10  6:58 ` Shahaf Shuler
  1 sibling, 0 replies; 6+ messages in thread
From: Yongseok Koh @ 2019-04-08 18:23 UTC (permalink / raw)
  To: shahafs; +Cc: dev

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx4: fix Tx doorbell register unmap
  2019-04-08 18:23 [dpdk-dev] [PATCH] net/mlx4: fix Tx doorbell register unmap Yongseok Koh
  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
  1 sibling, 2 replies; 6+ messages in thread
From: Shahaf Shuler @ 2019-04-10  6:58 UTC (permalink / raw)
  To: Yongseok Koh, ferruh.yigit; +Cc: dev

Monday, April 8, 2019 9:23 PM, Yongseok Koh:
> Subject: [dpdk-dev] [PATCH] 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>

Applied to next-net-mlx, thanks.
Ferruh - you may want to squash to the relevant commit.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx4: fix Tx doorbell register unmap
  2019-04-10  6:58 ` Shahaf Shuler
@ 2019-04-10  6:58   ` Shahaf Shuler
  2019-04-10 17:50   ` Ferruh Yigit
  1 sibling, 0 replies; 6+ messages in thread
From: Shahaf Shuler @ 2019-04-10  6:58 UTC (permalink / raw)
  To: Yongseok Koh, ferruh.yigit; +Cc: dev

Monday, April 8, 2019 9:23 PM, Yongseok Koh:
> Subject: [dpdk-dev] [PATCH] 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>

Applied to next-net-mlx, thanks.
Ferruh - you may want to squash to the relevant commit.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx4: fix Tx doorbell register unmap
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2019-04-10 17:50 UTC (permalink / raw)
  To: Shahaf Shuler, Yongseok Koh; +Cc: dev

On 4/10/2019 7:58 AM, Shahaf Shuler wrote:
> Monday, April 8, 2019 9:23 PM, Yongseok Koh:
>> Subject: [dpdk-dev] [PATCH] 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>
> 
> Applied to next-net-mlx, thanks.
> Ferruh - you may want to squash to the relevant commit.
> 

I can't squash since the relevant commit already merged into main repo and part
of rc1, merged into next-net as it is.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx4: fix Tx doorbell register unmap
  2019-04-10 17:50   ` Ferruh Yigit
@ 2019-04-10 17:50     ` Ferruh Yigit
  0 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2019-04-10 17:50 UTC (permalink / raw)
  To: Shahaf Shuler, Yongseok Koh; +Cc: dev

On 4/10/2019 7:58 AM, Shahaf Shuler wrote:
> Monday, April 8, 2019 9:23 PM, Yongseok Koh:
>> Subject: [dpdk-dev] [PATCH] 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>
> 
> Applied to next-net-mlx, thanks.
> Ferruh - you may want to squash to the relevant commit.
> 

I can't squash since the relevant commit already merged into main repo and part
of rc1, merged into next-net as it is.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-04-10 17:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 18:23 [dpdk-dev] [PATCH] net/mlx4: fix Tx doorbell register unmap Yongseok Koh
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

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).