DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/1] test_table: added ACL table test to the list
@ 2015-08-12 12:41 Maciej Gajdzica
  2015-08-12 12:41 ` [dpdk-dev] [PATCH 1/1] test_table: fixed failing unit tests checking offset Maciej Gajdzica
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Maciej Gajdzica @ 2015-08-12 12:41 UTC (permalink / raw)
  To: dev

test_table_ACL wasn't invoked when running table_autotest. Added this
test to table_tests array to make it run with other table tests.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
---
 app/test/test_table_tables.c |    3 +++
 app/test/test_table_tables.h |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/test/test_table_tables.c b/app/test/test_table_tables.c
index 88bebf8..a66e277 100644
--- a/app/test/test_table_tables.c
+++ b/app/test/test_table_tables.c
@@ -46,6 +46,9 @@ table_test table_tests[] = {
 	test_table_lpm_ipv6,
 	test_table_hash_lru,
 	test_table_hash_ext,
+#ifdef RTE_LIBRTE_ACL
+	test_table_ACL,
+#endif
 };
 
 #define PREPARE_PACKET(mbuf, value) do {				\
diff --git a/app/test/test_table_tables.h b/app/test/test_table_tables.h
index b368623..3d31492 100644
--- a/app/test/test_table_tables.h
+++ b/app/test/test_table_tables.h
@@ -36,7 +36,7 @@ int test_table_lpm(void);
 int test_table_lpm_ipv6(void);
 int test_table_array(void);
 #ifdef RTE_LIBRTE_ACL
-int test_table_acl(void);
+int test_table_ACL(void);
 #endif
 int test_table_hash_unoptimized(void);
 int test_table_hash_lru(void);
-- 
1.7.9.5

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

* [dpdk-dev] [PATCH 1/1] test_table: fixed failing unit tests checking offset
  2015-08-12 12:41 [dpdk-dev] [PATCH 1/1] test_table: added ACL table test to the list Maciej Gajdzica
@ 2015-08-12 12:41 ` Maciej Gajdzica
  2015-08-13 10:50   ` Mrzyglod, DanielX T
  2015-08-12 12:52 ` [dpdk-dev] [PATCH 1/1] test_table: added ACL table test to the list Thomas Monjalon
  2015-08-17 14:12 ` Gajdzica, MaciejX T
  2 siblings, 1 reply; 8+ messages in thread
From: Maciej Gajdzica @ 2015-08-12 12:41 UTC (permalink / raw)
  To: dev

In commit: 1129992baa61d72c5 checking for offset alignment was removed.
Unit tests wasn't updated to reflect that change. This patch changes
checks with unaligned offsets to make tests pass.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
---
 app/test/test_table_tables.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/test/test_table_tables.c b/app/test/test_table_tables.c
index 14add77..88bebf8 100644
--- a/app/test/test_table_tables.c
+++ b/app/test/test_table_tables.c
@@ -226,7 +226,7 @@ test_table_array(void)
 	array_params.offset = 1;
 
 	table = rte_table_array_ops.f_create(&array_params, 0, 1);
-	if (table != NULL)
+	if (table == NULL)
 		return -4;
 
 	array_params.offset = 32;
@@ -652,14 +652,14 @@ test_table_hash_lru_generic(struct rte_table_ops *ops)
 	hash_params.signature_offset = 1;
 
 	table = ops->f_create(&hash_params, 0, 1);
-	if (table != NULL)
+	if (table == NULL)
 		return -2;
 
 	hash_params.signature_offset = 0;
 	hash_params.key_offset = 1;
 
 	table = ops->f_create(&hash_params, 0, 1);
-	if (table != NULL)
+	if (table == NULL)
 		return -3;
 
 	hash_params.key_offset = 32;
@@ -765,14 +765,14 @@ test_table_hash_ext_generic(struct rte_table_ops *ops)
 	hash_params.n_entries_ext = 1 << 4;
 	hash_params.signature_offset = 1;
 	table = ops->f_create(&hash_params, 0, 1);
-	if (table != NULL)
+	if (table == NULL)
 		return -2;
 
 	hash_params.signature_offset = 0;
 	hash_params.key_offset = 1;
 
 	table = ops->f_create(&hash_params, 0, 1);
-	if (table != NULL)
+	if (table == NULL)
 		return -3;
 
 	hash_params.key_offset = 32;
-- 
1.7.9.5

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

* Re: [dpdk-dev] [PATCH 1/1] test_table: added ACL table test to the list
  2015-08-12 12:41 [dpdk-dev] [PATCH 1/1] test_table: added ACL table test to the list Maciej Gajdzica
  2015-08-12 12:41 ` [dpdk-dev] [PATCH 1/1] test_table: fixed failing unit tests checking offset Maciej Gajdzica
