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 49E1E4339F; Thu, 23 Nov 2023 03:08:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E8E3C402BD; Thu, 23 Nov 2023 03:08:30 +0100 (CET) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 2514A40041 for ; Thu, 23 Nov 2023 03:08:30 +0100 (CET) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id A5B265C018E; Wed, 22 Nov 2023 21:08:29 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 22 Nov 2023 21:08:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1700705309; x=1700791709; bh=dKRMzxixQLgV+YoNG4Cua69WYmltZMI96Wx HCvMBkUI=; b=jaXyv8/AmBTVHml0BXyyKmi7gRBgVsdaCUIGj8lzq4CrJylcFms OHp9A7jS9/49LImmYBbSkcFG7cizMsDMwhJDM5vwBI2/KQNYiPqr6sjnaFw3TSQD llaOZWEL+eY4wXy04KSjbV4GCPHVYskXKLAvhzwPkYm5Zi1dpvDpPcB5HMUU7aZt pxPBhW6arZmxk3qm0hGCzux0mg1FtKTOKZpWu+sM/9zftUMBH8YhnXPqbnCN81Ki 4QgwqBYenjUkqTfsKqn5OO0m+GGiUOK+KuniW5EhnWBrzL9T7mERNxxUClaOp3dU KNz4fj/bZDTEqNs+xlTwIzkGVHKHrNGA76Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1700705309; x=1700791709; bh=dKRMzxixQLgV+YoNG4Cua69WYmltZMI96Wx HCvMBkUI=; b=MmeTunLh1pRzZkmq+OfRCdpHS6WuNVuc7rRlkf877RNBx8xfFHS vEgPGM/QEbek5DRp8j9g/L6uf/5yOolWjMSHjYrdlpQ216Jdg/VbTKsbSxG4c/UW Xiwc/VIeDNEyvxrWxsKlmonOhWk7WQGkmdsHqk1Od6EPqc0y5QpCHI0GuJwfguOc S3jwj958W8K9AglFAqZy31D1UrIrY/PPinbLSMGBoeXEZq++J8lE5Bm8B5qMvCHy BkWYllA1tBZ+oG8kESAQFPGUfT/udKzp95QMQDs0Vi/SjOyzgNBM+WOiofp9kQyP 0znmnRr+ZFcd9MqZRwN1vv02lidGYyohfog== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehvddggeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Nov 2023 21:08:28 -0500 (EST) From: Thomas Monjalon To: Chaoyong He Cc: dev@dpdk.org, oss-drivers , Long Wu , Nole Zhang Subject: Re: [PATCH 3/5] common/nfp: fix integer handling issues Date: Thu, 23 Nov 2023 03:08:27 +0100 Message-ID: <6924596.kQq0lBPeGt@thomas> In-Reply-To: References: <20231115032310.756221-1-chaoyong.he@corigine.com> <9244382.rMLUfLXkoz@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 23/11/2023 02:23, Chaoyong He: > > 15/11/2023 04:23, Chaoyong He: > > > CI found integer handling issues, overflow before widen. > > > > > > Coverity issue: 405351 > > > Fixes: 87f5b35ba4e8 ("common/nfp: move queue logic") > > > Cc: stable@dpdk.org > > [...] > > > - enabled_queues |= (1 << i); > > > + enabled_queues |= (1ULL << i); > > > > That's a very bad fix. > > You should use RTE_BIT64() which is more explicit. > > > > Please read rte_bitops.h, that's a nice set of macros and functions. > > Okay, I got it now. > So, what should I do about it? Send out another patch to fix or something else? You may convert your driver to use it where appropriate if you feel it's worth.