[dpdk-dev,v2] examples/load_balancer: enable the build for lesser lcores

Message ID 1500452375-31526-1-git-send-email-hemant.agrawal@nxp.com (mailing list archive)
State Accepted, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Hemant Agrawal July 19, 2017, 8:19 a.m. UTC
  load_balancer app can also work for lower number of cores.
Limit the cores Worker and IO cores to 16 as defined in original
App. Otherwise use the actual number of lcores as MAX.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
v2: Revert back the condition check

 examples/load_balancer/main.h | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Comments

Thomas Monjalon July 21, 2017, 2:31 p.m. UTC | #1
19/07/2017 11:19, Hemant Agrawal:
> load_balancer app can also work for lower number of cores.
> Limit the cores Worker and IO cores to 16 as defined in original
> App. Otherwise use the actual number of lcores as MAX.
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
> v2: Revert back the condition check

Applied, thanks
  

Patch

diff --git a/examples/load_balancer/main.h b/examples/load_balancer/main.h
index d98468a..dc40755 100644
--- a/examples/load_balancer/main.h
+++ b/examples/load_balancer/main.h
@@ -56,7 +56,11 @@ 
 #endif
 
 #ifndef APP_MAX_IO_LCORES
+#if (APP_MAX_LCORES > 16)
 #define APP_MAX_IO_LCORES 16
+#else
+#define APP_MAX_IO_LCORES APP_MAX_LCORES
+#endif
 #endif
 #if (APP_MAX_IO_LCORES > APP_MAX_LCORES)
 #error "APP_MAX_IO_LCORES is too big"
@@ -74,7 +78,11 @@ 
 #endif
 
 #ifndef APP_MAX_WORKER_LCORES
+#if (APP_MAX_LCORES > 16)
 #define APP_MAX_WORKER_LCORES 16
+#else
+#define APP_MAX_WORKER_LCORES APP_MAX_LCORES
+#endif
 #endif
 #if (APP_MAX_WORKER_LCORES > APP_MAX_LCORES)
 #error "APP_MAX_WORKER_LCORES is too big"