From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
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 <dev@dpdk.org>; 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: <xms:HbReZWmXs4KDBs_pScSPWdxXQ-k6a4J2OWPpx-Qgro9Yygj7kLRnhg>
 <xme:HbReZd3pQevQBPRR0iYIs7PdjjeXlYd9DhWssblLzZUPb030KGLl6mPPN8vTjXJ6N
 60t6tPe0eKusq6AJA>
X-ME-Received: <xmr:HbReZUp5SZjRjKkJ8hg8BSwOyzGKxNf7XsFDee9m7cZSikxR-wFx6coG_BAnIrqYP8FJIAhiJg6pW6qWtiuNDO8BZA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehvddggeefucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm
 rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc
 ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei
 kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh
 hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght
X-ME-Proxy: <xmx:HbReZamMXBs4BiWXM0IHfnu-9-c3n47MBG1IU7Mf3Nv_Ij2-HfxRBw>
 <xmx:HbReZU1-10K-gDVkOwhvNywLwpU8A9Z9I_e66aP_m2dqK-dA7_3TAQ>
 <xmx:HbReZRuRHMegfrcrcL21itaSb-qUjm_bJrzpvJOgvXPgcQig-KgI-g>
 <xmx:HbReZRzfXQznMY45dW5LWvWwCwpWhy2kAxXSay6WtDXhglFx1eDyAg>
Feedback-ID: i47234305:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 22 Nov 2023 21:08:28 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: Chaoyong He <chaoyong.he@corigine.com>
Cc: dev@dpdk.org, oss-drivers <oss-drivers@corigine.com>,
 Long Wu <Long.Wu@nephogine.com>, Nole Zhang <peng.zhang@corigine.com>
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: <SJ0PR13MB5545E00220EDEFBE497223D49EB9A@SJ0PR13MB5545.namprd13.prod.outlook.com>
References: <20231115032310.756221-1-chaoyong.he@corigine.com>
 <9244382.rMLUfLXkoz@thomas>
 <SJ0PR13MB5545E00220EDEFBE497223D49EB9A@SJ0PR13MB5545.namprd13.prod.outlook.com>
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=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.