From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9A89745D0B; Fri, 15 Nov 2024 07:09:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9967342F7A; Fri, 15 Nov 2024 07:08:41 +0100 (CET) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mails.dpdk.org (Postfix) with ESMTP id 0E1C242F75 for ; Fri, 15 Nov 2024 07:08:40 +0100 (CET) Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-2ea0a592c25so348972a91.1 for ; Thu, 14 Nov 2024 22:08:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731650919; x=1732255719; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rhwClWJ/gCH8WMYQ75MzaycfR4y45MJgPh/HowybB+U=; b=HTWT0hIFuxRGK8woADDAXrk8YRbTPGkP0nqbriSd6D9w14Abmeb5mShRTQIGFZPkGt JjwCGE+DzBE3VwFv00DddLiAqs40RNeQyS0zKhyeGHBKR/JKWAsFjc7PnekUGqBRerbU LpolngEM/doDPFH004lx6nR1dyZMMWhPzVIXKxQo+I7HqN/jaDNZjkdXcSWWOC1C8bZA mK1UQ6923+Z47nTHuD92SXsu346TCxBUjBMJo4KNx5qR0WoHvDRCoCP7qarbWXRRx31t orwSUCdDgJQreaW2X5vRG+oJr/boTdzCdEgtEr4OUMw0Qxo/3iBlf0hHfwZSwZ1KXfGb EhDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731650919; x=1732255719; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rhwClWJ/gCH8WMYQ75MzaycfR4y45MJgPh/HowybB+U=; b=nuTIWlsazpqrdEuuPfLlC91IjlAnno2blo/C+eHhwNNpRMCNlvrhGzPX3xyBBg2kE6 UMw6OmMaern6RnbgPHUe2RzrarTur5w3Duk8HXZ3Bsx6U0XdAiPHPlHpmAVHWISsmGew 7UJJeVDYkX0zjZejvK7kvnWNBcpMYJ055XFALGnFjv/OOLwJLYXerF2jL52Rujy4nzet 6VZkUCLdrbzBFnWoaY7/WldIWxXkXY2MxqzutKane3I+OTRZBh+DXt4M+8GnHKgZyh1B 6cHsdhr9WI++Z/+eMsvaPzqIFlpK6cT4Xo7HjEjE2l7B2RbnaHdjMl4bIZ2Z3VEPv+tX 7hJQ== X-Gm-Message-State: AOJu0Yz3uSIcyhN1IUYqu+AvbkPM+5OrtvdDCNWPaseY8NC11hPy5jGW g4qmqOcX82e/OM9RPHhA2wQdUsK9/O4t9o1MxEUwsX0pWq7kcbIH8w9+eztklh5ARFjSCm98Ucs P X-Google-Smtp-Source: AGHT+IGJCtDB4iz/Bk1SoyXtA9r0t4Dr/DnwAI+LzUpB4uj5fVsq1gXOxasrCTL7GjospPVloFQwxw== X-Received: by 2002:a17:90b:350e:b0:2ea:14c4:7b8c with SMTP id 98e67ed59e1d1-2ea154cd16amr2128603a91.5.1731650919236; Thu, 14 Nov 2024 22:08:39 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ea06f4856esm2123781a91.23.2024.11.14.22.08.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2024 22:08:38 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , sunil.kori@nxp.com, stable@dpdk.org, Hemant Agrawal , Sachin Saxena , skori@marvell.com Subject: [PATCH 14/16] event/dpaa: fix bitmask truncation Date: Thu, 14 Nov 2024 22:05:51 -0800 Message-ID: <20241115060738.313190-15-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241115060738.313190-1-stephen@networkplumber.org> References: <20241115060738.313190-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.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 --- 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