From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: <slawomirx.mrozowicz@intel.com>
Cc: <cristian.dumitrescu@intel.com>, <dev@dpdk.org>, <stable@dpdk.org>
Subject: [dpdk-dev] [PATCH v2] examples/qos_sched: fix core limit for lower num of lcore
Date: Mon, 17 Jul 2017 14:07:11 +0530 [thread overview]
Message-ID: <1500280631-6634-1-git-send-email-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <1500270542-1197-1-git-send-email-hemant.agrawal@nxp.com>
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
next prev parent reply other threads:[~2017-07-17 8:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-17 5:49 [dpdk-dev] [PATCH] " Hemant Agrawal
2017-07-17 8:37 ` Hemant Agrawal [this message]
2017-07-19 5:24 ` [dpdk-dev] [dpdk-stable] [PATCH v2] " 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1500280631-6634-1-git-send-email-hemant.agrawal@nxp.com \
--to=hemant.agrawal@nxp.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=slawomirx.mrozowicz@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).