DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/qos_sched: fix core limit for lower num of lcore
@ 2017-07-17  5:49 Hemant Agrawal
  2017-07-17  8:37 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
  0 siblings, 1 reply; 6+ messages in thread
From: Hemant Agrawal @ 2017-07-17  5:49 UTC (permalink / raw)
  To: slawomirx.mrozowicz; +Cc: cristian.dumitrescu, dev, stable

APP_MAX_LCORES is hardcoded as 64.
This will cause build err when RTE_MAX_LCORE is less then 64.

"args.c:127:22: error: iteration 8 invokes undefined behavior
	[-Werror=aggressive-loop-optimizations]
   if (cfg->lcore_role[i] == ROLE_RTE)
       ~~~~~~~~~~~~~~~^~~
args.c:126:2: note: within this loop
  for (i = 0; i < APP_MAX_LCORE; i++) {"

Fixes: d52b5e735aa3 ("examples/qos_sched: fix lcore limit")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 examples/qos_sched/main.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h
index c7490c6..33655c4 100644
--- a/examples/qos_sched/main.h
+++ b/examples/qos_sched/main.h
@@ -69,8 +69,12 @@ extern "C" {
 #define BURST_TX_DRAIN_US 100
 
 #ifndef APP_MAX_LCORE
+#define APP_MAX_LCORE RTE_MAX_LCORE
+#endif
+#if (APP_MAX_LCORE > 64)
 #define APP_MAX_LCORE 64
 #endif
+
 #define MAX_DATA_STREAMS (APP_MAX_LCORE/2)
 #define MAX_SCHED_SUBPORTS		8
 #define MAX_SCHED_PIPES		4096
-- 
2.7.4

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

* [dpdk-dev] [PATCH v2] examples/qos_sched: fix core limit for lower num of lcore
  2017-07-17  5:49 [dpdk-dev] [PATCH] examples/qos_sched: fix core limit for lower num of lcore Hemant Agrawal
@ 2017-07-17  8:37 ` Hemant Agrawal
  2017-07-19  5:24   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
  2017-07-19  8:13   ` [dpdk-dev] [PATCH v3] " Hemant Agrawal
  0 siblings, 2 replies; 6+ messages in thread
From: Hemant Agrawal @ 2017-07-17  8:37 UTC (permalink / raw)
  To: slawomirx.mrozowicz; +Cc: cristian.dumitrescu, dev, stable

APP_MAX_LCORES is hardcoded as 64.
This will cause build err when RTE_MAX_LCORE is less then 64.

"args.c:127:22: error: iteration 8 invokes undefined behavior
	[-Werror=aggressive-loop-optimizations]
   if (cfg->lcore_role[i] == ROLE_RTE)
       ~~~~~~~~~~~~~~~^~~
args.c:126:2: note: within this loop
  for (i = 0; i < APP_MAX_LCORE; i++) {"

Fixes: d52b5e735aa3 ("examples/qos_sched: fix lcore limit")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
v2: fix the compilation error for higher number of cores

 examples/qos_sched/main.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h
index c7490c6..7134e92 100644
--- a/examples/qos_sched/main.h
+++ b/examples/qos_sched/main.h
@@ -69,8 +69,13 @@ extern "C" {
 #define BURST_TX_DRAIN_US 100
 
 #ifndef APP_MAX_LCORE
+#if (APP_MAX_LCORE > 64)
 #define APP_MAX_LCORE 64
+#else
+#define APP_MAX_LCORE RTE_MAX_LCORE
+#endif
 #endif
+
 #define MAX_DATA_STREAMS (APP_MAX_LCORE/2)
 #define MAX_SCHED_SUBPORTS		8
 #define MAX_SCHED_PIPES		4096
-- 
2.7.4

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] examples/qos_sched: fix core limit for lower num of lcore
  2017-07-17  8:37 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
@ 2017-07-19  5:24   ` Thomas Monjalon
  2017-07-19  7:58     ` Hemant Agrawal
  2017-07-19  8:13   ` [dpdk-dev] [PATCH v3] " Hemant Agrawal
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2017-07-19  5:24 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: stable, slawomirx.mrozowicz, cristian.dumitrescu, dev

17/07/2017 11:37, Hemant Agrawal:
> --- a/examples/qos_sched/main.h
> +++ b/examples/qos_sched/main.h
> @@ -69,8 +69,13 @@ extern "C" {
>  #define BURST_TX_DRAIN_US 100
>  
>  #ifndef APP_MAX_LCORE
> +#if (APP_MAX_LCORE > 64)
>  #define APP_MAX_LCORE 64

If APP_MAX_LCORE is not defined, it cannot be > 64, right?
Or what am I missing?

> +#else
> +#define APP_MAX_LCORE RTE_MAX_LCORE
> +#endif
>  #endif

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] examples/qos_sched: fix core limit for lower num of lcore
  2017-07-19  5:24   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
@ 2017-07-19  7:58     ` Hemant Agrawal
  0 siblings, 0 replies; 6+ messages in thread
From: Hemant Agrawal @ 2017-07-19  7:58 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: stable, slawomirx.mrozowicz, cristian.dumitrescu, dev

On 7/19/2017 10:54 AM, Thomas Monjalon wrote:
> 17/07/2017 11:37, Hemant Agrawal:
>> --- a/examples/qos_sched/main.h
>> +++ b/examples/qos_sched/main.h
>> @@ -69,8 +69,13 @@ extern "C" {
>>  #define BURST_TX_DRAIN_US 100
>>
>>  #ifndef APP_MAX_LCORE
>> +#if (APP_MAX_LCORE > 64)
>>  #define APP_MAX_LCORE 64
>
> If APP_MAX_LCORE is not defined, it cannot be > 64, right?
> Or what am I missing?
>
It should be RTE_MAX_LCORE

>> +#else
>> +#define APP_MAX_LCORE RTE_MAX_LCORE
>> +#endif
>>  #endif
>
>
>

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

* [dpdk-dev] [PATCH v3] examples/qos_sched: fix core limit for lower num of lcore
  2017-07-17  8:37 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
  2017-07-19  5:24   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
@ 2017-07-19  8:13   ` Hemant Agrawal
  2017-07-21 14:38     ` Thomas Monjalon
  1 sibling, 1 reply; 6+ messages in thread
From: Hemant Agrawal @ 2017-07-19  8:13 UTC (permalink / raw)
  To: slawomirx.mrozowicz; +Cc: cristian.dumitrescu, dev, stable

APP_MAX_LCORES is hardcoded as 64.
This will cause build err when RTE_MAX_LCORE is less then 64.

"args.c:127:22: error: iteration 8 invokes undefined behavior
	[-Werror=aggressive-loop-optimizations]
   if (cfg->lcore_role[i] == ROLE_RTE)
       ~~~~~~~~~~~~~~~^~~
args.c:126:2: note: within this loop
  for (i = 0; i < APP_MAX_LCORE; i++) {"

Fixes: d52b5e735aa3 ("examples/qos_sched: fix lcore limit")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
v3: fix as per review comment of Thomas

 examples/qos_sched/main.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h
index c7490c6..8d02e1a 100644
--- a/examples/qos_sched/main.h
+++ b/examples/qos_sched/main.h
@@ -69,8 +69,13 @@ extern "C" {
 #define BURST_TX_DRAIN_US 100
 
 #ifndef APP_MAX_LCORE
+#if (RTE_MAX_LCORE > 64)
 #define APP_MAX_LCORE 64
+#else
+#define APP_MAX_LCORE RTE_MAX_LCORE
+#endif
 #endif
+
 #define MAX_DATA_STREAMS (APP_MAX_LCORE/2)
 #define MAX_SCHED_SUBPORTS		8
 #define MAX_SCHED_PIPES		4096
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH v3] examples/qos_sched: fix core limit for lower num of lcore
  2017-07-19  8:13   ` [dpdk-dev] [PATCH v3] " Hemant Agrawal
@ 2017-07-21 14:38     ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2017-07-21 14:38 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dev, slawomirx.mrozowicz, cristian.dumitrescu, stable

19/07/2017 11:13, Hemant Agrawal:
> APP_MAX_LCORES is hardcoded as 64.
> This will cause build err when RTE_MAX_LCORE is less then 64.
> 
> "args.c:127:22: error: iteration 8 invokes undefined behavior
> 	[-Werror=aggressive-loop-optimizations]
>    if (cfg->lcore_role[i] == ROLE_RTE)
>        ~~~~~~~~~~~~~~~^~~
> args.c:126:2: note: within this loop
>   for (i = 0; i < APP_MAX_LCORE; i++) {"
> 
> Fixes: d52b5e735aa3 ("examples/qos_sched: fix lcore limit")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
> v3: fix as per review comment of Thomas

Applied, thanks

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-17  5:49 [dpdk-dev] [PATCH] examples/qos_sched: fix core limit for lower num of lcore Hemant Agrawal
2017-07-17  8:37 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
2017-07-19  5:24   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2017-07-19  7:58     ` Hemant Agrawal
2017-07-19  8:13   ` [dpdk-dev] [PATCH v3] " Hemant Agrawal
2017-07-21 14:38     ` 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).