From: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
To: dev@dpdk.org
Cc: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Subject: [dpdk-dev] [PATCH] examples/exception_path: bad shift operation in setup_port_lcore_affinities
Date: Fri, 15 Apr 2016 17:29:40 +0200 [thread overview]
Message-ID: <1460734180-121811-1-git-send-email-danielx.t.mrzyglod@intel.com> (raw)
CID: #30688
The operaton may have an undefined behavior or yield to an unexpected result.
In setup_port_lcore_affinities: A bit shift operation has a shift amount which
is too large or has a negative value.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
---
examples/exception_path/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index bec9804..c14a933 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -351,7 +351,7 @@ setup_port_lcore_affinities(void)
port_ids[i] = rx_port++;
}
- else if (output_cores_mask & (1ULL << i)) {
+ else if (output_cores_mask & (1ULL << (i & 0x3f))) {
/* Skip ports that are not enabled */
while ((ports_mask & (1 << tx_port)) == 0) {
tx_port++;
--
2.5.5
next reply other threads:[~2016-04-15 14:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-15 15:29 Daniel Mrzyglod [this message]
2016-04-27 14:24 ` 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=1460734180-121811-1-git-send-email-danielx.t.mrzyglod@intel.com \
--to=danielx.t.mrzyglod@intel.com \
--cc=dev@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).