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 D9F1346091; Wed, 15 Jan 2025 12:13:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7F7054025F; Wed, 15 Jan 2025 12:13:56 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mails.dpdk.org (Postfix) with ESMTP id 8FA4B4003C for ; Wed, 15 Jan 2025 12:13:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736939635; x=1768475635; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=VV/tKSzZoVlV37x88MSlFqpFgT31xVTXTQbujh1OrlA=; b=nKwKMfEieBCHy/1s6lXeW0KXq2mZjuHDJXMSa8myxDH+pT/Kb45i06OH w39KLXwRKwPGTeJRVhY0pteKlc0hzlqeeNsxRCmXjgkkNT/GhO4ySIAOy sBgqOpDBYV4HS71vofjBpEtYhkdtVJ9o0ZYXdSnPWroF6FTZmtnw+ql+5 GBxh/LVcuZH78Va9bYlnsJLN8WNrBtKw6QhvM3tk8iUsmWVtSPzF++Izb 2kkImz8MIxPYcpLdXCyqTBZjik4NAoasJtuGVANLOwKhq72HNFEPrvGcx hNUnfdUmi5aI4ErjdDqwcgU16y3OZwl1pDdBMJ7j49FY/Qi7FKAwDZmf7 g==; X-CSE-ConnectionGUID: gOstEPNDSx6U/MkJM9RYag== X-CSE-MsgGUID: SqQtirQ4QTmXYm9tUI8KLw== X-IronPort-AV: E=McAfee;i="6700,10204,11315"; a="37149795" X-IronPort-AV: E=Sophos;i="6.12,206,1728975600"; d="scan'208";a="37149795" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2025 03:13:54 -0800 X-CSE-ConnectionGUID: CKbctuoYS4igJ5Pm/Vo3VQ== X-CSE-MsgGUID: g38MRbRcSMiWy4ZLOV0W+g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,206,1728975600"; d="scan'208";a="104943173" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa006.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 15 Jan 2025 03:13:53 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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; Wed, 15 Jan 2025 03:13:52 -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; Wed, 15 Jan 2025 03:13:52 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) 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; Wed, 15 Jan 2025 03:13:50 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=StTuNt4KWgFvxfJ6vgf/UKwTvD3d8V894WF+P7E0mX1NUNypVlLw8OcZJxhXYRWy4urAeZcJBkdG6vsNSegYzlvYek3+SFFLU6jF3LYn7xZuW4P+nFPlZUlXzBdyaccbhVPn+dPGnBDW/R/O/Luk6IPtMSRfAdAb1TXj9HKvjRIDU+gxB6Z7ISWBRM+Cc8mIo9dt1hG/oyr13h11UJErQBanBKQGohnnjyTELEGybjzdt3VHTWkLqfM0CfGcdz6NwygqRYWSiZ4qVtrN9KKuWHQwmz89+0ETdVgY6skvJRAAOi86to3DVCBlrCzSLckHxX6ceiGETxFmViof1vPquA== 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=7v6AwhgMRloowGrcB3kRL55Ak3vH7zNN0c9kRvkfKNs=; b=UKGMgFG5tQbhAbLI7YdRhpUP3cxW3Wp9rxj5IvcXf8qcWyonPex3aKtVIwI+ZB9eqj0v8cqBXB7G4vKjUhFINOBP8Ezd460AIFoW/eLD7+3IVmFKraWkMbHrBDBmwU837FKPGMo+/HuIUimGxkM1kWxp44AKkvyTYLfk1bMK+R1dPPq7CMlSDDtkkq82kcDI0kFKP0T+I6VmXn76qRVmnH65fWp4yfO7NaYRARGFcKEjidSZWko1OIn54U2Kt3UDfT9OkUCgPFgRbk9XwW+Lfk2M1Xt7Zx2Z1MdCk0KZ1P+ZItdckUj1I57g1q1WuktVtMmevLulitsSX1X7ba8kIw== 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 DM4PR11MB7301.namprd11.prod.outlook.com (2603:10b6:8:10a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.18; Wed, 15 Jan 2025 11:13:07 +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; Wed, 15 Jan 2025 11:13:07 +0000 Date: Wed, 15 Jan 2025 11:13:02 +0000 From: Bruce Richardson To: Andre Muezerie CC: , Subject: Re: [PATCH v12 2/3] drivers/common: add diagnostics macros to make code portable Message-ID: References: <1735263196-2809-1-git-send-email-andremue@linux.microsoft.com> <1736915238-779-1-git-send-email-andremue@linux.microsoft.com> <1736915238-779-3-git-send-email-andremue@linux.microsoft.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1736915238-779-3-git-send-email-andremue@linux.microsoft.com> X-ClientProxiedBy: DUZPR01CA0048.eurprd01.prod.exchangelabs.com (2603:10a6:10:469::17) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DM4PR11MB7301:EE_ X-MS-Office365-Filtering-Correlation-Id: 334d7e3e-1192-483d-c0b3-08dd355596ef X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016|7053199007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Aa8m5e+qQFv+/c+BDb0Ec+LmBSPoGgwXbAHMVm5gVOLpwu652PducT58iNHB?= =?us-ascii?Q?zEy79xh/M9KDBn+8NJBaYDL/jg+7eH+tePZeNUh/wmHIdTwtcHs3pCAFRsK9?= =?us-ascii?Q?0SlAnu2O0uQ8V3GMoTRRK10yxJxs3iwivEfe+c+1ufWH78bq2KS500QrGplg?= =?us-ascii?Q?ia/AT8BHCK1P2fDlwxkReaKCPTVpWxG6K6Y85NvJMb3n7fB5j+RWufWy0YWx?= =?us-ascii?Q?6Hfm5uULPlFj8hekg3mmWnk5ALCKRK+DmDoBu/Bkg4zCVFWEJEAgBQCHXm4h?= =?us-ascii?Q?4DFWnDSjtSErxe2RsRfyr/rxddqUFy+iPalfl26RMtxOYmNna3dvccTLIWLG?= =?us-ascii?Q?Aeg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J+IXuG?= =?us-ascii?Q?QUyP9/EKXtzo4uwGNi/1ujMtw+e/29kcKzObH7kiy6yeyXWqRSUTf3tvo3r6?= =?us-ascii?Q?QSrGSy77Sif2IhILTYQTYLnuYojQ7Y8R720kZvem4HJWyg=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)(376014)(1800799024)(366016)(7053199007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Mo212J5ik9j4y+auZ3z3jYqyu9SgL5GRL/w2YjSFkoy7xy1sJr6I5cjUZj4k?= =?us-ascii?Q?WFB9PjPSyJBSzwyiNoJEsT86gkY4569i+n1NK5+hk1kp2XEKDHtHKWG9V5bD?= =?us-ascii?Q?etucBl+My01psDHx2o5/Hp9gvn6sRyu6THYfY5V52RjU+xz8KIBnnSTwyW1x?= =?us-ascii?Q?PU7IYl5B/xasxrDoKIAn1/cdj8IBIItYw6RStFne8sTH2oyi/Q2tQvl5kFo5?= =?us-ascii?Q?cPHooUMpjbS0L2wgGXoigcvaj0ETNM4NLzuAzvsrMkZQiudyDGdd6NO9OHFI?= =?us-ascii?Q?iffdsFKVjs6nas7lQdjfcNnb+mtjR8853jFojg3sKsugazPikv1r63H8WP0T?= =?us-ascii?Q?BmQCWujerNmsudGSOLWca1dWtN6FhQPkC2xeLbefFX4tTyYK4nnBX8vT93pd?= =?us-ascii?Q?vMr96vkREHsFYowwvdq3syifKz1DR87Orgo5LUt3X2vp+cgZ9OPcG7ChpI29?= =?us-ascii?Q?HBllEAQwV3RN9Pfa23CtpLd33iCBNl1b66E4/q4v0sLxI27wXoS4jN+vocjt?= =?us-ascii?Q?jHJm+muiXqHvXGNvGicYR3WRfsfqzNZPX3lfTqqai1A5QTQK3RI6/w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fUkPCuNb9W0N8k8QBM/3iH2V2AD9pDmvzEQI?= =?us-ascii?Q?n7DjVTtAiipA3hEyWoJLBZ0l0swsF/ICc5n7OdBJdzxeA7LnXoNIjlYgShkH?= =?us-ascii?Q?frX7GCAOwFe4+YmU/B1BAA0q1+vuQ/fyxHkVmz3LUqYTA83Ep2MNn5J3nKwb?= =?us-ascii?Q?nA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 334d7e3e-1192-483d-c0b3-08dd355596ef X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2025 11:13:07.8431 (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: q/tBP4SjJZ+68WDPX43q5DsgdKVk5vfeeAxJ63fDwPodX+vi6vAvMVASaSOTsxh47+MlRjFVJLfyr4wiJmTPIWC+ftZFzg6aou/AHz6I9mY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB7301 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 Tue, Jan 14, 2025 at 08:27:17PM -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. > > Signed-off-by: Andre Muezerie > --- > drivers/common/idpf/idpf_common_rxtx_avx512.c | 77 ++++++++++--------- > 1 file changed, 39 insertions(+), 38 deletions(-) > > diff --git a/drivers/common/idpf/idpf_common_rxtx_avx512.c b/drivers/common/idpf/idpf_common_rxtx_avx512.c > index b8450b03ae..fefc0a05ca 100644 > --- a/drivers/common/idpf/idpf_common_rxtx_avx512.c > +++ b/drivers/common/idpf/idpf_common_rxtx_avx512.c > @@ -6,10 +6,6 @@ > #include "idpf_common_device.h" > #include "idpf_common_rxtx.h" > > -#ifndef __INTEL_COMPILER > -#pragma GCC diagnostic ignored "-Wcast-qual" > -#endif > - > #define IDPF_DESCS_PER_LOOP_AVX 8 > #define PKTLEN_SHIFT 10 > > @@ -34,7 +30,7 @@ idpf_singleq_rearm_common(struct idpf_rx_queue *rxq) > dma_addr0 = _mm_setzero_si128(); > for (i = 0; i < IDPF_VPMD_DESCS_PER_LOOP; i++) { > rxp[i] = &rxq->fake_mbuf; > - _mm_store_si128((__m128i *)&rxdp[i].read, > + _mm_store_si128((__m128i *)RTE_IGNORE_CAST_QUAL(&rxdp[i].read), > dma_addr0); > } > } Adding in the (void *) to the IGNORE macro will hugely reduce the amount of casting being done in this file! /Bruce