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 C97C045D0B for ; Fri, 15 Nov 2024 07:08:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB0A542FC9; Fri, 15 Nov 2024 07:08:42 +0100 (CET) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mails.dpdk.org (Postfix) with ESMTP id 130D742F7A for ; Fri, 15 Nov 2024 07:08:40 +0100 (CET) Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-2ea09a033e2so341867a91.3 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=LA5TUZDpDAq6lL2c1dlIKhsogSXNPqBZD7U9dA1eDILjDufsOLiWaysgOHB3Yg+v2t Cs6VNKN2tp8Q6x85dL+YBqT0JyIcTP0nYiM4C71afxitu4v+5gau9mnBH0v9vdKwkOYK DCRSfvTsQulK2raVqmIytW9od9Eib0eIihLXz6Jk4Su8L22BqeOfiDmZbQrSNvKE9ul7 bMYxPEvejB/ga6nmjGuZW59lBaG02O0hZRGzW+XBP+Iw5MHMobPfRBBGA/u5OOR+7GoC Yvad8l2m9AlCRZlNkikxu64jvW7wzkjcnPCvTvaHUBrRqI5oTcRd7y8eKeaGf8S/wc8g ih9A== X-Forwarded-Encrypted: i=1; AJvYcCWGYJ/YUQ9scQzq3kZ5rgLG3Rtg8PsdTYClwSxxaLOB/rhg46Tb9VbIgEJfsoymbrih/rWrvX4=@dpdk.org X-Gm-Message-State: AOJu0YxYjNG8ebWFIasIep3HvNkKy9O/IPveW/UHkfH2d0HR6TIMkHM4 y0wi6xtj0iMoU7AUd8C7E/jB5uwJL6Skr5pK5XXo101X2Vpygfm8paRO2bnIl/Q= 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: 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 --- 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