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 ABFEA43332; Wed, 15 Nov 2023 04:23:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1452D406B4; Wed, 15 Nov 2023 04:23:42 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2098.outbound.protection.outlook.com [40.107.223.98]) by mails.dpdk.org (Postfix) with ESMTP id 6D7D44067D; Wed, 15 Nov 2023 04:23:41 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WsGEBR97Zc5KvHbsNgI7p06roQ1/+ObXuelhfII/7MhItupQulKIw1t3HgekoW8g6aXT2tBQI5vJWsokKH78feCm0tkh9LQDw5Z/ouy8mrb9D8dKLlqxoJIbksLxEUZIZsHVVOBUzrUNsG2EEmy1e6s4c4h/wAHOytkdiXdGeBdWd6qes0OC4UBVjGL3JM+eJKaXwVdbfr/XTEmrW4c4bG5IE12eWetFgRGd1i1kyQQES6Ke+YjZ1hClWTdCfJeJiRjBM4jXIj+tKh2rVn2URG8odwlpLFeXEBj073VJ0nqlIO+aBfCl4L3KGYJJUHwztiuln93/IYOVUYku2vYnZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3ig/lst82FvwA2dEx51O0PSSWNp7QKl0AZXi4TFf9B0=; b=WWuQT7vYHSUZ+g/btXLFFB1J85oIubxfeSbcKz+RGS4xDGB3TcFZEpq+N/mqySrAUQZFZrQ2kafaFa+hUXGQY5Jfpd/nnVE6IZv/11CbkfoiVvvqamSjIuNbzvTdafp8RqSMb4TClriql76ZQ3xlHKn2fqAV0W8CEgEdrTNDjvQmrHdQgoQeY+dnXRtNY1S+yQH4wBgTkS6hQVpz88od26W3VavbC8BgmhQ6vdBk6Aq/1xuG9QG0w44EkbFFE/ZVXHJQHO7KygjbzKcPQ6z01LlH8VxsWCBgA0mpieLszaL+woKOhu0z4C8C0eL23E7ECQx5xXx68hg+KUPjzd9QwA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3ig/lst82FvwA2dEx51O0PSSWNp7QKl0AZXi4TFf9B0=; b=I2r4bqOql32FL7QJqTabGJ6kSrdB8LkWTsRpcKVxiq9j2h73R7VecN1hgdv8yJuF3VUUwJ2Cvx7RNi9Ar65T127PUl1Jkr5wM0xInuMhHeWQnAYtaoNH98ekJ/jEiwmpAU1wF4bhr/beXGuROGe+bt8P1rQKd6hm/unASniJ4Mo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by CO3PR13MB5719.namprd13.prod.outlook.com (2603:10b6:303:171::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.17; Wed, 15 Nov 2023 03:23:39 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b%6]) with mapi id 15.20.6977.029; Wed, 15 Nov 2023 03:23:39 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , stable@dpdk.org, Long Wu , Peng Zhang Subject: [PATCH 3/5] common/nfp: fix integer handling issues Date: Wed, 15 Nov 2023 11:23:08 +0800 Message-Id: <20231115032310.756221-4-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231115032310.756221-1-chaoyong.he@corigine.com> References: <20231115032310.756221-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: PH7PR10CA0023.namprd10.prod.outlook.com (2603:10b6:510:23d::21) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|CO3PR13MB5719:EE_ X-MS-Office365-Filtering-Correlation-Id: 18a150e1-c6d4-405e-4085-08dbe58a42e5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W0BiX0e/EOCms8dzFzGpnrwC6MlSL/V/7SshA5X6dAB+uz0Po2QDMAHYRVKv3AEPNNF9O3JMTPyMZ/G8/QvJkbAXdrQ+5Gd/PleFp2jz3VJlFP2iH8mJwWXGxhlNdGoNnYG0q3VUoyNpil9d9aNzh1FmbEvWp0X/mPTFiicdN1XTVNEZwGtO+Y1vIzBM6iTlV4brEAE0+cHIctX+avGs9MgWDFdJQOk/hxJ7Ei82k8ymmVt21Wc2O7EOW3SPXOIwjKvqsitUd4yO+NduuX9REup0FM5SnWelSdGL0aGLvgs+D4x5Hy7pOXBPqM0cs2NYoybISc9vrUdKEy1v4JIBKEfxL42swWqAD+eBghGrbjnaLjXE1JLkX/bV16RQQknIz6azr5KIQzK1Wf37hxp9OgtDixKz74uo0q5/aWK5peeOOP8rDE1RClNRVbp0sqt2dmijHwYLFshcX5MNzST3TRlJDiUsVX1UAqRADVbS+m9qvXRprZ1yt1NOxhVoMqPv0fmodnA74ZnaTANTlgOsj05noEIbpWZ/LrPXzS6h6cdkp5iFRg2DYA6Oh3Hl3CNYd44q0qJyNFqUjscqpjTUH7nXXkh0TihDphfcIwg/eUqt1Oi/769qvUNbLvsL3rhWNZveBMv0L45UAFMTJtgvBAx40RGGg+5sa2HTDDLfO9I= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(136003)(39830400003)(366004)(346002)(376002)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(2616005)(6512007)(1076003)(107886003)(26005)(6486002)(478600001)(36756003)(44832011)(450100002)(8936002)(86362001)(4326008)(8676002)(5660300002)(41300700001)(2906002)(66556008)(54906003)(66476007)(66946007)(6916009)(316002)(38350700005)(6506007)(52116002)(6666004)(38100700002)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?t4ltDQIj8gy/EIIDAML4C2WKBBZy8NF3bvr4EHlcnMKX7tsdZiZWm53CeT0i?= =?us-ascii?Q?KWQN72mK+BkdDoq0VUDqBB6FtxxbTJXB2zAWfve62pwHfFSzuLbtIw6+q4r3?= =?us-ascii?Q?oE2aN+igUjWFM45oU5+KftpJPo96z+L+n0/LDYJ5aIZ/2zV+9F2R8gMFa8vy?= =?us-ascii?Q?Volr3iyiHAoL87bl2z7WRLUn6uYEHFkUaufTUun7la1t6KEtKN2uGtS71gaB?= =?us-ascii?Q?7ob167dpccTM/uW948kV2AropzBhblxnyefBS5+QUj8gTr5VM089YkVuGCvw?= =?us-ascii?Q?XK6JDuAeF2jsma4MCNPAKWjMtZDIj94lNGDu87y8dzaKu+BPfOl2rBbzwCdR?= =?us-ascii?Q?Au2p6fcFyFbP93ohUeEFcppyfwskp2lS2368mukMaCU0BPL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/vhDY0vOiYLOk6AX34UDj8L0jzndvYGAL8HxaOlGRnulDdYVc3uKR?= =?us-ascii?Q?qMJmSxqdpegofeyODNO8sN7FvF7l/6+faYsrFTbBajQWLxgPTTW8WB4MKICr?= =?us-ascii?Q?NeMfOJlrmht6xRjg2dxvavAnNyOzuapcNvh0aJctEYyft348kBfkjJZZd9XH?= =?us-ascii?Q?b/nsCh/4a0kmrXWOT4rRLtQ6V3q9tPxDYQhkmLNFg6osgasVAa+F/1A5UX97?= =?us-ascii?Q?yZ7+FcYBkJ234vJDujSBk81g91DNWGa/GCwkx8xsWxRrmIUsDLiN1uLUCJ+X?= =?us-ascii?Q?R0xV5EsaG6cbn/H42icdlriKfNsd/+yvGVrhxUqeHpn1b8Q6ydr9wYyLxcYf?= =?us-ascii?Q?UA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18a150e1-c6d4-405e-4085-08dbe58a42e5 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Nov 2023 03:23:39.7322 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dypgOY8hoqdpmDX0MDwDpA7sDhAhca1copqtSsf98sVEDF8nMbMmu+yO0ASeMOOoT6r3Gbu0K8izUYWMculAYP4UAGcyoqxtx1rHP6mIo+8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO3PR13MB5719 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 CI found integer handling issues, overflow before widen. Coverity issue: 405351 Fixes: 87f5b35ba4e8 ("common/nfp: move queue logic") Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/common/nfp/nfp_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/common/nfp/nfp_common.c b/drivers/common/nfp/nfp_common.c index 4c94c9d59a..40e1620c2e 100644 --- a/drivers/common/nfp/nfp_common.c +++ b/drivers/common/nfp/nfp_common.c @@ -187,14 +187,14 @@ nfp_enable_queues(struct nfp_hw *hw, /* Enabling the required TX queues in the device */ enabled_queues = 0; for (i = 0; i < nb_tx_queues; i++) - enabled_queues |= (1 << i); + enabled_queues |= (1ULL << i); nn_cfg_writeq(hw, NFP_NET_CFG_TXRS_ENABLE, enabled_queues); /* Enabling the required RX queues in the device */ enabled_queues = 0; for (i = 0; i < nb_rx_queues; i++) - enabled_queues |= (1 << i); + enabled_queues |= (1ULL << i); nn_cfg_writeq(hw, NFP_NET_CFG_RXRS_ENABLE, enabled_queues); } -- 2.39.1