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

* Re: [dpdk-dev] [PATCH] examples/load_balancer: enable the build for lesser lcores
  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
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2017-07-19  5:21 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dev

17/07/2017 11:41, Hemant Agrawal:
> --- a/examples/load_balancer/main.h
> +++ b/examples/load_balancer/main.h
>  #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_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

Why removing the checks > APP_MAX_LCORES ?

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

* Re: [dpdk-dev] [PATCH] examples/load_balancer: enable the build for lesser lcores
  2017-07-19  5:21 ` Thomas Monjalon
@ 2017-07-19  7:57   ` Hemant Agrawal
  0 siblings, 0 replies; 5+ messages in thread
From: Hemant Agrawal @ 2017-07-19  7:57 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On 7/19/2017 10:51 AM, Thomas Monjalon wrote:
> 17/07/2017 11:41, Hemant Agrawal:
>> --- a/examples/load_balancer/main.h
>> +++ b/examples/load_balancer/main.h
>>  #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_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
>
> Why removing the checks > APP_MAX_LCORES ?
>
It is not going to be needed unless someone defines it.
I will send v2 with reverting them back.

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

* [dpdk-dev] [PATCH v2] examples/load_balancer: enable the build for lesser lcores
  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  8:19 ` Hemant Agrawal
  2017-07-21 14:31   ` Thomas Monjalon
  1 sibling, 1 reply; 5+ messages in thread
From: Hemant Agrawal @ 2017-07-19  8:19 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>
---
v2: Revert back the condition check

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

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"
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH v2] examples/load_balancer: enable the build for lesser lcores
  2017-07-19  8:19 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
@ 2017-07-21 14:31   ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2017-07-21 14:31 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dev

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

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