From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hemant Agrawal Subject: [PATCH] examples/qos_sched: fix core limit for lower num of lcore Date: Mon, 17 Jul 2017 11:19:02 +0530 Message-ID: <1500270542-1197-1-git-send-email-hemant.agrawal@nxp.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , To: Return-path: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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