From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [Bug 979] hash: invalid shift expression in rte_thash
Date: Thu, 24 Mar 2022 15:08:29 +0000 [thread overview]
Message-ID: <bug-979-3@http.bugs.dpdk.org/> (raw)
https://bugs.dpdk.org/show_bug.cgi?id=979
Bug ID: 979
Summary: hash: invalid shift expression in rte_thash
Product: DPDK
Version: 21.11
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: vhost/virtio
Assignee: vladimir.medvedkin@intel.com
Reporter: david.marchand@redhat.com
CC: dev@dpdk.org
Target Milestone: ---
This has been reported by covscan in our internal CI for v21.11:
2. dpdk-21.11/lib/hash/rte_thash.c:116: assignment: Assigning: "j" = "0".
4. dpdk-21.11/lib/hash/rte_thash.c:118: large_shift: In expression
"(uint16_t)rss_key[(i + 1) % size] >> 8 - j", right shifting "rss_key[(i + 1) %
size]" by more than 7 bits always yields zero. The shift amount, "8 - j", is 8.
# 116| for (j = 0; j < 8; j++) {
# 117| left_part = rss_key[i] << j;
# 118|-> right_part = (uint16_t)(rss_key[(i + 1) %
size]) >>
# 119| (8 - j);
# 120| m[i * 8 + j] = left_part|right_part;
--
You are receiving this mail because:
You are on the CC list for the bug.
reply other threads:[~2022-03-24 15:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=bug-979-3@http.bugs.dpdk.org/ \
--to=bugzilla@dpdk.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.