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 4A0AC45CD8; Mon, 18 Nov 2024 19:23:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A31AC42E75; Mon, 18 Nov 2024 19:22:23 +0100 (CET) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by mails.dpdk.org (Postfix) with ESMTP id 100D042D78 for ; Mon, 18 Nov 2024 19:22:15 +0100 (CET) Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-7e6d04f74faso3004728a12.1 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=auQN5ptA/65CDfRLCt8CbouzA49UuHaWPh7fpDrs82hzflNu33cRvktvXRu+6Va67/ bcbYO89Y6hPK7BSoo3x3AtLzteIp4IpLaxXCVVrrJd15o+paj0O6xo1b1Jn8iz0/ouLW vjUcDmSX8PQQUSwZJ1xa8FGkRvcaPMjYA902PFSXOs83BuoJ+Ajq3Ug4qcnxApI8RSPX mVFj8x545VYUG391Owb9uFskBXf/YiMTq8K/N1qf7Nhwo/WoMehoGxou59mv+TxSRbfE 3nx3Mqwfvlhh8ts2RNrnKukMy1Y6Gtr8Wi2KojiBh3yrDGVo6LiN3xD3aY6Cavz3t4PI 3Smg== X-Gm-Message-State: AOJu0YyxDiwhdbDu3v91JMZgOhZtGvD8SSPqjthHp6cRnpOeXfTLVQO2 XDa2GDyBalXU3AwrHvYjHX0VkbBcRwhExx0Ptpmspr9QN0anHWxL4MSd94YP43MgKSkdLmmVrLW A 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: 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 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