test/flow-classify: fix failure on dual socket systems

Message ID 20200501110814.67384-1-harry.van.haaren@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series test/flow-classify: fix failure on dual socket systems |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS

Commit Message

Van Haaren, Harry May 1, 2020, 11:08 a.m. UTC
  This commit fixes failures of the flow_classify_autotest when
ran on dual-socket servers, as the sample application does not
support more than a single socket. Increasing the NB_SOCKETS
value allows the test to run successfully.

Fixes: 9c9befea4f57 ("test: add flow classify unit tests")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>

---

DPDK does not provide a RTE_SOCKETS_MAX #define, so we cannot
easily statically allocate the array. As a bugfix patch, I'd
prefer not add complexity of dynamically allocating based on
rte_socket_count(), hence just increasing the value seems the
most pragmatic fix.

Fixes: tag is a bit complex, code was moved in previous commit.
This fixes tag is against when the NB_SOCKET = 1 was introduced.

Cc: stable@dpdk.org

---
 app/test/test_flow_classify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ferruh Yigit May 1, 2020, 11:50 a.m. UTC | #1
On 5/1/2020 12:08 PM, Harry van Haaren wrote:
> This commit fixes failures of the flow_classify_autotest when
> ran on dual-socket servers, as the sample application does not
> support more than a single socket. Increasing the NB_SOCKETS
> value allows the test to run successfully.
> 
> Fixes: 9c9befea4f57 ("test: add flow classify unit tests")
> 
> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
> 
> ---
> 
> DPDK does not provide a RTE_SOCKETS_MAX #define, so we cannot
> easily statically allocate the array. As a bugfix patch, I'd
> prefer not add complexity of dynamically allocating based on
> rte_socket_count(), hence just increasing the value seems the
> most pragmatic fix.
> 
> Fixes: tag is a bit complex, code was moved in previous commit.
> This fixes tag is against when the NB_SOCKET = 1 was introduced.
> 
> Cc: stable@dpdk.org
> 

Thanks for the fix.

Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Iremonger, Bernard May 5, 2020, 11:02 a.m. UTC | #2
Hi Harry,

> -----Original Message-----
> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> Sent: Friday, May 1, 2020 12:51 PM
> To: Van Haaren, Harry <harry.van.haaren@intel.com>; dev@dpdk.org
> Cc: Iremonger, Bernard <bernard.iremonger@intel.com>; stable@dpdk.org
> Subject: Re: [PATCH] test/flow-classify: fix failure on dual socket systems
> 
> On 5/1/2020 12:08 PM, Harry van Haaren wrote:
> > This commit fixes failures of the flow_classify_autotest when ran on
> > dual-socket servers, as the sample application does not support more
> > than a single socket. Increasing the NB_SOCKETS value allows the test
> > to run successfully.
> >
> > Fixes: 9c9befea4f57 ("test: add flow classify unit tests")
> >
> > Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
> >
> > ---
> >
> > DPDK does not provide a RTE_SOCKETS_MAX #define, so we cannot easily
> > statically allocate the array. As a bugfix patch, I'd prefer not add
> > complexity of dynamically allocating based on rte_socket_count(),
> > hence just increasing the value seems the most pragmatic fix.
> >
> > Fixes: tag is a bit complex, code was moved in previous commit.
> > This fixes tag is against when the NB_SOCKET = 1 was introduced.
> >
> > Cc: stable@dpdk.org
> >
> 
> Thanks for the fix.
> 
> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
Tested-by: Bernard Iremonger <bernard.iremonger@intel.com

The Cc: stable@dpdk.org line should be after the fixes line in the commit message.

Otherwise

Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
  
David Marchand May 11, 2020, 8:56 p.m. UTC | #3
On Fri, May 1, 2020 at 1:07 PM Harry van Haaren
<harry.van.haaren@intel.com> wrote:
>
> This commit fixes failures of the flow_classify_autotest when
> ran on dual-socket servers, as the sample application does not
> support more than a single socket. Increasing the NB_SOCKETS
> value allows the test to run successfully.
>
> Fixes: 9c9befea4f57 ("test: add flow classify unit tests")
Cc: stable@dpdk.org


> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>

Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

Applied.
  

Patch

diff --git a/app/test/test_flow_classify.c b/app/test/test_flow_classify.c
index ff5265c6a..ef0b6fdd5 100644
--- a/app/test/test_flow_classify.c
+++ b/app/test/test_flow_classify.c
@@ -23,7 +23,7 @@ 
 
 #define FLOW_CLASSIFY_MAX_RULE_NUM 100
 #define MAX_PKT_BURST              32
-#define NB_SOCKETS                 1
+#define NB_SOCKETS                 4
 #define MEMPOOL_CACHE_SIZE         256
 #define MBUF_SIZE                  512
 #define NB_MBUF                    512