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 356F043AB0; Thu, 8 Feb 2024 00:30:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 034BF40278; Thu, 8 Feb 2024 00:30:15 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2089.outbound.protection.outlook.com [40.107.243.89]) by mails.dpdk.org (Postfix) with ESMTP id 5F3B240144 for ; Thu, 8 Feb 2024 00:30:13 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mToImL+osqfoQ7NgwvSSIqTiuzhseYKE0yTNKiOwdGhlD52hVRw5cAGEVE33uvuO+jSi2Hw0YrwXMhf+ejSybuh4NIqPM8cOq97CYLKI2es5bz3NgLbhpbx8XUBaKjFXWXK0VpKS6/C5bBDvJh6aAv6O1dbo6KcCBxTA8LsH/QJ3bk/23H7AkGKVbjNH8GtxZAmXDtHzTe/QxXkbze8w4WgbGqfbqIMljNkGuWHGuL0o/C/XzIiyapBz7r+/PVeN2WGDTZAJKSBGqf2gNeSwCBFV+NIGodi3ciQOOs0PQ8VTy93NLOhIGIf/0qCShBNg2DW6YJ6yWcWNFafHNFeY6A== 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=ednExZK7kD0lyWhhVNJrm9EtBOZA38vwN5+saZfEkxc=; b=VeCQJBJ2mxqqDtAxfSLDo+Pn/1EP6H7XWKtSwyP8CtuFcABVtAQDFsM0lLTfl3T/7i+Srp5POmodzMZSrZtKMdps/vZZvj/KIjfty0c2hkjmfmVGHWBxEIruLgFcZ4389fJMryRkdzS3fL2yVxJFuA+Jr9NfveOdP6Q1q+IymXl/JVaZVFwT+toEDJJPb8jDUtGFWs/gbAJwxzGNkjCzUz8LBybA9UVhJ3ePeFIrFkW+JtU3viA2eDVrMH2XOz0YCb/vxREs3MvI1xGc2uHzdNG3gQcVZcOHNH2NYIDpSSpSSBMa2O9+vMz0hfHbaDF6HFNlueL+j6JoZR7baRVC9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ednExZK7kD0lyWhhVNJrm9EtBOZA38vwN5+saZfEkxc=; b=Z1n+7N9R3HkMnx+Y/6M5bWWqYVqsJS/hIxhiJSNYtwAl7kp/vUb5KQHydbv9KrKc4Zq4jrr35k/UWuSG17LjZEGekwtZIywOE7ITqzGsenT/RVF9kLUfgbYpSQ2/d0i5cmFfa69+LZpDQ05M/tYrTFq7BsO1MbeVWfUvs6b+1iU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN2PR12MB4301.namprd12.prod.outlook.com (2603:10b6:208:1d4::22) by MW4PR12MB6997.namprd12.prod.outlook.com (2603:10b6:303:20a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.17; Wed, 7 Feb 2024 23:30:11 +0000 Received: from MN2PR12MB4301.namprd12.prod.outlook.com ([fe80::716d:e3ce:141a:f22d]) by MN2PR12MB4301.namprd12.prod.outlook.com ([fe80::716d:e3ce:141a:f22d%6]) with mapi id 15.20.7270.016; Wed, 7 Feb 2024 23:30:11 +0000 Message-ID: Date: Wed, 7 Feb 2024 23:30:07 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] common/sfc: replace out of bounds condition with static_assert Content-Language: en-US To: Stephen Hemminger Cc: dev@dpdk.org, =?UTF-8?Q?Morten_Br=C3=B8rup?= References: <20240118201843.189978-1-stephen@networkplumber.org> <20240119221401.68182-1-stephen@networkplumber.org> <20240207143651.6b6f1b3b@hermes.local> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/6B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Scp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20240207143651.6b6f1b3b@hermes.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0007.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:150::12) To MN2PR12MB4301.namprd12.prod.outlook.com (2603:10b6:208:1d4::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB4301:EE_|MW4PR12MB6997:EE_ X-MS-Office365-Filtering-Correlation-Id: f7f1cf0c-1172-4fab-f4b3-08dc2834ba51 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: y/1uQpdpHIJdrHcE/+hKbMa0qH33Pf1WyicWP69cA0THItUrrAS/BiY2hFEKLBBXu+aBdD9Ut77t1HS+qxOonQ1sGx6FnVqEwBGqE/2tHt7jIm2sjDZj0dVY51R2aEkIEltvFIXiOR4/UYGe+JCMetTy2E3ZDFrqGUoUFkiJimsBk1eV+D3McqFDGnBl3GCXwued8WK4Rc0hzHamD08BP/2QMMbpAo6l+hb8cdWBnJlrsodY8/RiG3DfQULSVQYfoAow5n8t2ub7Clnjp8L07bUe8niJXrqyruWHqoS9n4HA9rRtiBiSe2O4abL1eXKuIy5FNwQzwu1M6FIaf8OLZ8WDLOBDeFoRcPYJepDdr6uQf2CJLOy6+SLemMZ33oPM+f0ohjCa+v7iP9Z3MUchf0cJw2FVxoxu+5lS+lx9vjh/sEgCzyMA+gJYyjz6wwc5FAGnaRJEoe+7eI6bw8EHmS+kVdrNJtqz7waL9VI9+tilYhhDc7WdnWndGO19fAK3TJd4gL5fgANLCs32qQkBTOEA/1OvDw4ZR4VQn6hdnK4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR12MB4301.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(366004)(396003)(346002)(136003)(376002)(230922051799003)(451199024)(64100799003)(1800799012)(186009)(6506007)(31686004)(26005)(6666004)(66946007)(66556008)(41300700001)(44832011)(2906002)(86362001)(66476007)(2616005)(31696002)(316002)(38100700002)(6512007)(478600001)(36756003)(6916009)(8676002)(966005)(53546011)(5660300002)(6486002)(8936002)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YXhEbjRxdlVmTGNGeFFuMEU0SFFBTEtVMEZUN2NFODRWNGtIdE96Tm04ZlNo?= =?utf-8?B?dlFXYjFBUkFUK2NBaG1ZcndFQms0eHRJOU10UkYyT3VxVVY2clY2UUkzT0li?= =?utf-8?B?MERFSFk2R2RlOHg0cEhLQXJ2R3Z0SWNoZXphRnQyRVluVnVhZGNua3lzQlpv?= =?utf-8?B?MytnM1ZFQmptNjFkNjdpOVJVTkl3UGo3Q255UEZVRUVucjAwTmFrVllrMmY5?= =?utf-8?B?LzF0SFBxaTl0emtzRVBEQlhSZnBuMDFvOVFVUFpZU3FMNFduWk1jc21pTkdU?= =?utf-8?B?c3cySWlxWndHSXFDQytYTFdtUExkbFpVWjJEcnhSZ2RaS1ZITHZjcnRJNmxw?= =?utf-8?B?dmEzWHNjcTM5Qm9VWlR4bkpTTW5ra1BneUVxWlZrZHJTSURKayt5TUhKNHFL?= =?utf-8?B?TnpuSDRHMkdmbmJCd0JCL1BCalZZRnkvWU1TaXBrU3ZEL0pGcmYrOEFpQVp0?= =?utf-8?B?ZlQxODE1NVNCWXd2cTV5cnlLbTZBbUF1d0pHd1lidzFGblpGb1NlTFFSRkxE?= =?utf-8?B?MnFYUGUyQUZPcTBSS0tJRGxvL0NXMXpxd1ZQRWNWSVZWTnBTbmdBN3E5WDc4?= =?utf-8?B?MjZlRjVnNnl2cUJZVzZUbW9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llEeVNQaTIvVG1PeFJ4djFVRmIvM05mMkFFY28yeU9W?= =?utf-8?B?QU9EYmVxWkJGa090eUg4bzJ6N2V2WjBMV2J1ZnAzZGt2V2g1elVCQmdYaWJw?= =?utf-8?B?Y0svUWpmeVdoQjEwYlVmTGtRdTBuNEtIWXJkT0c3UzZ4OWN5RlRZMTNEOC95?= =?utf-8?B?ZXd4U0hHUDFNcVNOWDVXbVpuZTlXQk1OWVhIUmVxYm9DZm1LRTYvK3VlN2kr?= =?utf-8?B?Yk9TWnh0UnhzZWY2ellleEMvckpGTUszNko3NS9XNzNlYVJsQWlFaGFvcit0?= =?utf-8?B?aE1uWkx0TTVOY3I4NkkrRGVKK2ZGQzQ4TVlsVWlwQnIvTC84TXlqeG03RzZi?= =?utf-8?B?MEhOTGFKWXlLRVEySzVNRDJ0NUttVDlBdjg0SDE5Y3JrdlcvWVp2Y29TeEhj?= =?utf-8?B?MC9DK0ZWYm40bFljSUZkbDNwVXVGemc4bVh5aDZDd091eVZvV3RaOTVMTWo3?= =?utf-8?B?NTZHYmF4V1ZkdEw4N0NpK3JxNmZtS0ZEa1FXS0JlWlppbnJrYTQyUHVSZlhX?= =?utf-8?B?bVNFc2tWN2V0VDdiT1VXOG5pSXRmRXdiL1dib2RZZDRLR3V1bTlpZFJtdU5T?= =?utf-8?Q?am/oZs+u7UgULCGaHC2nSZ70T?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: f7f1cf0c-1172-4fab-f4b3-08dc2834ba51 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4301.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 23:30:11.0805 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: t3X6+cg71TSR5KHN+wB5GSWK9xhpMdC/ug+0veNNhg1na4DHaRA27pEtXFal3iqR X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB6997 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/7/2024 10:36 PM, Stephen Hemminger wrote: > On Wed, 7 Feb 2024 19:10:37 +0000 > Ferruh Yigit wrote: > >> ../drivers/common/sfc_efx/base/ef10_filter.c:1246:18: error: shift count >>> = width of type [-Werror,-Wshift-count-overflow] >> matches_count = MCDI_OUT_DWORD(req, >> ^~~~~~~~~~~~~~~~~~~ >> ../drivers/common/sfc_efx/base/efx_mcdi.h:493:2: note: expanded from >> macro 'MCDI_OUT_DWORD' >> EFX_DWORD_FIELD(*MCDI_OUT2(_emr, efx_dword_t, _ofst), \ >> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> ../drivers/common/sfc_efx/base/efx_types.h:533:30: note: expanded from >> macro 'EFX_DWORD_FIELD' >> EFX_HIGH_BIT(_field)) & EFX_MASK32(_field)) >> ^~~~~~~~~~~~~~~~~~ >> ../drivers/common/sfc_efx/base/efx_types.h:145:23: note: expanded from >> macro 'EFX_MASK32' >> (((((uint32_t)1) << EFX_WIDTH(_field))) - 1)) > > None of this got changed by the patch. Looks like it would not compile > even without the patch on your version of clang. > Nope, error only happens with the patch. And CI seems reporting the errors: https://mails.dpdk.org/archives/test-report/2024-January/558546.html