* [Bug 979] hash: invalid shift expression in rte_thash
@ 2022-03-24 15:08 bugzilla
0 siblings, 0 replies; only message in thread
From: bugzilla @ 2022-03-24 15:08 UTC (permalink / raw)
To: dev
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-24 15:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-24 15:08 [Bug 979] hash: invalid shift expression in rte_thash bugzilla
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).