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 5AB3845D32 for ; Mon, 18 Nov 2024 19:22:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E14742E70; Mon, 18 Nov 2024 19:22:23 +0100 (CET) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id 0C51442D72 for ; Mon, 18 Nov 2024 19:22:15 +0100 (CET) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-72467c35ddeso3237194b3a.0 for ; Mon, 18 Nov 2024 10:22:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731954134; x=1732558934; 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=mnKp33iDnBGzdKqp35kMvb1qLm65LTZmX6fUcR5vpAs=; b=tD3BVNaswG6tKNEu/a9JZkReVAQykN2spCn+eWlquWVud0pP7qokco4SawqxSzucGq 9aZYbXYEd+OOYpiMyntfQsZ2XcinVBkr8++OJf1EqPUBF619r7DeMDc7rQwTclf5KYZt 4ALxIzx+E1zaNYG2XNfYOOovvbPjqMpAgO2QOxsQAUxgJFhM39gG5GKYc/UX7aLvj3gT oLFx3QmCdzq9SzxAOKphoE+pp5xSDcXQFECy5Pm54nlPvZrxb1pYmggh7PpDFIVXJLa6 HCgjsAAo2xRFO7bEjcMIUTEi4nyrd/XSFgrN19kk3SBz+E5urXRygCCAO5iCJIHiTHkt ihmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731954134; x=1732558934; 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=mnKp33iDnBGzdKqp35kMvb1qLm65LTZmX6fUcR5vpAs=; b=ghRg99uIzgJ5as3GkiN27fqFP1vj65rOV/uZ7fHrVU1p7Q26eBREybeslcuhjFyB2B 9FoBdKj7iOER36k1MSoAEjcHULeTbcEVVls4yRb7tLqqdrg0TmMH071MZThr5Ms7aQYh adYx8GxEVqP3xIAeG2IP7dTjQi2yoPXL/P3rcpsJEV2PEbcJMuNviIQN0z5ZnjY5ycD1 8mGcLrQW+5Oj65kAtkwpmh292D3Xvysk7vcAsLmjGk/q9DcB3E8ONtK1ro1HMPqENL3/ O3KeYCT9G5aBa0tVDJrO8Zi74RuVM2tEvHQ3q1+0jw5PR48YERwHw8O9BYi5xOUmHVVK 9RnA== X-Forwarded-Encrypted: i=1; AJvYcCXviemkMrpU2rC5C7GwD6rVUKhOLxO4wJmtO0uz4m2ugEkmov1iWrjot50X0YSBvYf3eY0/6sI=@dpdk.org X-Gm-Message-State: AOJu0YyzbBjEnvH+8GSQlzVFDbnEggrKnm5hyXD+ZI+eFbcFp2DJ8Mc7 aGUn+wQRbBr0voxjUBn1q/WW71G3zT0JTrDTbyfhykM3xUQ8y2E1oXnujBgRcaQ= X-Google-Smtp-Source: AGHT+IEq8M7HC9j8RXfuWjiVFIhk5MJDvE+ayObcytGcCDM2Puj8i4wZW7xQGqLXTISYycVIf0IdJQ== X-Received: by 2002:a17:90b:3806:b0:2ea:9ccb:d206 with SMTP id 98e67ed59e1d1-2eaaa7854b5mr474701a91.8.1731954133754; Mon, 18 Nov 2024 10:22:13 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ea61869bb2sm2916724a91.12.2024.11.18.10.22.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2024 10:22:13 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , sunil.kori@nxp.com, stable@dpdk.org, Hemant Agrawal Subject: [PATCH v2 14/19] event/dpaa: fix bitmask truncation Date: Mon, 18 Nov 2024 10:20:55 -0800 Message-ID: <20241118182153.87042-15-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241118182153.87042-1-stephen@networkplumber.org> References: <20241115060738.313190-1-stephen@networkplumber.org> <20241118182153.87042-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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 Acked-by: Hemant Agrawal --- 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