@ 2015-08-12 12:52 ` Thomas Monjalon
  2015-08-12 12:58   ` Gajdzica, MaciejX T
  2015-08-17 14:12 ` Gajdzica, MaciejX T
  2 siblings, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2015-08-12 12:52 UTC (permalink / raw)
  To: Maciej Gajdzica; +Cc: dev

2015-08-12 14:41, Maciej Gajdzica:
> test_table_ACL wasn't invoked when running table_autotest. Added this
> test to table_tests array to make it run with other table tests.
> 
> Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
[...]
> --- a/app/test/test_table_tables.h
> +++ b/app/test/test_table_tables.h
> @@ -36,7 +36,7 @@ int test_table_lpm(void);
>  int test_table_lpm_ipv6(void);
>  int test_table_array(void);
>  #ifdef RTE_LIBRTE_ACL
> -int test_table_acl(void);
> +int test_table_ACL(void);

Why renaming it uppercase?
Function names should be lowercase.

It is lowercase also in app/test/test_table_combined.h

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

* Re: [dpdk-dev] [PATCH 1/1] test_table: added ACL table test to the list
  2015-08-12 12:52 ` [dpdk-dev] [PATCH 1/1] test_table: added ACL table test to the list Thomas Monjalon
@ 2015-08-12 12:58   ` Gajdzica, MaciejX T
  2015-08-13 10:25     ` Gajdzica, MaciejX T
  0 siblings, 1 reply; 8+ messages in thread
From: Gajdzica, MaciejX T @ 2015-08-12 12:58 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, August 12, 2015 2:53 PM
> To: Gajdzica, MaciejX T
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/1] test_table: added ACL table test to the list
> 
> 2015-08-12 14:41, Maciej Gajdzica:
> > test_table_ACL wasn't invoked when running table_autotest. Added this
> > test to table_tests array to make it run with other table tests.
> >
> > Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
> [...]
> > --- a/app/test/test_table_tables.h
> > +++ b/app/test/test_table_tables.h
> > @@ -36,7 +36,7 @@ int test_table_lpm(void);  int
> > test_table_lpm_ipv6(void);  int test_table_array(void);  #ifdef
> > RTE_LIBRTE_ACL -int test_table_acl(void);
> > +int test_table_ACL(void);
> 
> Why renaming it uppercase?
> Function names should be lowercase.
> 
> It is lowercase also in app/test/test_table_combined.h

Yes, but in app/test/test_table_acl.c it is uppercase, and there is no definition for lowercase function. I can change name in test_table_acl.c to lowercase.

Best Regards
Maciek

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

* Re: [dpdk-dev] [PATCH 1/1] test_table: added ACL table test to the list
  2015-08-12 12:58   ` Gajdzica, MaciejX T
@ 2015-08-13 10:25     ` Gajdzica, MaciejX T
  0 siblings, 0 replies; 8+ messages in thread
From: Gajdzica, MaciejX T @ 2015-08-13 10:25 UTC (permalink / raw)
  To: Gajdzica, MaciejX T, Thomas Monjalon; +Cc: dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Gajdzica, MaciejX T
> Sent: Wednesday, August 12, 2015 2:58 PM
> To: Thomas Monjalon
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/1] test_table: added ACL table test to the list
> 
> 
> 
> > -----Original Message-----
> > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > Sent: Wednesday, August 12, 2015 2:53 PM
> > To: Gajdzica, MaciejX T
> > Cc: dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH 1/1] test_table: added ACL table test
> > to the list
> >
> > 2015-08-12 14:41, Maciej Gajdzica:
> > > test_table_ACL wasn't invoked when running table_autotest. Added
> > > this test to table_tests array to make it run with other table tests.
> > >
> > > Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
> > [...]
> > > --- a/app/test/test_table_tables.h
> > > +++ b/app/test/test_table_tables.h
> > > @@ -36,7 +36,7 @@ int test_table_lpm(void);  int
> > > test_table_lpm_ipv6(void);  int test_table_array(void);  #ifdef
> > > RTE_LIBRTE_ACL -int test_table_acl(void);
> > > +int test_table_ACL(void);
> >
> > Why renaming it uppercase?
> > Function names should be lowercase.
> >
> > It is lowercase also in app/test/test_table_combined.h
> 
> Yes, but in app/test/test_table_acl.c it is uppercase, and there is no definition
> for lowercase function. I can change name in test_table_acl.c to lowercase.

