diff options
author | Hemant Agrawal <hemant.agrawal@nxp.com> | 2017-07-19 13:49:35 +0530 |
---|---|---|
committer | Thomas Monjalon <thomas@monjalon.net> | 2017-07-21 17:36:20 +0300 |
commit | af35e12191f5817c38b37b0ea1142bcd19e30c74 (patch) | |
tree | d1447dc264a00af8e9d239adcfded48cfb61d843 | |
parent | 59bcf8084f8974ec2e52d90fd98f4a70c0eecd10 (diff) |
examples/load_balancer: fix build for less lcores
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>
-rw-r--r-- | examples/load_balancer/main.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/load_balancer/main.h b/examples/load_balancer/main.h index d98468a7c..dc407555d 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" |