* [dpdk-dev] [PATCH 1/2] net/mlx5: fix alignment of Memory Region
@ 2018-04-17 18:39 Yongseok Koh
2018-04-17 18:39 ` [dpdk-dev] [PATCH 2/2] net/mlx4: " Yongseok Koh
2018-04-18 6:43 ` [dpdk-dev] [PATCH 1/2] net/mlx5: " Nélio Laranjeiro
0 siblings, 2 replies; 5+ messages in thread
From: Yongseok Koh @ 2018-04-17 18:39 UTC (permalink / raw)
To: adrien.mazarguil, nelio.laranjeiro; +Cc: dev, Yongseok Koh, Anatoly Burakov
The memory region is [start, end), so if the memseg of 'end' isn't
allocated yet, the returned memseg will have zero entries and this will
make 'end' zero (nil).
Fixes: 718e35999c96 ("net/mlx5: use virt2memseg instead of iteration")
Cc: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
drivers/net/mlx5/mlx5_mr.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c
index fdf7b3e88..39bbe2481 100644
--- a/drivers/net/mlx5/mlx5_mr.c
+++ b/drivers/net/mlx5/mlx5_mr.c
@@ -265,9 +265,7 @@ mlx5_mr_new(struct rte_eth_dev *dev, struct rte_mempool *mp)
ms = rte_mem_virt2memseg((void *)start, NULL);
if (ms != NULL)
start = RTE_ALIGN_FLOOR(start, ms->hugepage_sz);
- ms = rte_mem_virt2memseg((void *)end, NULL);
- if (ms != NULL)
- end = RTE_ALIGN_CEIL(end, ms->hugepage_sz);
+ end = RTE_ALIGN_CEIL(end, ms->hugepage_sz);
DRV_LOG(DEBUG,
"port %u mempool %p using start=%p end=%p size=%zu for memory"
--
2.11.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 2/2] net/mlx4: fix alignment of Memory Region
2018-04-17 18:39 [dpdk-dev] [PATCH 1/2] net/mlx5: fix alignment of Memory Region Yongseok Koh
@ 2018-04-17 18:39 ` Yongseok Koh
2018-04-18 8:05 ` Adrien Mazarguil
2018-04-18 6:43 ` [dpdk-dev] [PATCH 1/2] net/mlx5: " Nélio Laranjeiro
1 sibling, 1 reply; 5+ messages in thread
From: Yongseok Koh @ 2018-04-17 18:39 UTC (permalink / raw)
To: adrien.mazarguil, nelio.laranjeiro; +Cc: dev, Yongseok Koh, Anatoly Burakov
The memory region is [start, end), so if the memseg of 'end' isn't
allocated yet, the returned memseg will have zero entries and this will
make 'end' zero (nil).
Fixes: c2fe5823224a ("net/mlx4: use virt2memseg instead of iteration")
Cc: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
drivers/net/mlx4/mlx4_mr.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/mlx4/mlx4_mr.c b/drivers/net/mlx4/mlx4_mr.c
index e69b43322..f2dcbcb76 100644
--- a/drivers/net/mlx4/mlx4_mr.c
+++ b/drivers/net/mlx4/mlx4_mr.c
@@ -144,9 +144,7 @@ mlx4_mr_get(struct priv *priv, struct rte_mempool *mp)
ms = rte_mem_virt2memseg((void *)start, NULL);
if (ms != NULL)
start = RTE_ALIGN_FLOOR(start, ms->hugepage_sz);
- ms = rte_mem_virt2memseg((void *)end, NULL);
- if (ms != NULL)
- end = RTE_ALIGN_CEIL(end, ms->hugepage_sz);
+ end = RTE_ALIGN_CEIL(end, ms->hugepage_sz);
DEBUG("mempool %p using start=%p end=%p size=%zu for MR",
(void *)mp, (void *)start, (void *)end,
--
2.11.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] net/mlx5: fix alignment of Memory Region
2018-04-17 18:39 [dpdk-dev] [PATCH 1/2] net/mlx5: fix alignment of Memory Region Yongseok Koh
2018-04-17 18:39 ` [dpdk-dev] [PATCH 2/2] net/mlx4: " Yongseok Koh
@ 2018-04-18 6:43 ` Nélio Laranjeiro
2018-04-22 9:09 ` Shahaf Shuler
1 sibling, 1 reply; 5+ messages in thread
From: Nélio Laranjeiro @ 2018-04-18 6:43 UTC (permalink / raw)
To: Yongseok Koh; +Cc: adrien.mazarguil, dev, Anatoly Burakov
On Tue, Apr 17, 2018 at 11:39:13AM -0700, Yongseok Koh wrote:
> The memory region is [start, end), so if the memseg of 'end' isn't
> allocated yet, the returned memseg will have zero entries and this will
> make 'end' zero (nil).
>
> Fixes: 718e35999c96 ("net/mlx5: use virt2memseg instead of iteration")
> Cc: Anatoly Burakov <anatoly.burakov@intel.com>
>
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> ---
> drivers/net/mlx5/mlx5_mr.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c
> index fdf7b3e88..39bbe2481 100644
> --- a/drivers/net/mlx5/mlx5_mr.c
> +++ b/drivers/net/mlx5/mlx5_mr.c
> @@ -265,9 +265,7 @@ mlx5_mr_new(struct rte_eth_dev *dev, struct rte_mempool *mp)
> ms = rte_mem_virt2memseg((void *)start, NULL);
> if (ms != NULL)
> start = RTE_ALIGN_FLOOR(start, ms->hugepage_sz);
> - ms = rte_mem_virt2memseg((void *)end, NULL);
> - if (ms != NULL)
> - end = RTE_ALIGN_CEIL(end, ms->hugepage_sz);
> + end = RTE_ALIGN_CEIL(end, ms->hugepage_sz);
>
> DRV_LOG(DEBUG,
> "port %u mempool %p using start=%p end=%p size=%zu for memory"
> --
> 2.11.0
>
--
Nélio Laranjeiro
6WIND
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] net/mlx4: fix alignment of Memory Region
2018-04-17 18:39 ` [dpdk-dev] [PATCH 2/2] net/mlx4: " Yongseok Koh
@ 2018-04-18 8:05 ` Adrien Mazarguil
0 siblings, 0 replies; 5+ messages in thread
From: Adrien Mazarguil @ 2018-04-18 8:05 UTC (permalink / raw)
To: Yongseok Koh; +Cc: nelio.laranjeiro, dev, Anatoly Burakov
On Tue, Apr 17, 2018 at 11:39:14AM -0700, Yongseok Koh wrote:
> The memory region is [start, end), so if the memseg of 'end' isn't
> allocated yet, the returned memseg will have zero entries and this will
> make 'end' zero (nil).
>
> Fixes: c2fe5823224a ("net/mlx4: use virt2memseg instead of iteration")
> Cc: Anatoly Burakov <anatoly.burakov@intel.com>
>
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
One nit in case another version is sent, please remove the unnecessary empty
line in both patches, thanks.
> ---
> drivers/net/mlx4/mlx4_mr.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/mlx4/mlx4_mr.c b/drivers/net/mlx4/mlx4_mr.c
> index e69b43322..f2dcbcb76 100644
> --- a/drivers/net/mlx4/mlx4_mr.c
> +++ b/drivers/net/mlx4/mlx4_mr.c
> @@ -144,9 +144,7 @@ mlx4_mr_get(struct priv *priv, struct rte_mempool *mp)
> ms = rte_mem_virt2memseg((void *)start, NULL);
> if (ms != NULL)
> start = RTE_ALIGN_FLOOR(start, ms->hugepage_sz);
> - ms = rte_mem_virt2memseg((void *)end, NULL);
> - if (ms != NULL)
> - end = RTE_ALIGN_CEIL(end, ms->hugepage_sz);
> + end = RTE_ALIGN_CEIL(end, ms->hugepage_sz);
>
> DEBUG("mempool %p using start=%p end=%p size=%zu for MR",
> (void *)mp, (void *)start, (void *)end,
> --
> 2.11.0
>
--
Adrien Mazarguil
6WIND
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] net/mlx5: fix alignment of Memory Region
2018-04-18 6:43 ` [dpdk-dev] [PATCH 1/2] net/mlx5: " Nélio Laranjeiro
@ 2018-04-22 9:09 ` Shahaf Shuler
0 siblings, 0 replies; 5+ messages in thread
From: Shahaf Shuler @ 2018-04-22 9:09 UTC (permalink / raw)
To: Nélio Laranjeiro, Yongseok Koh
Cc: Adrien Mazarguil, dev, Anatoly Burakov
Wednesday, April 18, 2018 9:43 AM, Nélio Laranjeiro:
> Subject: Re: [dpdk-dev] [PATCH 1/2] net/mlx5: fix alignment of Memory
> Region
>
> On Tue, Apr 17, 2018 at 11:39:13AM -0700, Yongseok Koh wrote:
> > The memory region is [start, end), so if the memseg of 'end' isn't
> > allocated yet, the returned memseg will have zero entries and this
> > will make 'end' zero (nil).
> >
> > Fixes: 718e35999c96 ("net/mlx5: use virt2memseg instead of iteration")
> > Cc: Anatoly Burakov <anatoly.burakov@intel.com>
> >
> > Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
>
> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Series applied to next-net-mlx with Adrien's line removal suggestion. Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-04-22 9:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-17 18:39 [dpdk-dev] [PATCH 1/2] net/mlx5: fix alignment of Memory Region Yongseok Koh
2018-04-17 18:39 ` [dpdk-dev] [PATCH 2/2] net/mlx4: " Yongseok Koh
2018-04-18 8:05 ` Adrien Mazarguil
2018-04-18 6:43 ` [dpdk-dev] [PATCH 1/2] net/mlx5: " Nélio Laranjeiro
2018-04-22 9:09 ` Shahaf Shuler
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).