In current code ACL table tests are executed at the end after table tests and table tests combined, so this patch is not needed. I will only send patch with function name renamed to lowercase.

Best Regards
Maciek

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

* Re: [dpdk-dev] [PATCH 1/1] test_table: fixed failing unit tests checking offset
  2015-08-12 12:41 ` [dpdk-dev] [PATCH 1/1] test_table: fixed failing unit tests checking offset Maciej Gajdzica
@ 2015-08-13 10:50   ` Mrzyglod, DanielX T
  2015-08-17 16:04     ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: Mrzyglod, DanielX T @ 2015-08-13 10:50 UTC (permalink / raw)
  To: Gajdzica, MaciejX T, dev

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Maciej Gajdzica
> Sent: Wednesday, August 12, 2015 2:41 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH 1/1] test_table: fixed failing unit tests checking
> offset
> 
> In commit: 1129992baa61d72c5 checking for offset alignment was removed.
> Unit tests wasn't updated to reflect that change. This patch changes
> checks with unaligned offsets to make tests pass.
> 
> Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>

Acked-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>

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

* Re: [dpdk-dev] [PATCH 1/1] test_table: added ACL table test to the list
  2015-08-12 12:41 [dpdk-dev] [PATCH 1/1] test_table: added ACL table test to the list Maciej Gajdzica
  2015-08-12 12:41 ` [dpdk-dev] [PATCH 1/1] test_table: fixed failing unit tests checking offset Maciej Gajdzica
  2015-08-12 12:52 ` [dpdk-dev] [PATCH 1/1] test_table: added ACL table test to the list Thomas Monjalon
@ 2015-08-17 14:12 ` Gajdzica, MaciejX T
  2 siblings, 0 replies; 8+ messages in thread
From: Gajdzica, MaciejX T @ 2015-08-17 14:12 UTC (permalink / raw)
  To: dev


> -----Original Message-----
> From: Gajdzica, MaciejX T
> Sent: Wednesday, August 12, 2015 2:41 PM
> To: dev@dpdk.org
> Cc: Gajdzica, MaciejX T
> Subject: [PATCH 1/1] test_table: added ACL table test to the list
> 
> test_table_ACL wasn't invoked when running table_autotest. Added this test to
> table_tests array to make it run with other table tests.
> 
> Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>

NACK - In current code ACL table tests are executed at the end after table tests and table tests combined, so this patch is not needed.

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

* Re: [dpdk-dev] [PATCH 1/1] test_table: fixed failing unit tests checking offset
  2015-08-13 10:50   ` Mrzyglod, DanielX T
@ 2015-08-17 16:04     ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2015-08-17 16:04 UTC (permalink / raw)
  To: Gajdzica, MaciejX T; +Cc: dev

> > In commit: 1129992baa61d72c5 checking for offset alignment was removed.
> > Unit tests wasn't updated to reflect that change. This patch changes
> > checks with unaligned offsets to make tests pass.
> > 
> > Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
> 
> Acked-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>

Applied, thanks

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

end of thread, other threads:[~2015-08-17 16:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-12 12:41 [dpdk-dev] [PATCH 1/1] test_table: added ACL table test to the list Maciej Gajdzica
2015-08-12 12:41 ` [dpdk-dev] [PATCH 1/1] test_table: fixed failing unit tests checking offset Maciej Gajdzica
2015-08-13 10:50   ` Mrzyglod, DanielX T
2015-08-17 16:04     ` Thomas Monjalon
2015-08-12 12:52 ` [dpdk-dev] [PATCH 1/1] test_table: added ACL table test to the list Thomas Monjalon
2015-08-12 12:58   ` Gajdzica, MaciejX T
2015-08-13 10:25     ` Gajdzica, MaciejX T
2015-08-17 14:12 ` Gajdzica, MaciejX T

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