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 040704291C; Tue, 11 Apr 2023 12:24:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8946340DFD; Tue, 11 Apr 2023 12:24:19 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 917C640C35 for ; Tue, 11 Apr 2023 12:24:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681208657; x=1712744657; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=7zZIl67DIYchMLNf2gk4Nsyh1cA9UMgIDPpSz27sTyI=; b=mnMxycM89MGDzRNbsbcxo2po444ujKdeBc5kcNnJqlimMQ/6JVWr+7kk s+v1SR86FBfc/wb160YoXZysPH/Q2z+aKHmpKQS/rE71jIGtvroSFazU3 AxPjL+fIuR1JdJ+ydtwtNXxe6dKtrkTaLoZCKTpN2RnQOoWos7fYPbEPp 8goJ1Pbnt8btYD3S2yKMHCpp9QK9Ys1QIDhpjIBIX/Cm/uv4V06ealej6 vPeGxKvoc3cwBcvRXuHcWjol5+JcW8IJ9jNI25sUw2ne1mBKLxujwUs9I vtaHn6+c/BfHLdyiuA4X9foKBYnUKoXgsRLaxcVkZlDU9IBWCRsAqgNx6 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10676"; a="323942754" X-IronPort-AV: E=Sophos;i="5.98,336,1673942400"; d="scan'208";a="323942754" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2023 03:24:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10676"; a="682028827" X-IronPort-AV: E=Sophos;i="5.98,336,1673942400"; d="scan'208";a="682028827" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2023 03:24:16 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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.23; Tue, 11 Apr 2023 03:24:16 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 11 Apr 2023 03:24:15 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Tue, 11 Apr 2023 03:24:15 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.177) 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.21; Tue, 11 Apr 2023 03:24:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R0XGk53mrhmATC6Q88iVjdozw9IC9UV2UAVJOai5RYzQFb51PumicCxuEagbvVh110RjCJG9NKurMCgSAYwex5dG2OI0Qc0hO/onsb6vIXSOXxtC9zB4yQhS0hyMXEjz/iNkC07L5kGecrR1YFT1noWV/7yQSt36BFFdpW7pKUv6vpAx+XZEXiXflNjdVoxsvkHLJ0hlL3eu9OFwo2BSLuJGP4o0vSfWT0l4wRqnpxfwYAzLQfuKPKR27keI7XJO9/rk0vQlYUYGMMd4jqJUhI4j2C654YDiC5pUL5viK6QUtKJTkH94O5SRqfng4u0GnasVGgdcD2YC9bVvzaj/Gg== 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=U7GCAXwm3ClZTo3pjyeP6S2YyGo9+PZY5A/9+G8AV04=; b=nZVFVQPKamWZ/F8vgqLgRLx8bSjRmQXuo4KGCbawpr/VhpY5wH9gfaANdfbuZngzGYvJSoivPelgw3V7EsB82n/Tik8q56sUs5FoDKBV35baI3lAuu0ObnE/QiTmx+wKRm1BYaVxbT8qyeZnoxvS/0ndOXb5Qhxik8WUThqAt+mzvLACS55AuOPb2HP/EF7ZszekVkxoexh5bTBfxeUINQNuh+fegVcYNJe/UjzPsGgzafwQ8+vPbAwhz/XNj6GpV/hdzpa5XSo8Rlh8KBx4tUZejvfjJJTTXVVJ5QP1M2A5nBntDtLncapHFpQy4nRS6PlkPv2nyVEPO9jLmojqWQ== 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 CH0PR11MB8085.namprd11.prod.outlook.com (2603:10b6:610:183::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.34; Tue, 11 Apr 2023 10:24:14 +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.6277.038; Tue, 11 Apr 2023 10:24:13 +0000 Date: Tue, 11 Apr 2023 11:24:07 +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> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1680741919-22102-12-git-send-email-roretzla@linux.microsoft.com> X-ClientProxiedBy: LO4P123CA0048.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:152::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_|CH0PR11MB8085:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f47895d-2b8a-497a-e8b2-08db3a76e588 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0RYRJrv7lJ5rdnjdc5TkdjXugwx9L0YLDkzxXZYnXmErjVasFK9FifgxXWLdHlWiWerTd+oJL8GC9+NFNOa5m1qEITeJSSl72RmMW2DBsa9ph1F1pRNNPsr6REs+Yi0SZ0hpXY/CAmdqLEUB4fIMG1CJX2kie5LN6Qn4qi8zUsvAMUUpKNp74iW3TuFE+tC970X413QPLWRT8MRmNsEf51N03yjqn4A958a1d0vVCOo/nCaza1eW14tAn6Cxr2RxUoxjIA6THbwlD9XWhqJywyOpZo46JinditvqWXYg3be+xJN1WBMVGpDB6GY4Ot0MDb71iKOCL7Vyr81SW45wmpcS9ijFRYWtcPh6B/qV3N5zoxYWvZ8NVyWwvkHjRVohh8kf3y7s/gcKkbDar43l6xOiZNNbgnYIImb7Gg96HqgBjqUsK/UXuVsllG1ioEVmulyr7idZ2xaNvaVgb3dmq/oIsk4bH+GX7CGO8NGsaHVmcdkmejUueCINbYkxBmidPwS2Grm4Te61OcgSNUN+vjKxZ1fMOfT9YiXLLqXhI4kuJCNTas0t9M1U2lPV2mPZ 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)(136003)(346002)(396003)(376002)(39860400002)(366004)(451199021)(5660300002)(6666004)(44832011)(316002)(83380400001)(6512007)(26005)(6506007)(41300700001)(38100700002)(8936002)(2906002)(6486002)(82960400001)(66946007)(66476007)(66556008)(8676002)(6916009)(4326008)(478600001)(86362001)(186003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?4Eoc/n7U1jeeVcm9qI6pdncogiKrSRM3gDbN7QAm0oTx1gEMLlO3KxS2S6LW?= =?us-ascii?Q?tGlDR7dNQqQ/stLn/IhNCgm/KEnRv6JjM5TfkP4OSCAheRIeWUZmBqfVyiFe?= =?us-ascii?Q?hrLaMV7EbsKPgdolY8gZmPi4bR05MbRe5eUanKRcAEF+ykZUdcm686mOOM4S?= =?us-ascii?Q?6djFAvQj1scOALteHkJ2T6Lc+cV/6szkCNlKf6+bfa7Edzm9h8OfzFCYpl8F?= =?us-ascii?Q?AlkdKHNVzNFg7m2zCfsV/O8h0FJ6uE5QuRA/ZmAneyZMZZJYVG00J9GLE674?= =?us-ascii?Q?smOMPPLxULIH1HXk25AG2b/XU50SwkSr0ofhhFsnN2e4bjhOsLc3Af1ZeKHr?= =?us-ascii?Q?3EVolm2QZjJ9RSWovFYOnT/+8cdkXBeevvQ+AFRl4w9E3rS7fOWQk3pX0buG?= =?us-ascii?Q?issuGbuRkDsDCswZFQYS7SosUbtRamWsleHB0YBqUNgQgGJQ4yv2Yp0DYqym?= =?us-ascii?Q?sHm2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1y6vT7GFfnvArANTJh?= =?us-ascii?Q?oX73HcZt+enIKyvSwJ/DjoI9z2d6uuBN7HwMDNjYXX/2Fz7U7wKg+PEjd7qr?= =?us-ascii?Q?8gjnt61Oz8oxjHhlDJx3fC2vlaVD1U0MGEsYzEH0F5lMTUBc+f7W/bvxAQ0r?= =?us-ascii?Q?Nz+f1/NkZk7Nb+k5tAvY9W5/J4jUZh1oXKpZWsu4RUTE9AIJnt3foUDVBrVo?= =?us-ascii?Q?wFhi+EgxaU4QqOxI93UMRTWTQQONPOKbqvn7jmKUGLX47vChCaOhrpWVhx+0?= =?us-ascii?Q?dA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 5f47895d-2b8a-497a-e8b2-08db3a76e588 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2023 10:24:13.7012 (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: irrv8gIxAWW5eSupi2U+zAHmCqMXNTjXRoPHX9kDEqMvuuIS3ByK1Zdlugcet+mIXoAGk0pUQWdO9dCV2wfEtlQkEsSuQKU528VbtJFd2Lc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR11MB8085 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, 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: Acked-by: Bruce Richardson