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 701CFA034C; Wed, 23 Feb 2022 11:28:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4FB7940E5A; Wed, 23 Feb 2022 11:28:25 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 1CF3840DF6 for ; Wed, 23 Feb 2022 11:28:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645612104; x=1677148104; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=XMIIMJwTH3EHmSTlclAdmwoQc410Qh95CG1nH44YQsI=; b=oA6aXKTQzi8+IAnsJu03fCai4JWKFfEAHBnNRev4sGguFre6m57ZGrkj gZxBope8+HICIM1gWHXKpEmZ6TvrlicUOypMkKv4B+3A19ixpHHq+Bh2o dTXSSgZidHWmODAVoQdwLTq/R1iDr9p+Gqsw4n1qk8TmpMCyPP1tW2Et7 SCozTZq0TPy8+3cJ+wdCertNUAswU0FPXO+eVRHLMiMSDFRY7yJOcY5Tk 0vVEniuvnb7t0jnkeTA+J41UjuRs0gMjZfUQrVWA8TQBGQvVh051zw1bX h16zxVxwazbjFE9aaKRVS5OdfyXk2UhLgqDTRf8vmWd3c76MnoRN5o/gI Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10266"; a="312648365" X-IronPort-AV: E=Sophos;i="5.88,390,1635231600"; d="scan'208";a="312648365" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 02:28:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,390,1635231600"; d="scan'208";a="637369206" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga002.fm.intel.com with ESMTP; 23 Feb 2022 02:28:22 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 23 Feb 2022 02:28:22 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Wed, 23 Feb 2022 02:28:22 -0800 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.41) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 23 Feb 2022 02:28:22 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nD3iAExsx2JeHydObuyvsxo1sigsMcgMLuC+svAgEaMl58p7i8P2/+vqMvWalTt3M+LZOKE/fXOpXw3snzeeIoHBGDA0BUjOhkSkBhnQs15jC65Wwjh7oz7ORhD1eTYHcAM1zONMXLxloMUv1dvKBbvokQ0q9BXCMvliacIsbPlNPrWZqhQfkK/9S4mRy7GX8KVMRcWMm/WYxvZQJTENGrXW4iBRvE9u+QcEKJz6ItQcwY35AYqDgB4/uZaGTmUJHi41QQ6OYvHgxYD0yA5QxVswXl1ki4zhityXZo1EXs1khThTGnR1WncCjFK/15cY6aCorKyMlJlRf3nIF+mjZA== 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=Mn1wFmJjffNUcWkPghDvXtoY5LRGxA+Kj4sZ2NlBztA=; b=cTjdJNjJhNQClJUg6W9lPaNWpc0LiVGqac8v1nXv3N+wFY6KzZez2UhRs4ZJezIQG0m73fo2U1OrxUqTDZN+tl0TqA+3ZBJBod/haNE+FvGNTbi/IQDYBB75gYzXiy2VQOtar9VuQFkdcoetR8D0O856jnC4ALprVKEVLyFArttcNKCoh8q5fEB6kIwv3d8imeCLEawbVYxXam8BsvW1iZIKNJJ1B1zjt6QXysiKjoUbxPlC/Qsdw41Wy7r9gPg3qQtBQ5phSqI+m3AEYQzddC4PcWzxMo8WkgCrVUjSTsVjFXM7qg3q0vsvDsAX+kCQuiNDgf1Z37kwcKtcVESGMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by BN8PR11MB3681.namprd11.prod.outlook.com (2603:10b6:408:85::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22; Wed, 23 Feb 2022 10:28:18 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2%4]) with mapi id 15.20.4995.027; Wed, 23 Feb 2022 10:28:18 +0000 Message-ID: <954955e2-eaa7-f5e1-8e52-597d6d1aa3ef@intel.com> Date: Wed, 23 Feb 2022 10:28:13 +0000 Subject: Re: [PATCH v1] net/i40e: fix coverity issue Content-Language: en-US To: Steve Yang , CC: References: <20220223064147.3512888-1-stevex.yang@intel.com> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <20220223064147.3512888-1-stevex.yang@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0043.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:152::12) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 82f48fde-769c-41cf-d8d7-08d9f6b73525 X-MS-TrafficTypeDiagnostic: BN8PR11MB3681:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SYfseY5nANegMQil1eRocZNvNygpNPL3UIuz7AAlS+EuEbVQKl/TcmrIxdpuZPA1sW3s8cfT4oDpdudWUbH1VGQW/7X2sUahZMzXCdQFOkVZiCEEFPfSb1ha48Qe1p0Gg3111TCtEUjjh6TWM+1/JvYCPgXrVa7hABBh+RRrQ/jASEgqjEUAo/9NHaLvqxBJ/ukyKX0xXQu+QBLd2uNJk9ahLRkBImPBC961Dx53fPzYOT3v7GXcXZKNjKUKheWlSZDPx5gFn7aU+f96YLa37vau6Q2GYydxw78zewe2d37lwyzmVHGe9Pqznnusy2iSNrQYFAjuHE81zRvrOk007ZJra/BuQTFks1l8uqSLA/fobqxWXeEhEz4HS7KiMjmf0mmS8lNqcfthAvp0uAsaMPvwS7CCAZStGJ9I8o3FpF7CHDZbp9ZtYDuZzn+LqDLEp1R9fkegxVLxnnBukQJ5Rp++Ph1Nn5UsrZy82dvSBAlWIRHDiL97r5x6N5uLNhJtZYKzXgeu6JwP3DiWbujqgYpj749WFwzVAaPAlenuUOMcaR2sYREDP+0vw/OchJ36VWbOlJ0RhUuePcB5+s5Pz/YHC4qG38szmb4hEW9+OkITEBUDdp8+uyLvIh9YFAYJ1EXd9dAFSNv+S5vqwi2Kd9d47Lu53PP5BlssERkyELsOzNtXWnIXsqymBFW+qc29SeCQH73QqZMnmfoGwf2g7g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(8936002)(36756003)(2616005)(107886003)(186003)(26005)(4744005)(6512007)(2906002)(508600001)(31686004)(44832011)(6486002)(53546011)(6506007)(5660300002)(6666004)(83380400001)(31696002)(86362001)(66946007)(66556008)(66476007)(8676002)(4326008)(38100700002)(82960400001)(316002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aE5PWk5KL0FDbW11NGpMWjBuV1Nyci9CdnRiY09GclRMbXk3cWkzRHRlOVRs?= =?utf-8?B?ek1UWTVjeVJqVk8wZWxqU0JHaSthWEtzL0VhVndjTzRRRnNMdUhqQ1NjZTNC?= =?utf-8?B?ZEV0WlpHbTVSVC9sTHJwZFpkODFnM1pKNWozd0psOXBoZEwxNHRFenhuMHJl?= =?utf-8?B?Q25yRE92eFRuNXdIQXBWdmIxekJOci90Sk50L2JSdk04Sk1qUE1mSGprOHdU?= =?utf-8?B?bTNhVnNDbnZqVmp5MURJb3E0V0g3MEREbVdGa2R3cVBoSUV0d0kvSVpxMi9r?= =?utf-8?B?Z05iUW5UU1BPOTRxM0RveDY0WU1BK0VtamZXYW1YOHkvWWVFS2YwQnRWWXVr?= =?utf-8?B?YVJsYkt1RUpCY0pjeURFRncwWDNvZ0pqU1dNRFViRWcxbllIU2FTQkwvMHNy?= =?utf-8?B?OWhEZ1NoTHR1WGFMZ1QvcE0zRFoyZGtRUVdMbUVjY3hTM25jZWtXTUx0NXdv?= =?utf-8?B?dHNRZEcvbCtzQ0x2Vm91cTZ6NjUwVkRUb28zUEtNdHliakM3UlVYSDZkemhI?= =?utf-8?B?WmY3VE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JdCtV?= =?utf-8?B?d3NIWlZNY3ZGVU1oUGpzVjVyd2lUOTN6NVRvdGUzdHAxREdXUUYrMjhRL1Ri?= =?utf-8?B?aGpJQ3IxRGdVUWo3REhwY2ZDcEVKcmM3S2wveHI4ZzhNelBVTjY3ZlpxSmMw?= =?utf-8?B?UlRvc3lxa1N1Vy9QR1VCN0xuWmx3M3Rucy9GTHZvSzVsQ2FOYittYlE5ZnB1?= =?utf-8?B?dUtjM3Rma3lYcnNldjB0eGVJbkVUOTlJZm9JbkVCZ0pRUTAra3pXdHJnR05m?= =?utf-8?B?YTMwTzl1L2hDRmN0RVU0U3hPWXNwdkhMdWwzUE9YRmxKZDVGNTlabXgrT09t?= =?utf-8?B?Z2UzbjJTems0WTc1RUNiRlUrSUNVUlBseDlHMXQxRERSK3hTRGRBczA0aEM1?= =?utf-8?B?Mk9kN25hbmZ2Q2Z3TDNwSHcyMjFwazZnekdPUUlQVGkzTStnWGx2Z2xMYnlH?= =?utf-8?B?TDVBTE56U2xYMEtSYWNxNGV5eEZPNTdVVDQ5VEhCcU16RXlURmhRdVVjMlo5?= =?utf-8?B?UVRQMjY1NWt5RTlIaHIwMXhPeTRCNmpjWWJJYVZaL1dvYU9hOG1ualMxakNY?= =?utf-8?B?MkNkVzNsZDdHM0ZDRnd6dlFOaVF0ckNvWGdmdTIyN3J1RFk1R1A5ejRVUkNn?= =?utf-8?B?cDlPUkI1SmNSWlhGL3VwSm9yM2N0SXgxTmtvdHM5WVdGWkFxV2djeFY0SjdJ?= =?utf-8?B?QWwrRXlYcm91bmdPSEU1NGhDdlZkd0RJVXRIMzUwbUMwZm11TDdCeFN3dm1o?= =?utf-8?Q?EhLZkjKjhNIvQXq+KCgWfGI=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 82f48fde-769c-41cf-d8d7-08d9f6b73525 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2022 10:28:18.3724 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xCWQOgygGH6bsVYbYPBNhy0iUzw4ksYdy5T3pZQ9ah0yh8n6cpCggt6noMFtOIBmjQEVA/GM/JiKOJESNtomqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3681 X-OriginatorOrg: intel.com 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 On 2/23/2022 6:41 AM, Steve Yang wrote: > Cast 1 to type uint64_t to avoid overflow. > > CID 375812 (#1 of 1): > Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) > overflow_before_widen: Potentially overflowing expression 1 << 2 * i + 1 > with type int (32 bits, signed) is evaluated using 32-bit arithmetic, and > then used in a context that expects an expression of type uint64_t > (64 bits, unsigned). > > Coverity issue: 375812 > Fixes: 5fec01c35c49 ("net/i40e: support Linux VF to configure IRQ link list") > > Signed-off-by: Steve Yang Hi Steve, Can you please describe what is actually done in the patch title? Fixing a static tool warning is not descriptive enough.