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 28CB743B7D for ; Tue, 5 Mar 2024 10:57:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E7534026B; Tue, 5 Mar 2024 10:57:58 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2086.outbound.protection.outlook.com [40.107.244.86]) by mails.dpdk.org (Postfix) with ESMTP id 0C1094026B for ; Tue, 5 Mar 2024 10:57:57 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TFvHpzckGFL5at567pk/ILeTCbJ9JwJlgLFNBAt5L/ymCZgHY0QfPAiPMVylzvyKEGxL2zbGlcGPWBA3ULWSiBZDSOvW7sNWJXOjGFp7wvLQm8BKeY4cU6RIBDinKw9gdv0ZouhL8gCBAimhjKwN1sEGgHGWK9enyCOat600ho3xw0K1LZWtugpIusvQc95Fz97G3yBW8w39amqlDUg5ZZDJea6MIKg4n4sZa/ine4Kf4TFxdfJhw0IN7tAK3e4a7+P5GiGqOuL7PYrL0bgGmDaQzdQMVi4q+XEWD6HHHVw17pVNOk/BNsneSfTmwv+r84IXwBzqlBZZ1Nv0kGFb6Q== 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=QZCo7ntqS69ReQv4PFw3zD1/QUuhS4fUPV7E7L9wrqI=; b=hGoF5NV/qlHlkYwGUoVZtNjfnIIgDXau2xo/jpgjPcar2rjGxcwFlqd4wto4wPuAmaLtc+edMFJVCRpZo9hGVNhacue2SjKAqhjXN5ZbSTtSX4p2VTk8UntcFuC2xGQjLGtFRRF+naOSW004YVqOGMdbchqW/fXMSrVAjz9xCdvZ2VZwItIyojunCfCBJ9/gKeeE9iKsd5/MViBY3Hs5KKBsP2bnqT4WMTLQsGOj51YKKjpO0FLISHfqGSit2Kkpthnjt9lsxuOXy1xH+U5/5aRGezghgoE0vvmZ9xGle56a6VYcrCW3Jyc02OZwKDSs0NwRC052IyjkKIH1Q1a7LQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=networkplumber.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QZCo7ntqS69ReQv4PFw3zD1/QUuhS4fUPV7E7L9wrqI=; b=tVIsFdtzLdT+y71fyhKGNP9a87aW1xzllpNXTd11ULkRKQrldG13I/jcpn40p9pHt5Qda72IK/AI9akqTBBKaDht+CBpYfGrvZAeYZ7+bRC85jSUBP2gw3IY95yf8ZZhwm/4M8vMbchAH8teVsDDtjgHmuWvjF015pDGM5/RFfM6s9K2S3Rn/x5nozIbGHszFmFHQPrNV1z6Kg/a9HLrzbFAgUdfO+UBMK7n9qKBzaFhtE2FTUmaRFkqIGDFWl8HjVZRfnqn6WUKXtvPtbZJAUhxjFYwPsVoXs0S+mPxX7RhsZtt6wQLXMzh5ZYFQGe2UPsiXViIf0YgmrSAMSMpWg== Received: from MW4P223CA0026.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::31) by MN2PR12MB4438.namprd12.prod.outlook.com (2603:10b6:208:267::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 09:57:53 +0000 Received: from CO1PEPF000042AD.namprd03.prod.outlook.com (2603:10b6:303:80:cafe::65) by MW4P223CA0026.outlook.office365.com (2603:10b6:303:80::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39 via Frontend Transport; Tue, 5 Mar 2024 09:57:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1PEPF000042AD.mail.protection.outlook.com (10.167.243.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 09:57:52 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 5 Mar 2024 01:57:36 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Tue, 5 Mar 2024 01:57:34 -0800 From: Xueming Li To: Stephen Hemminger CC: =?UTF-8?q?Morten=20Br=C3=B8rup?= , "Andrew Rybchenko" , dpdk stable Subject: patch 'common/sfc_efx/base: use C11 static assert' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:47:28 +0800 Message-ID: <20240305094757.439387-108-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305094757.439387-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000042AD:EE_|MN2PR12MB4438:EE_ X-MS-Office365-Filtering-Correlation-Id: 29d478fe-e571-49c7-1638-08dc3cfab97a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TPA/L+MajazSO8UUlSnZAnhg2HvUvXrftOqG44VokXmhUyk3k+kpbZooYP6zET0DPO52LiUlzLwloJBb82zczToyQiud0qqoKaxEFW1P5rH6GRdZNW5iWBkQAm7Ls8LcV4Lz1Ix5p7dHxOpFaZkC6FeIAAbQFaLLmPSQFdVohKzmjxVHBcWgiGUaftmZEuZXQoa+94B5mFbI35+LjaEEmfM00WiDo9+9xhK1iE+r39q+ck0rkHTx/yW4IUxsPhxxB2C18hRHERNwnkobejj65tLUHjsomg7tufuK93bI61hPQI4Eo1kKYsQCyN8LfumrjC05nFqe+aFe2ts45PGMIussisgnq23vGOrBxdrmPlG7144xDOKTsvKlC54325z3lVrF+L7ql8M0/SFB6B8kiVy8Fg/k3UCtkcDlPfEJ82/ArYYbbwAmBxKKa7O6rmuzbUDtCEwkIm2AVKSNf71ycJl4n7dogCsNFCJnPIw7EgVcagsvgtfFV74pRf2h6VgWY6z9sXCtzlgm3GTLyhuqtX1wOhhTW49A4DfMDNNqUHklzMB3imdkCzBTeVmsfOVR+XMwA4WoavK6/QW8WBNdkr2WuhEhBHwD7S83NhkO+Tg5XFkHHtucHHjK9c6WoQceU2iykTFQgkP5kTsuD+oQCz5jzrbuwcCFeh579Cxdyj/uAQfKmphkQX+O11xmK/R/eTIM6aU/vkQm3Yl+/H+wQjGjuzlsymh3hKTOTKsqh19sFvQOv2ahXG+hkXsYA9wu X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(82310400014)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:57:52.9481 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 29d478fe-e571-49c7-1638-08dc3cfab97a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000042AD.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4438 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 Hi, FYI, your patch has been queued to stable release 23.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/31/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c7b50f40e114efaacade1feaaf11f8f6ff3d6bbb Thanks. Xueming Li --- >From c7b50f40e114efaacade1feaaf11f8f6ff3d6bbb Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Sun, 11 Feb 2024 21:48:59 -0800 Subject: [PATCH] common/sfc_efx/base: use C11 static assert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Xueming Li [ upstream commit 047d7032b76a226f2f1c36775688950933f9121b ] The sfc base code had its own definition of static assertions using the out of bound array access hack. Replace it with a static_assert like rte_common.h. The use of null pointer to compute offset is not always a constant in older versions of clang. Use standard offsetof() instead. Fixes: f67e4719147d ("net/sfc/base: fix coding style") Signed-off-by: Stephen Hemminger Reviewed-by: Morten Brørup Acked-by: Andrew Rybchenko --- drivers/common/sfc_efx/base/efx.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h index 3312c2fa8f..5773cb00b3 100644 --- a/drivers/common/sfc_efx/base/efx.h +++ b/drivers/common/sfc_efx/base/efx.h @@ -7,6 +7,8 @@ #ifndef _SYS_EFX_H #define _SYS_EFX_H +#include + #include "efx_annote.h" #include "efsys.h" #include "efx_types.h" @@ -17,14 +19,20 @@ extern "C" { #endif -#define EFX_STATIC_ASSERT(_cond) \ - ((void)sizeof (char[(_cond) ? 1 : -1])) +/* + * Triggers an error at compilation time if the condition is false. + * + * The { } exists to workaround a bug in clang (#55821) + * where it would not handle _Static_assert in a switch case. + */ +#define EFX_STATIC_ASSERT(_cond) \ + { static_assert((_cond), #_cond); } #define EFX_ARRAY_SIZE(_array) \ (sizeof (_array) / sizeof ((_array)[0])) #define EFX_FIELD_OFFSET(_type, _field) \ - ((size_t)&(((_type *)0)->_field)) + offsetof(_type, _field) /* The macro expands divider twice */ #define EFX_DIV_ROUND_UP(_n, _d) (((_n) + (_d) - 1) / (_d)) -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:34.203637107 +0800 +++ 0107-common-sfc_efx-base-use-C11-static-assert.patch 2024-03-05 17:39:30.893566497 +0800 @@ -1 +1 @@ -From 047d7032b76a226f2f1c36775688950933f9121b Mon Sep 17 00:00:00 2001 +From c7b50f40e114efaacade1feaaf11f8f6ff3d6bbb Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit 047d7032b76a226f2f1c36775688950933f9121b ] @@ -17 +19,0 @@ -Cc: stable@dpdk.org