* Re: [dpdk-dev] [PATCH] test/memzone: Fix test_memzone_basic & test_memzone_free issues.
2018-01-11 9:41 [dpdk-dev] [PATCH] test/memzone: Fix test_memzone_basic & test_memzone_free issues Phil Yang
@ 2018-01-12 5:46 ` Jianbo Liu
2018-01-12 17:43 ` Burakov, Anatoly
` (2 subsequent siblings)
3 siblings, 0 replies; 13+ messages in thread
From: Jianbo Liu @ 2018-01-12 5:46 UTC (permalink / raw)
To: Phil Yang; +Cc: dev, nd, herbert.guan
The 01/11/2018 17:41, Phil Yang wrote:
> 1. test_memzone_basic: No need to free a NULL memzone. It will cause test
> termination.
> 2. test_memzone_free: Out of mz[RTE_MAX_MEMZONE] memory bound while
> reserving memzone for mz. It will flush variable i. Fix by extend to
> mz[RTE_MAX_MEMZONE + 1].
>
> Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
> ---
> test/test/test_memzone.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c
> index 6e80977..24e29a7 100644
> --- a/test/test/test_memzone.c
> +++ b/test/test/test_memzone.c
> @@ -251,10 +251,6 @@ test_memzone_reserve_flags(void)
> printf("MEMZONE FLAG 2MB\n");
> return -1;
> }
> - if (rte_memzone_free(mz)) {
> - printf("Fail memzone free\n");
> - return -1;
> - }
> }
>
> if (hugepage_2MB_avail && hugepage_1GB_avail) {
> @@ -746,7 +742,7 @@ test_memzone_bounded(void)
> static int
> test_memzone_free(void)
> {
> - const struct rte_memzone *mz[RTE_MAX_MEMZONE];
> + const struct rte_memzone *mz[RTE_MAX_MEMZONE + 1];
> int i;
> char name[20];
>
> --
> 2.7.4
>
--
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH] test/memzone: Fix test_memzone_basic & test_memzone_free issues.
2018-01-11 9:41 [dpdk-dev] [PATCH] test/memzone: Fix test_memzone_basic & test_memzone_free issues Phil Yang
2018-01-12 5:46 ` Jianbo Liu
@ 2018-01-12 17:43 ` Burakov, Anatoly
2018-01-15 5:57 ` Phil Yang
2018-01-15 5:43 ` [dpdk-dev] [PATCH 0/2] Fix memzone autotest issues Phil Yang
2018-01-15 5:52 ` [dpdk-dev] [PATCH v2 " Phil Yang
3 siblings, 1 reply; 13+ messages in thread
From: Burakov, Anatoly @ 2018-01-12 17:43 UTC (permalink / raw)
To: Phil Yang, dev; +Cc: nd, jianbo.liu, herbert.guan
On 11-Jan-18 9:41 AM, Phil Yang wrote:
> 1. test_memzone_basic: No need to free a NULL memzone. It will cause test
> termination.
> 2. test_memzone_free: Out of mz[RTE_MAX_MEMZONE] memory bound while
> reserving memzone for mz. It will flush variable i. Fix by extend to
> mz[RTE_MAX_MEMZONE + 1].
>
> Signed-off-by: Phil Yang <phil.yang@arm.com>
> ---
> test/test/test_memzone.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c
> index 6e80977..24e29a7 100644
> --- a/test/test/test_memzone.c
> +++ b/test/test/test_memzone.c
> @@ -251,10 +251,6 @@ test_memzone_reserve_flags(void)
> printf("MEMZONE FLAG 2MB\n");
> return -1;
> }
> - if (rte_memzone_free(mz)) {
> - printf("Fail memzone free\n");
> - return -1;
> - }
> }
>
> if (hugepage_2MB_avail && hugepage_1GB_avail) {
> @@ -746,7 +742,7 @@ test_memzone_bounded(void)
> static int
> test_memzone_free(void)
> {
> - const struct rte_memzone *mz[RTE_MAX_MEMZONE];
> + const struct rte_memzone *mz[RTE_MAX_MEMZONE + 1];
> int i;
> char name[20];
>
>
This should be split into two separate patches, as there are two
different issues being addressed. Provided that's done,
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
--
Thanks,
Anatoly
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH] test/memzone: Fix test_memzone_basic & test_memzone_free issues.
2018-01-12 17:43 ` Burakov, Anatoly
@ 2018-01-15 5:57 ` Phil Yang
0 siblings, 0 replies; 13+ messages in thread
From: Phil Yang @ 2018-01-15 5:57 UTC (permalink / raw)
To: Burakov, Anatoly, dev; +Cc: nd, Jianbo Liu, Herbert Guan
Hi Anatoly,
Thanks for your comments. Updated. Please review the version 2.
Thanks,
Phil Yang
> -----Original Message-----
> From: Burakov, Anatoly [mailto:anatoly.burakov@intel.com]
> Sent: Saturday, January 13, 2018 1:44 AM
> To: Phil Yang <Phil.Yang@arm.com>; dev@dpdk.org
> Cc: nd <nd@arm.com>; Jianbo Liu <Jianbo.Liu@arm.com>; Herbert Guan
> <Herbert.Guan@arm.com>
> Subject: Re: [dpdk-dev] [PATCH] test/memzone: Fix test_memzone_basic &
> test_memzone_free issues.
>
> On 11-Jan-18 9:41 AM, Phil Yang wrote:
> > 1. test_memzone_basic: No need to free a NULL memzone. It will cause
> > test termination.
> > 2. test_memzone_free: Out of mz[RTE_MAX_MEMZONE] memory bound
> while
> > reserving memzone for mz. It will flush variable i. Fix by extend to
> > mz[RTE_MAX_MEMZONE + 1].
> >
> > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > ---
> > test/test/test_memzone.c | 6 +-----
> > 1 file changed, 1 insertion(+), 5 deletions(-)
> >
> > diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c index
> > 6e80977..24e29a7 100644
> > --- a/test/test/test_memzone.c
> > +++ b/test/test/test_memzone.c
> > @@ -251,10 +251,6 @@ test_memzone_reserve_flags(void)
> > printf("MEMZONE FLAG 2MB\n");
> > return -1;
> > }
> > - if (rte_memzone_free(mz)) {
> > - printf("Fail memzone free\n");
> > - return -1;
> > - }
> > }
> >
> > if (hugepage_2MB_avail && hugepage_1GB_avail) { @@ -746,7
> +742,7
> > @@ test_memzone_bounded(void)
> > static int
> > test_memzone_free(void)
> > {
> > - const struct rte_memzone *mz[RTE_MAX_MEMZONE];
> > + const struct rte_memzone *mz[RTE_MAX_MEMZONE + 1];
> > int i;
> > char name[20];
> >
> >
>
> This should be split into two separate patches, as there are two different issues
> being addressed. Provided that's done,
>
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
>
> --
> Thanks,
> Anatoly
^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH 0/2] Fix memzone autotest issues
2018-01-11 9:41 [dpdk-dev] [PATCH] test/memzone: Fix test_memzone_basic & test_memzone_free issues Phil Yang
2018-01-12 5:46 ` Jianbo Liu
2018-01-12 17:43 ` Burakov, Anatoly
@ 2018-01-15 5:43 ` Phil Yang
2018-01-15 5:43 ` [dpdk-dev] [PATCH 1/2] test/memzone: Fix test_memzone_basic issue Phil Yang
` (2 more replies)
2018-01-15 5:52 ` [dpdk-dev] [PATCH v2 " Phil Yang
3 siblings, 3 replies; 13+ messages in thread
From: Phil Yang @ 2018-01-15 5:43 UTC (permalink / raw)
To: dev; +Cc: anatoly.burakov, jianbo.liu, herbert.guan, phil.yang
This series of patches are the fix for memzone autotest.
RTE>>memzone_autotest
test basic memzone API
Zone 0: name:<testzone1>, IO:0x177ffe9e00, len:0x80,
virt:0xffff7ffe9e00, socket_id:0, flags:0
Zone 1: name:<testzone2>, IO:0x177ffe9980, len:0x400,
virt:0xffff7ffe9980, socket_id:0, flags:0
Zone 2: name:<testzone4>, IO:0x177ffe9500, len:0x400,
virt:0xffff7ffe9500, socket_id:0, flags:0
check alignments and lengths
check overlapping
check socket ID
test zone lookup
test duplcate zone name
test free memzone
EAL: memzone_reserve_aligned_thread_unsafe(): No more room in config
test reserving memzone with bigger size than the maximum
test memzone_reserve flags
1GB Huge pages available
Fail memzone free
Test Failed
Phil Yang (2):
test/memzone: Fix test_memzone_basic issue
test/memzone: Fix test_memzone_free issue
test/test/test_memzone.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH 1/2] test/memzone: Fix test_memzone_basic issue
2018-01-15 5:43 ` [dpdk-dev] [PATCH 0/2] Fix memzone autotest issues Phil Yang
@ 2018-01-15 5:43 ` Phil Yang
2018-01-15 5:43 ` [dpdk-dev] [PATCH 2/2] test/memzone: Fix test_memzone_free issue Phil Yang
2018-01-17 23:41 ` [dpdk-dev] [PATCH 0/2] Fix memzone autotest issues Thomas Monjalon
2 siblings, 0 replies; 13+ messages in thread
From: Phil Yang @ 2018-01-15 5:43 UTC (permalink / raw)
To: dev; +Cc: anatoly.burakov, jianbo.liu, herbert.guan, phil.yang
No need to free a NULL memzone. It will cause test
termination.
Signed-off-by: Phil Yang <phil.yang@arm.com>
---
test/test/test_memzone.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c
index 6e80977..9c20172 100644
--- a/test/test/test_memzone.c
+++ b/test/test/test_memzone.c
@@ -251,10 +251,6 @@ test_memzone_reserve_flags(void)
printf("MEMZONE FLAG 2MB\n");
return -1;
}
- if (rte_memzone_free(mz)) {
- printf("Fail memzone free\n");
- return -1;
- }
}
if (hugepage_2MB_avail && hugepage_1GB_avail) {
--
2.7.4
^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH 2/2] test/memzone: Fix test_memzone_free issue
2018-01-15 5:43 ` [dpdk-dev] [PATCH 0/2] Fix memzone autotest issues Phil Yang
2018-01-15 5:43 ` [dpdk-dev] [PATCH 1/2] test/memzone: Fix test_memzone_basic issue Phil Yang
@ 2018-01-15 5:43 ` Phil Yang
2018-01-17 23:41 ` [dpdk-dev] [PATCH 0/2] Fix memzone autotest issues Thomas Monjalon
2 siblings, 0 replies; 13+ messages in thread
From: Phil Yang @ 2018-01-15 5:43 UTC (permalink / raw)
To: dev; +Cc: anatoly.burakov, jianbo.liu, herbert.guan, phil.yang
When reserving memzone for mz[], it will out of mz[RTE_MAX_MEMZONE] memory
bound after the counter reached to RTE_MAX_MEMZONE. It will flush the counter's
memory and lead to mz[] memory cannot be freed.
Fixd by extend to mz[RTE_MAX_MEMZONE + 1].
Signed-off-by: Phil Yang <phil.yang@arm.com>
---
test/test/test_memzone.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c
index 9c20172..24e29a7 100644
--- a/test/test/test_memzone.c
+++ b/test/test/test_memzone.c
@@ -742,7 +742,7 @@ test_memzone_bounded(void)
static int
test_memzone_free(void)
{
- const struct rte_memzone *mz[RTE_MAX_MEMZONE];
+ const struct rte_memzone *mz[RTE_MAX_MEMZONE + 1];
int i;
char name[20];
--
2.7.4
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH 0/2] Fix memzone autotest issues
2018-01-15 5:43 ` [dpdk-dev] [PATCH 0/2] Fix memzone autotest issues Phil Yang
2018-01-15 5:43 ` [dpdk-dev] [PATCH 1/2] test/memzone: Fix test_memzone_basic issue Phil Yang
2018-01-15 5:43 ` [dpdk-dev] [PATCH 2/2] test/memzone: Fix test_memzone_free issue Phil Yang
@ 2018-01-17 23:41 ` Thomas Monjalon
2 siblings, 0 replies; 13+ messages in thread
From: Thomas Monjalon @ 2018-01-17 23:41 UTC (permalink / raw)
To: Phil Yang; +Cc: dev, anatoly.burakov, jianbo.liu, herbert.guan
> Phil Yang (2):
> test/memzone: Fix test_memzone_basic issue
> test/memzone: Fix test_memzone_free issue
Applied with acks from v1, thanks.
Next time, please keep acks in new version, if nothing major changed.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH v2 0/2] Fix memzone autotest issues
2018-01-11 9:41 [dpdk-dev] [PATCH] test/memzone: Fix test_memzone_basic & test_memzone_free issues Phil Yang
` (2 preceding siblings ...)
2018-01-15 5:43 ` [dpdk-dev] [PATCH 0/2] Fix memzone autotest issues Phil Yang
@ 2018-01-15 5:52 ` Phil Yang
2018-01-15 5:52 ` [dpdk-dev] [PATCH v2 1/2] test/memzone: Fix test_memzone_basic issue Phil Yang
2018-01-15 5:52 ` [dpdk-dev] [PATCH v2 2/2] test/memzone: Fix test_memzone_free issue Phil Yang
3 siblings, 2 replies; 13+ messages in thread
From: Phil Yang @ 2018-01-15 5:52 UTC (permalink / raw)
To: dev; +Cc: anatoly.burakov, jianbo.liu, herbert.guan, phil.yang
This series of patches are the fix for memzone autotest.
RTE>>memzone_autotest
test basic memzone
API Zone 0: name:<testzone1>, IO:0x177ffe9e00, len:0x80
virt:0xffff7ffe9e00, socket_id:0, flags:0
Zone 1: name:<testzone2>, IO:0x177ffe9980, len:0x400
virt:0xffff7ffe9980, socket_id:0, flags:0
Zone 2: name:<testzone4>, IO:0x177ffe9500, len:0x400
virt:0xffff7ffe9500, socket_id:0, flags:0
check alignments and lengths
check overlapping
check socket ID
test zone lookup
test duplcate zone name
test free memzone
EAL: memzone_reserve_aligned_thread_unsafe(): No more room in config
test reserving memzone with bigger size than the maximum
test memzone_reserve flags
1GB Huge pages available
Fail memzone free
Test Failed
Phil Yang (2):
test/memzone: Fix test_memzone_basic issue
test/memzone: Fix test_memzone_free issue
test/test/test_memzone.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH v2 1/2] test/memzone: Fix test_memzone_basic issue
2018-01-15 5:52 ` [dpdk-dev] [PATCH v2 " Phil Yang
@ 2018-01-15 5:52 ` Phil Yang
2018-01-15 9:48 ` Burakov, Anatoly
2018-01-15 5:52 ` [dpdk-dev] [PATCH v2 2/2] test/memzone: Fix test_memzone_free issue Phil Yang
1 sibling, 1 reply; 13+ messages in thread
From: Phil Yang @ 2018-01-15 5:52 UTC (permalink / raw)
To: dev; +Cc: anatoly.burakov, jianbo.liu, herbert.guan, phil.yang
No need to free a NULL memzone. It will cause test
termination.
Signed-off-by: Phil Yang <phil.yang@arm.com>
---
test/test/test_memzone.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c
index 6e80977..9c20172 100644
--- a/test/test/test_memzone.c
+++ b/test/test/test_memzone.c
@@ -251,10 +251,6 @@ test_memzone_reserve_flags(void)
printf("MEMZONE FLAG 2MB\n");
return -1;
}
- if (rte_memzone_free(mz)) {
- printf("Fail memzone free\n");
- return -1;
- }
}
if (hugepage_2MB_avail && hugepage_1GB_avail) {
--
2.7.4
^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH v2 2/2] test/memzone: Fix test_memzone_free issue
2018-01-15 5:52 ` [dpdk-dev] [PATCH v2 " Phil Yang
2018-01-15 5:52 ` [dpdk-dev] [PATCH v2 1/2] test/memzone: Fix test_memzone_basic issue Phil Yang
@ 2018-01-15 5:52 ` Phil Yang
2018-01-15 9:49 ` Burakov, Anatoly
1 sibling, 1 reply; 13+ messages in thread
From: Phil Yang @ 2018-01-15 5:52 UTC (permalink / raw)
To: dev; +Cc: anatoly.burakov, jianbo.liu, herbert.guan, phil.yang
When reserving memzone for mz[], it will out of mz[RTE_MAX_MEMZONE] memory
bound after the counter reached to RTE_MAX_MEMZONE. It will flush the
counter's memory and lead to mz[] memory cannot be freed.
Fixd by extend to mz[RTE_MAX_MEMZONE + 1].
Signed-off-by: Phil Yang <phil.yang@arm.com>
---
test/test/test_memzone.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c
index 9c20172..24e29a7 100644
--- a/test/test/test_memzone.c
+++ b/test/test/test_memzone.c
@@ -742,7 +742,7 @@ test_memzone_bounded(void)
static int
test_memzone_free(void)
{
- const struct rte_memzone *mz[RTE_MAX_MEMZONE];
+ const struct rte_memzone *mz[RTE_MAX_MEMZONE + 1];
int i;
char name[20];
--
2.7.4
^ permalink raw reply [flat|nested] 13+ messages in thread