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 98E1E4609B; Thu, 16 Jan 2025 09:58:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 871204025F; Thu, 16 Jan 2025 09:58:50 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by mails.dpdk.org (Postfix) with ESMTP id D8EC340156 for ; Thu, 16 Jan 2025 09:58:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737017929; x=1768553929; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=sUiDnoKTBFTdr1caQJy6TJcplveqOS0rhoXRSMvFNpM=; b=YsL0pWjrkzuDisi2x8UlHX/UYRsFXc5oSj7uCxLWbRzcCmu0upUUTPOR POJ1utx2HtXzRkiVsS+7gACZMzxH+Y1CNMR0M84y7z8mdzCoyF8sH0cl/ yXPyF60TtiI1nZY223BwU5vcKx0dvT9nO0yquC3glm4gPcSNxOhahSZY/ svje99lotZ98YBYcVczs71qH6rUPo5KNFwHsieiKCQmQ2m98Tn+b6wISA +jNuZ49Q6yOd66PeX7XynIA/pZeiIwR/bejO6kuS1GDE6cCo4RkkN4KGk lIQt6VvIglwpQ0+30baIIdMfJ153rkzzn059XJ7cE6NQTY0ZnFPTXj/yy w==; X-CSE-ConnectionGUID: 6kWg6+jiT4Wg1nuKS5+vkg== X-CSE-MsgGUID: y76YS9KZRaKywQzoIVxN8A== X-IronPort-AV: E=McAfee;i="6700,10204,11316"; a="48785984" X-IronPort-AV: E=Sophos;i="6.13,208,1732608000"; d="scan'208";a="48785984" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2025 00:58:40 -0800 X-CSE-ConnectionGUID: QKxzf9esSuiNqpy2gDLnPw== X-CSE-MsgGUID: w90vBgMMQ0Ka04Xj8pK2Kg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,208,1732608000"; d="scan'208";a="105185916" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa009.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 16 Jan 2025 00:58:40 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Thu, 16 Jan 2025 00:58:39 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44 via Frontend Transport; Thu, 16 Jan 2025 00:58:39 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.176) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.44; Thu, 16 Jan 2025 00:58:38 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uQXFX3hQtCK5t2lid5tTH4FhNoNKkh1L1R+FhvANbee3x5M5NeZ9KfcJqqJC5eIubGD+5cq+f5/4UFJ7hz3gtkudEodcl9DEfqVxQFIpkoOENZ8HTM+jLaqK5CKwFp4/RZ0O5bm37suKGhqVoywsmTGa3ngUPha0FtiS2ABQHxiwotNkqaBsNOALcNjda0T76Zn+HhSnPR9lgdh/YvfO5xU50LEG8v6TDzKiMsTmN+kJrL1Vy8F334aQVVgCmUPc+i8nUivT2qcTcxMy7/SUXOM4OzF0bO65wh+hIGX/DBPJq2WZAF9LPXDHD2yQA2OgdUxaW4eLq1TrHkFVseXddQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=3EGINOExICOC6F4D/JuZhd5P4SwmW19lMNEhbFwExGA=; b=acfamWhm0PQAecH5KI6dk6qYa4inZmb2nbwskihh/eKNBf8PRZ6R5IP46gOX2HxhKn3+IlFSps3jvSvb2sBsS7kIX2QVoCVXaNovNCgHzAZFDTo2EhsE33WCxIe6XZpCEQWL09nSakou9ffo9jfMXdfjci63Vfvv/qDw1sQGRr+RnObK/kqllngvOpHqLKHFwAILbrsT/B64FjTcvRd88vrVbW280qEWsXCFmSe1KGEFhh4n6sY+dvL9Kx+6siElhh0/oop72pmtZxBYEIwZU6C29bYR7zV6q58D1BtcyAIvSKXNW+y3Kf8FtGjs0wmi9cwMzd22FbeayqkEGnOx6A== 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 DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by MN0PR11MB6160.namprd11.prod.outlook.com (2603:10b6:208:3c8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.13; Thu, 16 Jan 2025 08:58:09 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%5]) with mapi id 15.20.8356.010; Thu, 16 Jan 2025 08:58:09 +0000 Date: Thu, 16 Jan 2025 08:58:05 +0000 From: Bruce Richardson To: Andre Muezerie CC: , Subject: Re: [PATCH v13 0/3] add diagnostics macros to make code portable Message-ID: References: <1735263196-2809-1-git-send-email-andremue@linux.microsoft.com> <1736992511-20462-1-git-send-email-andremue@linux.microsoft.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1736992511-20462-1-git-send-email-andremue@linux.microsoft.com> X-ClientProxiedBy: LO4P265CA0145.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c4::7) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|MN0PR11MB6160:EE_ X-MS-Office365-Filtering-Correlation-Id: e4a58c11-08d2-4c62-f1f5-08dd360be660 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?fqZdEzrQAfAyC8AVMoP4HzMHcSAZlCV3Ds0Fbyo/PhkSXZfbzXaXH/Ay7peH?= =?us-ascii?Q?lQBUKOnE0F5lAHZCPS8TRTJhEsdo15LSHSbptu0VR8RUTJq4XU5RVEIntatE?= =?us-ascii?Q?V1/bhkrNw98q/cdurVHWl7VbejrDR76qFhtnRVHb5NMXEU4R6l8z+PgOshvp?= =?us-ascii?Q?RzAjIZYYFp4M6ifyX+CiA9nVUX2T54iyQoK8+t/14IytXjJeyiMdZiHwZeyP?= =?us-ascii?Q?gyDMbnL04/QjBgp+6LTTrmCbQaQHY0zvSuMhBUmChNTnS18/eyV5vn7bGsiW?= =?us-ascii?Q?a4YCoLne3gHT3FpmTrVOgT3/XKUioLVvC4RMmbyHbdf2d5Emf4q9N+egmqsQ?= =?us-ascii?Q?+g57UTzcg7AFXbUpoEcyI5CxF9ud3kROcoh1FhRtYorUCgCZ47INc/7xdI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vG5E60VuS4I+go+0OsZ1sqztwaRiZxBZ67KB?= =?us-ascii?Q?a+TjhYRjmRkMWFvQjAaSPAi4cG3N/E8L+M3mneFgUbERlw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ZbovFTkcDgxV+oNQ1vl5SHhqOywGMtZMr/sh4DT1apO+Pzf7yCjhUFclW1x7?= =?us-ascii?Q?wyQNCkmWQACmYVflWYbs/aea5nl+GyjQgMIUn35Qq8XE6XfDA2nUZX3nb8JK?= =?us-ascii?Q?0v9PzXNCmxUSmQs3PiIfbwes7HuKDxGMB9bhs2VOyGmImd8acEOiOb/58kjh?= =?us-ascii?Q?J7dTBisa4vksTNCkIbCmoyqCrPUfZbIwhzOe2za0/Gzbbwo2GtbE0gdkF7Lw?= =?us-ascii?Q?j7jpdaFMJpXhSi/Le0f7JyEAKbxlHcRZTsmuPg6auAN2UzedM0cNkDVirBbD?= =?us-ascii?Q?r1NOmE3w/h3s7Wiv2hrjm2cdmHAeiq3w1ZWVeGBGPo8rvtU3rUeJgqpkkM0O?= =?us-ascii?Q?N9XRkxbf9AkN7njgvPeYLQhsCABNDt4JXUTTpL9tzGWBy9KDeVLbCFTHiYWJ?= =?us-ascii?Q?U6tFBEYNaB3UcNlhZIn1AxPiVp8V1bjeMuP05J2OPaI+HMdx9Ni0tcAyMiJR?= =?us-ascii?Q?ZkESr49JEpImulPATSaclCuNKF7p7nu93K73in7c3u5hfYTFg+LgevlYJg28?= =?us-ascii?Q?AYVP4zHv3C4vMmwgqL+9ct/QAKuTaGBImKxl6N/S0yI/IjoPQY/6mk0O7rAB?= =?us-ascii?Q?kndq4J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?us-ascii?Q?T4tGhgpgM/ZIf18R0sNXLXGHtpc4ocottHg1lu3kJHtlULrfFJo7sXzv7ZYw?= =?us-ascii?Q?H1sldHUWy5wA8v6oN7EALqQ1MeZv9NeAShtTjJ+paMcJgSXuLQXqpm5VNwMy?= =?us-ascii?Q?bA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: e4a58c11-08d2-4c62-f1f5-08dd360be660 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2025 08:58:09.5126 (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: YkjvlheCR0MK63QdCQGBOMSmNRc1CymEsjDuoJqumyQhwW2Mn449RIJ2f7UTB3iKhA3TKy4xBdrTi3fLT/J0+GqCweRpOppJVgbystO5X5o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR11MB6160 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 Wed, Jan 15, 2025 at 05:55:08PM -0800, Andre Muezerie wrote: > It was a common pattern to have "GCC diagnostic ignored" pragmas > sprinkled over the code and only activate these pragmas for certain > compilers (gcc and clang). Clang supports GCC's pragma for > compatibility with existing source code, so #pragma GCC diagnostic > and #pragma clang diagnostic are synonyms for Clang > (https://clang.llvm.org/docs/UsersManual.html). > > Now that effort is being made to make the code compatible with MSVC > these expressions would become more complex. It makes sense to hide > this complexity behind macros. This makes maintenance easier as these > macros are defined in a single place. As a plus the code becomes > more readable as well. > Series-acked-by: Bruce Richardson > v13: > * Renamed RTE_IGNORE_CAST_QUAL into RTE_PTR_DROP_QUALIFIERS. > * Added (void *) cast to RTE_PTR_DROP_QUALIFIERS to avoid the need > for casting the result in most places where the macro is used. > > v12: > * Added macro RTE_IGNORE_CAST_QUAL and used it as a more compact and > readable form to suppress warnings where a cast is used to remove > a type qualifier. > > v11: > * Added __rte_diagnostic_ignored_wcast_qual to a few more places where > it was needed. > > v10: > * Added __rte_diagnostic_ignored_wcast_qual to a few more places where > it was needed. > > v9: > * Added __rte_diagnostic_ignored_wcast_qual to a few more places where > it was needed. > > v8: > * Added __rte_diagnostic_ignored_wcast_qual to a few more places where > it was needed. > > v7: > * Added __rte_diagnostic_ignored_wcast_qual to a few more places where > it was needed. > > v6: > * Added __rte_diagnostic_ignored_wcast_qual to a few more places where > it was needed. > > v5: > * Added __rte_diagnostic_ignored_wcast_qual to a few more places where > it was needed. > > v4: > * Added __rte_diagnostic_ignored_wcast_qual to a few more places where > it was needed. > > v3: > * Added __rte_diagnostic_ignored_wcast_qual to a few more places where > it was needed. > > v2: > * Removed __rte_diagnostic_ignored_wstrict_aliasing (introduced > in v1). > * Removed the pragmas from many files where they were not needed. > * In the files where the pragmas were indeed needed, reduced the > scope during which they are active, reducing the chance that > unforeseen issues are hidden due to warning suppression. > > Andre Muezerie (3): > eal: add diagnostics macros to make code portable > drivers/common: add diagnostics macros to make code portable > drivers/net: add diagnostics macros to make code portable > > drivers/common/idpf/idpf_common_rxtx_avx512.c | 77 ++++++++--------- > drivers/net/axgbe/axgbe_rxtx.h | 9 -- > drivers/net/cpfl/cpfl_rxtx_vec_common.h | 4 - > drivers/net/dpaa2/dpaa2_rxtx.c | 15 +--- > drivers/net/fm10k/fm10k_rxtx_vec.c | 20 ++--- > drivers/net/hns3/hns3_rxtx_vec_neon.h | 6 +- > .../net/i40e/i40e_recycle_mbufs_vec_common.c | 2 - > drivers/net/i40e/i40e_rxtx_common_avx.h | 24 +++--- > drivers/net/i40e/i40e_rxtx_vec_altivec.c | 23 ++--- > drivers/net/i40e/i40e_rxtx_vec_avx2.c | 40 +++++---- > drivers/net/i40e/i40e_rxtx_vec_avx512.c | 30 ++++--- > drivers/net/i40e/i40e_rxtx_vec_common.h | 4 - > drivers/net/i40e/i40e_rxtx_vec_neon.c | 39 ++++----- > drivers/net/i40e/i40e_rxtx_vec_sse.c | 32 +++---- > drivers/net/iavf/iavf_rxtx_vec_avx2.c | 84 ++++++++++--------- > drivers/net/iavf/iavf_rxtx_vec_avx512.c | 78 ++++++++--------- > drivers/net/iavf/iavf_rxtx_vec_common.h | 12 ++- > drivers/net/iavf/iavf_rxtx_vec_neon.c | 26 +++--- > drivers/net/iavf/iavf_rxtx_vec_sse.c | 52 ++++++------ > drivers/net/ice/ice_rxtx_common_avx.h | 24 +++--- > drivers/net/ice/ice_rxtx_vec_avx2.c | 74 ++++++++-------- > drivers/net/ice/ice_rxtx_vec_avx512.c | 64 ++++++-------- > drivers/net/ice/ice_rxtx_vec_common.h | 4 - > drivers/net/ice/ice_rxtx_vec_sse.c | 28 +++---- > drivers/net/idpf/idpf_rxtx_vec_common.h | 4 - > .../ixgbe/ixgbe_recycle_mbufs_vec_common.c | 2 - > drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 18 ++-- > drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 20 ++--- > drivers/net/mlx5/mlx5_flow.c | 5 +- > drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 5 -- > drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 18 ++-- > drivers/net/mlx5/mlx5_rxtx_vec_sse.h | 71 +++++++++------- > drivers/net/ngbe/ngbe_rxtx_vec_neon.c | 8 +- > drivers/net/tap/tap_flow.c | 6 +- > drivers/net/txgbe/txgbe_rxtx_vec_neon.c | 8 +- > drivers/net/virtio/virtio_rxtx_simple.c | 4 - > lib/eal/include/rte_common.h | 29 +++++++ > 37 files changed, 466 insertions(+), 503 deletions(-) > > -- > 2.47.2.vfs.0.0 >