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 A315343332 for ; Wed, 15 Nov 2023 04:23:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5908F4068A; Wed, 15 Nov 2023 04:23:46 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2133.outbound.protection.outlook.com [40.107.244.133]) by mails.dpdk.org (Postfix) with ESMTP id CB12C40697; Wed, 15 Nov 2023 04:23:44 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fQei6wPwxhaupUBrd/wzeERY1y0epo8zT6DCvwm8nA8hjYKEcAtjQkReTc9HAOGB28XcPNlg3AJuqcEP3VaSoQVggXqo0Ku8ZJ+vwcwuEciJkllnnDgj5eF47ZjKAr2PMwHgdjlsy2d2rUmPMFkdqy2B8Kg4AUX0hXkqetryu/7kG0BYG2/q0us8UsP7pnkOhqMwLYuWs/CNa/NrA8QcXEmT+AI4HrezobyJlpUthuKwguysBIfd9Pon2fniuZj7Oe50GjqT8lxjCYbFr0xnkEWu4DJquNaUdNQsy1+rO4u7jRgqvWEJIwQmzzmu06srQNHmUSv/AeMIXXn42ezA+w== 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=Zxlbl7MQL+54dCTH9FsvWp/4Y+HtSZZi0BrIzPlPtNU=; b=mvQJBe1oTlNum8mdAtjPoL4OJPPx1lPI6CRlGfL8ykwY3+65lmEkDOjKHWE71zirsiRJ1jrpLaqX2duAHQylEbaqTC/hWRznTdjl8B/KVROkPkPR3ovBI+kMvE5i7MTKIc/YzWTJbnGGm/b/LlhwvM9wwQf1RnEEYL1+W8pwd2y6qDLN/3NHZUpBB+BtSfDhp10oNTCAltRjYaFHIFJXI81ADBbPYachrZmJaTrjMaiQ7/mb0nERiHo6RlXYyllJygIlc8HLBdvp2YXGTPKW+LpP7GRSaduzyRpQ0a+f9c7rORn/QKCXpwCODJ6Uk4fKEyPiXAFN/6EF22FJqIN7cA== 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=Zxlbl7MQL+54dCTH9FsvWp/4Y+HtSZZi0BrIzPlPtNU=; b=ky3Z+WA16cY0PCEBLVFuFzHjmTWJ1SB7AMr4KXy6RhzXYLgwUTLLpSmLolC1umRVTfK5jLoMI/FsOEEGT6G0EXunKZ3KPHR685QXvDDvjvHyItMJbjAgQv2eHOro0Pn0hsEhpkhcx1cUK8QzBMCAKgMl1qlQRXl777149e7bVQs= 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:42 +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:42 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , stable@dpdk.org, Long Wu , Peng Zhang Subject: [PATCH 4/5] net/nfp: fix integer shift problem Date: Wed, 15 Nov 2023 11:23:09 +0800 Message-Id: <20231115032310.756221-5-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: 0e098a6e-90e8-4ecf-c93d-08dbe58a44b3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ctL/OaTqBzTB7Wq0Fs2EQnO49+zH8O/xdckyt/7usw89+QcIUfXqo+6maUt090pKj98JQgDnzZ6+EZn1nYJbelC8nERRGzhsPRkm/HcySP5tcaFc2dJknxnkhnd/t+0kaRoYNNZLdQSnlJCv5UgG9oOaZfX8uGL6bgjhp92eNGl1wfrhZwycHwSg4qQf9U73V83E28BN2b1uzCb9E85j82VVEgtkCA70shJQ0Ur7VhFb1TZwmL+4j0PUWQueHM8+2jkXO/cPJQrxBo5XT/aSux5zxgntVHyLh2fgloTIU55TyM6JKwT2JsaGqHNRhYY4E1efAgputhdKV/ZATQCOSIrO9JyTD42kWcnpQH6ruxApTJisg5W3njKWxJ4hF7/KPUO3K5JpcyBYqq2wNr2T/AuFESy+QxiWdtUiBuv6TORSRkr5HXhNN9qDioxpyBnCMnEdmfluHm95X2AWvju09917VP96sDuQRUxRXZZtLV0AjHHLIK7b0vI3n0ASoFiUekpPzcSgRKzIcZ/PP0FzK6Ulv6NWv2mlXHk3I7A1iiz46YihCxpY7vFm7OZVOrq48XLWbw2SiMIpNtC+Ls7o4e+TQOEp5N4jzKaAA6tChG57TYN7PTIwB1IQn4S5wtZgCVEi3nhsfcyhXBBqcyGMWP5F+3RNp2sV6zkXYcu8k2U= 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)(4744005)(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?7LNBxhpkniCQCCAPTjaxyf0Ddxofl229YqLcH3y2dDBLk+EknjZlyS/mejzP?= =?us-ascii?Q?RWlk0/DQkGhF98gBxqK5WROrgo52FdFnq0r6DTxHjSRTbE7rlBtaYX+aWet0?= =?us-ascii?Q?iSqB/6Wv0RxGeS26Tm9A4m9taye+C0ZDG4V6aiTj3uBKiFQ7Uu1okiCGpxbT?= =?us-ascii?Q?E3Tx/H7KdyrX48dr23P+uIRTHu3nlH/9ft9H5MBAAaCwrLAdfmpk8yvnwglp?= =?us-ascii?Q?mhzKySFqnjHKEFb8GRPL0PfVujXVm+3N5pHbnV+/4OTXXq84qVmVSoUvPy5I?= =?us-ascii?Q?TVB5yhtIjSQUHj/K1DPirj5UKDuCq8LOMgZnGG09HswBEyPCJs0jQgryHfCI?= =?us-ascii?Q?aUtYeI8cyR+St/6vV+zwWC1B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Pd3vr6jPH+Bwgq2lgmmxFHW7R9Kf1HREGS0OykwxlFAF9tCKOR8?= =?us-ascii?Q?nIkSnUp6rh5jReGLF9LyU3NDqh8Po+3CzC4+pvUwEcUDqzavxRwalvl49kKi?= =?us-ascii?Q?GvuAd0zey7hDG1EYDWyWepoOxCVxJDj5UXr0gvloIdx8C/hWjfgI48WNa3ux?= =?us-ascii?Q?2pwoxc5YTW6mZpB5DQaXkY5gObxyScNEfLDrkRlDOEVlrOZ83uP5F7sfP38Q?= =?us-ascii?Q?bkIBhxpT2Y8SMA31+sUbEVyguMqbYFC8h6c5ienU7y5yCozN7Wewiz14Lqm2?= =?us-ascii?Q?YZxjCoSkI8IaZ8cOE90uhX5oq/S9q18I9TLmpzLP7Lbm9N+HRV9j8xbiHIMS?= =?us-ascii?Q?xg=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e098a6e-90e8-4ecf-c93d-08dbe58a44b3 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:42.7484 (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: ZaETX6IEuDKjyOkji9wY1mJehFCz0fSSuFheC8WL/XTMKwm1y0h/Zdg702jhxNZfQ5g7okWTmXWMgOoWiBOR5eNqU2CgNi2Lkmg8iovV6l8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO3PR13MB5719 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 CI found integer handling issues, bad shift. Coverity issue: 385412 Fixes: e6858e7e7cd3 ("net/nfp: move shared target logic to own file") Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/nfpcore/nfp_target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfpcore/nfp_target.c b/drivers/net/nfp/nfpcore/nfp_target.c index ecb45f7928..ea5b39a4b9 100644 --- a/drivers/net/nfp/nfpcore/nfp_target.c +++ b/drivers/net/nfp/nfpcore/nfp_target.c @@ -528,7 +528,7 @@ nfp_mask64(int msb, return 0; width = msb - lsb + 1; - if (width < 0) + if (width <= 0) return 0; if (width == 64) -- 2.39.1