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 C073242925; Wed, 12 Apr 2023 10:50:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE6AD40FAE; Wed, 12 Apr 2023 10:50:50 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 2EF5F4067B for ; Wed, 12 Apr 2023 10:50:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681289448; x=1712825448; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=ttBvtnNmj4oxtz8HFwcfrA4afqHIdsEy2YKpEOUKMMQ=; b=oJMC3bAYH8iZ40AIirs4ZvimCxGjvte5izrGs5PGNU5S9Ut5aQvoWRKM auURgcNH8xFf2laWurDh/IUTYuZYkrpDRI1sItrd+V7lGZidn8Z+ke5s/ 0tIJ4lPUwhfJRrXvGKZONbvjGliicUUqiqdPdkzsOBAWgBHj4+Xbms5o4 YA7C0Y1m+MQs55jB1LcaH5HsRYylijZIALjKWyqZpzYwARzlCE49Ctb6i EZf5Npede1AZ13wGDvhJuYRWfBanZIqt0AUwsKs09axB3uVLYPJxpyhWt v6strUh2XyDgR05aUgWE+9f+YXhIcZlUzYcM0KQY5PMojPk4ilzkOkVG9 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10677"; a="343844397" X-IronPort-AV: E=Sophos;i="5.98,338,1673942400"; d="scan'208";a="343844397" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2023 01:50:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10677"; a="778229895" X-IronPort-AV: E=Sophos;i="5.98,338,1673942400"; d="scan'208";a="778229895" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by FMSMGA003.fm.intel.com with ESMTP; 12 Apr 2023 01:50:39 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 12 Apr 2023 01:50:39 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 12 Apr 2023 01:50:39 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Wed, 12 Apr 2023 01:50:39 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.101) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Wed, 12 Apr 2023 01:50:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LeUH6KFWbY1NuMBdMd2bMN+JZYjUgzu+d2C9PONDKGz3j/BSS+Sk0zf1I/TEf0NkebdY7AC7QLNcmFEbskwvkDs2g2H709deiDFk4vOJpftbXiry+eriCuyO4K1+mP5rcKDdSIR3a1C8OJTItXs95Psa78MXnR5r4DQ9QXCDT4IlBCWduHzyU/KFYKlq7NP541FcF18YGj7MWZPYN+xvsBRcEfqjluopggS7C6T7+a+dYNjberFWiVhnVpvtPBE8h8CP82b5+jG2+Fwv/8Vk6p3g9ZcLzpJaxbN1Nn2OU5wNzSutF9J4sIJU1119V9MaIfoMMvKw1fy1Prk2WB8BHw== 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=orBJMkteoLQL7OOUV20dmjpvZlFisxbLUHQGUkJvn20=; b=P8LhJEzy8g1lwaz5tc26STdHEY7oWrOXyCo2uwv3Kfgwy/Ae1bCNmYtb86AI5s31Hb3jAbKbW2pZwOJ25Em8f82/6UaorCjE8Ua5JZlf5btrABMI8Vb5QQN8T5z+EOC2s2UwxJlvoQN5PpVsTgJYlCvG9FUTnI50W0fRDxxJnFjfLsT0vdWppwVFaEjsBmLOjrA2McyVm4BtxpG5Wo/31suRL0dnvgL1gRe25ROKfiBh3+RjciEysAOU6UHZHk37TL9RP4t/HnkDSqW4ilJY2SSfAS/NyqvNhoDXFbV6YSSn0B8rYt8UvL25B3Sb6RUjh4z9nBkE+3KBxQMnAV9vGg== 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 IA1PR11MB6491.namprd11.prod.outlook.com (2603:10b6:208:3a5::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.35; Wed, 12 Apr 2023 08:50:37 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::695b:260c:f397:2b69]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::695b:260c:f397:2b69%4]) with mapi id 15.20.6298.030; Wed, 12 Apr 2023 08:50:37 +0000 Date: Wed, 12 Apr 2023 09:50:30 +0100 From: Bruce Richardson To: Tyler Retzlaff CC: , , , , Subject: Re: [PATCH v3 11/11] telemetry: avoid expanding versioned symbol macros on msvc Message-ID: References: <1680558751-17931-1-git-send-email-roretzla@linux.microsoft.com> <1680741919-22102-1-git-send-email-roretzla@linux.microsoft.com> <1680741919-22102-12-git-send-email-roretzla@linux.microsoft.com> <20230411203414.GA9591@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230411203414.GA9591@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> X-ClientProxiedBy: LNXP265CA0083.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:76::23) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|IA1PR11MB6491:EE_ X-MS-Office365-Filtering-Correlation-Id: 11576df8-f767-4340-b9fb-08db3b32fc08 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CPkQleHgT3O4NBJ8IGfGaPMPbTjPu/hWlj8HHzqaQelRlLnSTOmaz188mYffqAQA9pB5ddHfNLns/CJuUDt68SsDT+INfbWj98dKiBbLnaeiuL+UjnfPJQSIaCCU9FV7Vm56qqc0O3iNVctGJ8XnE4TyJgX9rFkGW2AFAmq1eTcGP9B+biT1E5EWDeKa5hHuhIoRoyOzwUwLwwzUmFvzTAtGL+CIvC++9MO+F6kC66TQ+dd8iKulTKsyZsTGjOlBhE4RxUUtG/WjEV9vg9Y8cqU8+Liue2EXNA8Tws/c/+Hk6vpfNNutK/yXPoUYnTaqWQypRRCQokWg2tPkQ9OzVdXyNSYhbuHezWLxV9DvSbc3sZCM23x47YmM/vTt3buBwrJPyHLd8gLRQyWuSRZ6qCGfYjc8FasG9aFoBqvun0YyBh94Ih0VbTzi3jvCL9+0kg5fBmRhKp11uf583l6WJe+j7eSz8qOiRy8Dkt/IsnOs8d0JiMMAXepcnDtzSKdTEREapAwwTY1hgyLML9CxVeX6GM+ugiW0DGdBHRQASnuadciMChF7dX57SRwjNPKI 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:(13230028)(346002)(376002)(396003)(366004)(39860400002)(136003)(451199021)(86362001)(6486002)(478600001)(41300700001)(316002)(6916009)(8676002)(4326008)(66946007)(66476007)(66556008)(8936002)(2906002)(5660300002)(44832011)(38100700002)(82960400001)(186003)(26005)(6512007)(6506007)(6666004)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?wIdS9U6K0uMFBQUMUmyvdB1AIMyvsNwhjcKN+cOh7PPL3xp0XtiGsVjUkpKC?= =?us-ascii?Q?6L2FhhSMAWDjGqbEjt7LI6NnwasOSvSASZfVxxeEOig/lUHDqhV8ErVY10O0?= =?us-ascii?Q?50Mtk8lzRWiVfk7hcwaA5wt9Ky2S0nQAlKQ4ltceF3uGpvnTuK70mXzzOcFa?= =?us-ascii?Q?ZYGRIXlu5WuxcyXo6R7ACoB7Uubs1PczR8UqSf72IcrJUzrpQM9zv3XM3b8+?= =?us-ascii?Q?2vOUEZOAl3fx8DbUxkbm/UEOda+5xqE75DIo+Emw4DSHRq2DGq/CDgx/l8R4?= =?us-ascii?Q?/eABasqwoMhpf2xLGZ1BB5Hi3iy4pz8i+QcyWtG8Zhv2a2fZrByQCU/pGbE8?= =?us-ascii?Q?OadRXw42z2rZI+L94u5eKCLDvKtpZV5BFwkM+oudEdQLyLqyfHLELGilHhGM?= =?us-ascii?Q?DeEajc8xlYztZn6Eq5gvgIsxdSGYgLblrY60d113HEVMsmRE1Kr6rCXMhmci?= =?us-ascii?Q?MjMwCxhmI2cVTrAMOLGY7F8V3vlS1GCiZiIIK5RRK9cqpRCX+uC83f+bj5fv?= =?us-ascii?Q?WmVvLPswR4TAq4FXI2qJfo+ve8vIYJK20ZeyWBg5Slb9qKwFTFPx2GOiCB/B?= =?us-ascii?Q?B1TUfocpaecIlCV/IJrRf11pPSJTUYOGulOaOBQNthQuBrgncIs6ZqgKF3k+?= =?us-ascii?Q?kZBWuHhyhBvnvX+hiIWx6lIVpGxar61K5RlF+DVhlsPfH+eKkEeSDc77fWMN?= =?us-ascii?Q?gkHpLN6lDaAF3xEY72pI+yeKnc8sCt+uTBSrz1cZtn390v+ybztYnzUBJJqm?= =?us-ascii?Q?3bPQb8dPwZaL1fVCdguf0kRruiAj8AZqHTMr9NGkUsFZiuNvtIeMKngnRMIh?= =?us-ascii?Q?FXsVYIVontTLWbyRm28mWB5gfMdlweE69ewCjiskDN0o0PmtdDP2ffaO8Cyy?= =?us-ascii?Q?t5g5gwPBvSdR+OkWWDtBCkh/4cnDTZ1gCLMd6LV87QJbnSn32BcS8nOSlxja?= =?us-ascii?Q?yo9FoBa8d/nQimspxXrVbtZf0ZnW3WgbQp//Ya2DwP/7aEigg1FRKlgBgc6m?= =?us-ascii?Q?eACM1DxqmOykNxa452V9tZk0+wP+Jt0ywJ9PJAwnBvWVqOsZWy9ouJTmx/i0?= =?us-ascii?Q?2BsTyCyf6ZGISTLueAriuKDtRe/glP0FgWibe3AH62oe259BLrCpmTmJWvEI?= =?us-ascii?Q?V6cKDvn55SamOyy97Y7CcnvasL1uhQYxpfjXpwzZf/rlamGp20nCpLJ3q1Bv?= =?us-ascii?Q?fil99bvXTsByc3QPxSP2frB/om38xR/SUzs1oWlRZhbc3WTA0/REf9PRASBA?= =?us-ascii?Q?2fisKEB+gznDLPwbcse+olXqUZeZLASZq5cU+5TEBytZa3Qg3heIABaTMM33?= =?us-ascii?Q?K9yJREoSZqEqp762HM80UNJcjXVum0WbPxRy/SXjAI7HcAZnalJSgNnUx2P9?= =?us-ascii?Q?qKOrPaj2SmvIp8orkKLTap6rOJaOx2cG48Wglh8t2/nsx/S55zsYmK4Y4ihA?= =?us-ascii?Q?eYvsQ021CW2LB6aRz1aERnkpJqf8t1Pqfbm62NglYAgxWbqGxrUW3mZXpaJ3?= =?us-ascii?Q?et/DRg8khA/AkK/NsGq20uOYa8UPBDyVrQiXYYlcvhIg1mtmIQOSUBxhb/qb?= =?us-ascii?Q?cvhIqoid7rADfhbP2eUueRb9+APTnjim5kpe6L6/VKEmUQPq2gS2CLjNrpHp?= =?us-ascii?Q?7g=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 11576df8-f767-4340-b9fb-08db3b32fc08 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2023 08:50:36.8914 (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: I/vrIvmwpoOSXM3r9LiAZUjKG1/K79ISsdBjHGu/NP9Gud3Vo9oIHaFIu36ESxAWOSB/yFRVabVnJmq6LkCshZ9vdvMjvGD0SErha4TS15s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB6491 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, Apr 11, 2023 at 01:34:14PM -0700, Tyler Retzlaff wrote: > On Tue, Apr 11, 2023 at 11:24:07AM +0100, Bruce Richardson wrote: > > On Wed, Apr 05, 2023 at 05:45:19PM -0700, Tyler Retzlaff wrote: > > > Windows does not support versioned symbols. Fortunately Windows also > > > doesn't have an exported stable ABI. > > > > > > Export rte_tel_data_add_array_int -> rte_tel_data_add_array_int_24 > > > and rte_tel_data_add_dict_int -> rte_tel_data_add_dict_int_v24 > > > functions. > > > > > > Windows does have a way to achieve similar versioning for symbols but it > > > is not a simple #define so it will be done as a work package later. > > > > > > Signed-off-by: Tyler Retzlaff > > > --- > > > lib/telemetry/telemetry_data.c | 16 ++++++++++++++++ > > > 1 file changed, 16 insertions(+) > > > > > > diff --git a/lib/telemetry/telemetry_data.c b/lib/telemetry/telemetry_data.c > > > index 2bac2de..284c16e 100644 > > > --- a/lib/telemetry/telemetry_data.c > > > +++ b/lib/telemetry/telemetry_data.c > > > @@ -82,8 +82,16 @@ > > > /* mark the v23 function as the older version, and v24 as the default version */ > > > VERSION_SYMBOL(rte_tel_data_add_array_int, _v23, 23); > > > BIND_DEFAULT_SYMBOL(rte_tel_data_add_array_int, _v24, 24); > > > +#ifndef RTE_TOOLCHAIN_MSVC > > > MAP_STATIC_SYMBOL(int rte_tel_data_add_array_int(struct rte_tel_data *d, > > > int64_t x), rte_tel_data_add_array_int_v24); > > > +#else > > > +int > > > +rte_tel_data_add_array_int(struct rte_tel_data *d, int64_t x) > > > +{ > > > + return rte_tel_data_add_array_int_v24(d, x); > > > +} > > > +#endif > > > > > > > Can't see any general way to do this from the versioning header file, so > > agree that we need some changes here. Rather than defining a public > > funcion, we could keep the diff reduced by just using a macro alias here, > > right? For example: > > > > #ifdef RTE_TOOLCHAIN_MSVC > > #define rte_tel_data_add_array_int rte_tel_data_add_array_int_v24 > > #else > > MAP_STATIC_SYMBOL(int rte_tel_data_add_array_int(struct rte_tel_data *d, > > int64_t x), rte_tel_data_add_array_int_v24); > > #endif > > > > If this is a temporary measure, I'd tend towards the shortest solution that > > can work. However, no strong opinions, so, either using functions as you > > have it, or macros: > > so i have to leave it as it is the reason being the version.map -> > exports.def generation does not handle this. the .def only contains the > rte_tel_data_add_array_int symbol. if we expand it away to the _v24 name > the link will fail. > Ah, thanks for clarifying > let's consume the change as-is for now and i will work on the > generalized solution when changes are integrated that actually make the > windows dso/dll functional. > Sure, good for now. Keep my ack on any future versions. > > > > Acked-by: Bruce Richardson