summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHemant Agrawal <hemant.agrawal@nxp.com>2017-07-19 13:43:10 +0530
committerYuanhan Liu <yliu@fridaylinux.org>2017-08-29 14:50:28 +0800
commit70a5f69d0f71953d50f0828e0301f697225d3fb6 (patch)
treec75e64cbd45143601beced910b09cf152ccc0f19
parent1a7097fe808c6d86caf4e1e42394fb488a5dea49 (diff)
downloaddpdk-stable-70a5f69d0f71953d50f0828e0301f697225d3fb6.zip
dpdk-stable-70a5f69d0f71953d50f0828e0301f697225d3fb6.tar.gz
dpdk-stable-70a5f69d0f71953d50f0828e0301f697225d3fb6.tar.xz
examples/qos_sched: fix build for less lcores
[ upstream commit e481ebfd622c23a1d854cb4655a3534d68d322af ] 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") Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
-rw-r--r--examples/qos_sched/main.h5
1 files changed, 5 insertions, 0 deletions
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