DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/load_balancer: enable the build for lesser lcores
@ 2017-07-17  8:41 Hemant Agrawal
  2017-07-19  5:21 ` Thomas Monjalon
  2017-07-19  8:19 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
  0 siblings, 2 replies; 5+ messages in thread
From: Hemant Agrawal @ 2017-07-17  8:41 UTC (permalink / raw)
  To: thomas; +Cc: dev

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>
---
 examples/load_balancer/main.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/examples/load_balancer/main.h b/examples/load_balancer/main.h
index d98468a..8b8963d 100644
--- a/examples/load_balancer/main.h
+++ b/examples/load_balancer/main.h
@@ -56,10 +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
-#if (APP_MAX_IO_LCORES > APP_MAX_LCORES)
-#error "APP_MAX_IO_LCORES is too big"
 #endif
 
 #ifndef APP_MAX_NIC_RX_QUEUES_PER_IO_LCORE
@@ -74,10 +75,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
-#if (APP_MAX_WORKER_LCORES > APP_MAX_LCORES)
-#error "APP_MAX_WORKER_LCORES is too big"
 #endif
 
 
-- 
2.7.4

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

end of thread, other threads:[~2017-07-21 14:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-17  8:41 [dpdk-dev] [PATCH] examples/load_balancer: enable the build for lesser lcores Hemant Agrawal
2017-07-19  5:21 ` Thomas Monjalon
2017-07-19  7:57   ` Hemant Agrawal
2017-07-19  8:19 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
2017-07-21 14:31   ` Thomas Monjalon

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