From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
sunil.kori@nxp.com, stable@dpdk.org,
Hemant Agrawal <hemant.agrawal@nxp.com>,
Sachin Saxena <sachin.saxena@nxp.com>,
skori@marvell.com
Subject: [PATCH 14/16] event/dpaa: fix bitmask truncation
Date: Thu, 14 Nov 2024 22:05:51 -0800 [thread overview]
Message-ID: <20241115060738.313190-15-stephen@networkplumber.org> (raw)
In-Reply-To: <20241115060738.313190-1-stephen@networkplumber.org>
More bitmask truncation from mask computation.
Fixes: 0ee17f79ebd0 ("event/dpaa: add enqueue/dequeue")
Cc: sunil.kori@nxp.com
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/event/dpaa/dpaa_eventdev.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index 853cc1ecf9..400e0ecd1c 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -102,7 +102,7 @@ dpaa_event_enqueue_burst(void *port, const struct rte_event ev[],
qman_dca_index(ev[i].impl_opaque, 0);
mbuf = DPAA_PER_LCORE_DQRR_MBUF(i);
*dpaa_seqn(mbuf) = DPAA_INVALID_MBUF_SEQN;
- DPAA_PER_LCORE_DQRR_HELD &= ~(1 << i);
+ DPAA_PER_LCORE_DQRR_HELD &= ~(UINT64_C(1) << i);
DPAA_PER_LCORE_DQRR_SIZE--;
break;
default:
@@ -199,11 +199,11 @@ dpaa_event_dequeue_burst(void *port, struct rte_event ev[],
/* Check if there are atomic contexts to be released */
i = 0;
while (DPAA_PER_LCORE_DQRR_SIZE) {
- if (DPAA_PER_LCORE_DQRR_HELD & (1 << i)) {
+ if (DPAA_PER_LCORE_DQRR_HELD & (UINT64_C(1) << i)) {
qman_dca_index(i, 0);
mbuf = DPAA_PER_LCORE_DQRR_MBUF(i);
*dpaa_seqn(mbuf) = DPAA_INVALID_MBUF_SEQN;
- DPAA_PER_LCORE_DQRR_HELD &= ~(1 << i);
+ DPAA_PER_LCORE_DQRR_HELD &= ~(UINT64_C(1) << i);
DPAA_PER_LCORE_DQRR_SIZE--;
}
i++;
@@ -263,11 +263,11 @@ dpaa_event_dequeue_burst_intr(void *port, struct rte_event ev[],
/* Check if there are atomic contexts to be released */
i = 0;
while (DPAA_PER_LCORE_DQRR_SIZE) {
- if (DPAA_PER_LCORE_DQRR_HELD & (1 << i)) {
+ if (DPAA_PER_LCORE_DQRR_HELD & (UINT64_C(1) << i)) {
qman_dca_index(i, 0);
mbuf = DPAA_PER_LCORE_DQRR_MBUF(i);
*dpaa_seqn(mbuf) = DPAA_INVALID_MBUF_SEQN;
- DPAA_PER_LCORE_DQRR_HELD &= ~(1 << i);
+ DPAA_PER_LCORE_DQRR_HELD &= ~(UINT64_C(1) << i);
DPAA_PER_LCORE_DQRR_SIZE--;
}
i++;
--
2.45.2
next prev parent reply other threads:[~2024-11-15 6:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20241115060738.313190-1-stephen@networkplumber.org>
2024-11-15 6:05 ` [PATCH 06/16] eal: fix out of bounds access in devargs Stephen Hemminger
2024-11-15 6:05 ` [PATCH 07/16] net/qede: fix missing debug string Stephen Hemminger
2024-11-15 6:05 ` [PATCH 09/16] examples/ptpclient: fix self memcmp Stephen Hemminger
2024-11-15 6:05 ` [PATCH 11/16] net/hinic: fix flow type bitmask overflow Stephen Hemminger
2024-11-15 6:05 ` [PATCH 12/16] crypto/dpaa2_sec: fix bitmask truncation Stephen Hemminger
2024-11-15 6:05 ` [PATCH 13/16] crypto/dpaa_sec: " Stephen Hemminger
2024-11-15 6:05 ` Stephen Hemminger [this message]
2024-11-15 6:05 ` [PATCH 15/16] net/dpaa: " Stephen Hemminger
2024-11-15 6:05 ` [PATCH 16/16] net/dpaa2: " Stephen Hemminger
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=20241115060738.313190-15-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=sachin.saxena@nxp.com \
--cc=skori@marvell.com \
--cc=stable@dpdk.org \
--cc=sunil.kori@nxp.com \
/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).