From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id CF4BBA00C5;
	Mon,  6 Jul 2020 12:39:16 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 5D4431D9F0;
	Mon,  6 Jul 2020 12:39:16 +0200 (CEST)
Received: from EUR04-DB3-obe.outbound.protection.outlook.com
 (mail-eopbgr60043.outbound.protection.outlook.com [40.107.6.43])
 by dpdk.org (Postfix) with ESMTP id E85E01BEE6
 for <dev@dpdk.org>; Mon,  6 Jul 2020 12:39:14 +0200 (CEST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=ejtJD81/TJDuj9cK5PKdmdGN75N2Zl2687Sn5bwsM6dpnTeZVVNKQlYcjSoBulhvS0MpniRV21shUumHT5jSjp2ex5GxYbSu/NtP26/S/ffGnID+4MHkS2n8PX+i6nwNlNITavlpRlTN8zofCuc99bAfq6koWjRqKbfdWnGOxVWOvdNaUSzNpITnFXCGYg4TdW+GkbcadC8z083GGoFThOssPCOJxFNB8nDGFOkcLCX2CaITKWhWZFzy4qpQy+4+yHdBqjhxOJj+Byiyan6Rg8Nj62w8lSmjvSFU3k7/P2hzVT3FF6I8cPZqqur7fAe421aNjQnUf+8aP+bPDGBYRA==
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-SenderADCheck;
 bh=qjWwb9/YXRp8iR04+l9yY6vL1lZxzWkEiHAP59qbIns=;
 b=mt5jtK+jv4x/S/MRahyHKMsxshr0/TrGbd2175L69xIrgqgLHsdSChwCGziLMjFMHvyuxWvuFYoso7QJVfhItf6vjCHe0rBSI1EGP2dTi39PorRQe/GGviN9JbX+mcUOrz29FgIvjR4AAj6GHPpHivuxdMK7lwalDqjKL6fVNQyvndLa69LXopgPL+GoeTjwjoHXYdNIzpI3YNIrs1WCgld4UF1lqTlnNuP96pLaiLgtZZEMkjzUnHEF+XPJBQKM1NE4V9h41rw3vYIyRbi6l77c2Thth+gRgsDSfTQE5gmEVBYTVaWySm4siD45MxrFIt7h0qaITlhGRV9jlwehCQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com;
 dkim=pass header.d=mellanox.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=qjWwb9/YXRp8iR04+l9yY6vL1lZxzWkEiHAP59qbIns=;
 b=bgDuQCHk6COZBmMJFywmq+7Qs5AHcXDRYG6D91Rbn32izprJxMftFVRkny7MpE45M8E0dCpAiyJaprR3BGUTA4W7+jcKyM4MntffQnpg3lylfZlghAwthMNwzDV+dTYKHliSPhCOO6roq7vxGC9aHeIjl5sQpZXbwpyANNRPmds=
Received: from VI1PR05MB5872.eurprd05.prod.outlook.com (2603:10a6:803:de::17)
 by VI1PR05MB5661.eurprd05.prod.outlook.com (2603:10a6:803:cb::19)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.22; Mon, 6 Jul
 2020 10:39:13 +0000
Received: from VI1PR05MB5872.eurprd05.prod.outlook.com
 ([fe80::ec95:ae9e:77c8:63ae]) by VI1PR05MB5872.eurprd05.prod.outlook.com
 ([fe80::ec95:ae9e:77c8:63ae%6]) with mapi id 15.20.3153.029; Mon, 6 Jul 2020
 10:39:13 +0000
From: Fady Bader <fady@mellanox.com>
To: Bruce Richardson <bruce.richardson@intel.com>
CC: "dev@dpdk.org" <dev@dpdk.org>, Thomas Monjalon <thomas@monjalon.net>,
 Tasnim Bashar <tbashar@mellanox.com>, Tal Shnaiderman <talshn@mellanox.com>,
 Yohad Tor <yohadt@mellanox.com>, "dmitry.kozliuk@gmail.com"
 <dmitry.kozliuk@gmail.com>, "harini.ramakrishnan@microsoft.com"
 <harini.ramakrishnan@microsoft.com>, "ocardona@microsoft.com"
 <ocardona@microsoft.com>, "pallavi.kadam@intel.com"
 <pallavi.kadam@intel.com>, "ranjit.menon@intel.com" <ranjit.menon@intel.com>, 
 "olivier.matz@6wind.com" <olivier.matz@6wind.com>,
 "arybchenko@solarflare.com" <arybchenko@solarflare.com>, "mdr@ashroe.eu"
 <mdr@ashroe.eu>, "nhorman@tuxdriver.com" <nhorman@tuxdriver.com>
Thread-Topic: [dpdk-dev] [PATCH v5 1/3] eal: disable function versioning on
 Windows
Thread-Index: AQHWU247Z692VOYodkii9g5Qj4CgKaj6WRuQ
Date: Mon, 6 Jul 2020 10:39:13 +0000
Message-ID: <VI1PR05MB58728A5CAA6A74AC05C82CFEBF690@VI1PR05MB5872.eurprd05.prod.outlook.com>
References: <20200702131409.17964-2-fady@mellanox.com>
 <20200705114629.2152-1-fady@mellanox.com>
 <20200705114629.2152-2-fady@mellanox.com>
 <20200706081944.GC636@bricha3-MOBL.ger.corp.intel.com>
In-Reply-To: <20200706081944.GC636@bricha3-MOBL.ger.corp.intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: intel.com; dkim=none (message not signed)
 header.d=none;intel.com; dmarc=none action=none header.from=mellanox.com;
x-originating-ip: [213.57.105.94]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: ac281929-6557-4d73-9a77-08d82198d314
x-ms-traffictypediagnostic: VI1PR05MB5661:
x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs: <VI1PR05MB5661E32C7C18EE8225673880BF690@VI1PR05MB5661.eurprd05.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8273;
x-forefront-prvs: 04569283F9
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: raB1OwOIQRgTyUYAzs8kJhOEgL6bCL46GrR7E4BlMJiTWGQPfwo12ufaHkOR6+UJ+bq/utrm8K8ax5lKzn5uRwWRlfbWjW8mGdDnasTKHeQW8qDrulE57lXD4TwB04hUAxxitED2DCox5JQ5YA/OLDn9kQz1EZeruIYdEae9rgCH9kQ/dQhOlhTYeQ3snLQz1YJlUL/njU2kMKOjOlPBrh7646IG2z92EukAaxHlmKB7ikMSkuahxtr60S/kNCcARAWoqNqXR3A5zeB7jkQ6gLBVgQjruJxQ90NXkemdAtYA0NXzsJJZIuC3liAM4qKYvCjZ1nqeXM+aT5wcYrJ0tg==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:VI1PR05MB5872.eurprd05.prod.outlook.com; PTR:; CAT:NONE;
 SFTY:;
 SFS:(4636009)(136003)(396003)(366004)(346002)(376002)(39860400002)(53546011)(6506007)(71200400001)(26005)(8676002)(2906002)(7416002)(186003)(64756008)(66476007)(66556008)(66946007)(76116006)(66446008)(7696005)(6916009)(8936002)(54906003)(316002)(45080400002)(52536014)(478600001)(86362001)(4326008)(5660300002)(33656002)(9686003)(55016002)(83380400001);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata: x2dincMYAQsdzTBRkn7GZGmEEjAkGxipxU8XvyHnxWB4WXA1HYah1aZoQh3KT8lLT4tmGmLuOdqe2X8lQiXF+wHO8JqzdMIeW7d+bU/Y4aqPEiHtyZjxQadjk/EcmViebWyK+R//IKgAKzypRnk3uvcfVA1FZ4uH3TlkczmtxMj6ypJhcRw7hMG7EiYDNHX/S11hpx4UbFmXrqGjwVz+lSVuTxU59GnxeYJOKeFqOuSifDY4t+7llTdGnaRpAw5ckJb4G4HDg5eZ2GQHR1AK+mOsHe6YeISlCdYT28OK+mECEIlxG0Vgo0uEVQM+e/a1npzZHnpWRUpyMXryyHJHny/LAU9BmAh3oaSwSP3HEGN+DobwGGNp/3BoOuWrgAql99aAE7bX5/W+qsqAbiFdgwHNeMKVMSXFyNO2BwwRXdes21e6ZBf7Zh62Y9S02oavxxa5CPLTzq+4HH1fy5dvRwHShsssZxoBkn573wb5lQM=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: Mellanox.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: VI1PR05MB5872.eurprd05.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: ac281929-6557-4d73-9a77-08d82198d314
X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jul 2020 10:39:13.2423 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: N+enHEa/eHW9rd+/Uj7YaSK0Urzj+PXscc6t32/fjRjAfMq7yfBrZk/3uSPD8mm6FUzYn0KBfK9JErKqacu3Eg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB5661
Subject: Re: [dpdk-dev] [PATCH v5 1/3] eal: disable function versioning on
 Windows
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>



> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Monday, July 6, 2020 11:20 AM
> To: Fady Bader <fady@mellanox.com>
> Cc: dev@dpdk.org; Thomas Monjalon <thomas@monjalon.net>; Tasnim Bashar
> <tbashar@mellanox.com>; Tal Shnaiderman <talshn@mellanox.com>; Yohad Tor
> <yohadt@mellanox.com>; dmitry.kozliuk@gmail.com;
> harini.ramakrishnan@microsoft.com; ocardona@microsoft.com;
> pallavi.kadam@intel.com; ranjit.menon@intel.com; olivier.matz@6wind.com;
> arybchenko@solarflare.com; mdr@ashroe.eu; nhorman@tuxdriver.com
> Subject: Re: [dpdk-dev] [PATCH v5 1/3] eal: disable function versioning o=
n
> Windows
>=20
> On Sun, Jul 05, 2020 at 02:46:27PM +0300, Fady Bader wrote:
> > Function versioning implementation is not supported by Windows.
> > Function versioning was disabled on Windows.
> >
> > Signed-off-by: Fady Bader <fady@mellanox.com>
> > ---
> >  lib/librte_eal/include/rte_function_versioning.h | 2 +-
> >  lib/meson.build                                  | 5 +++++
> >  2 files changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/lib/librte_eal/include/rte_function_versioning.h
> > b/lib/librte_eal/include/rte_function_versioning.h
> > index f588f2643b..9890551ba1 100644
> > --- a/lib/librte_eal/include/rte_function_versioning.h
> > +++ b/lib/librte_eal/include/rte_function_versioning.h
> > @@ -7,7 +7,7 @@
> >  #define _RTE_FUNCTION_VERSIONING_H_
> >  #include <rte_common.h>
> >
> > -#ifndef RTE_USE_FUNCTION_VERSIONING
> > +#if !defined RTE_USE_FUNCTION_VERSIONING && !defined
> > +RTE_EXEC_ENV_WINDOWS
> >  #error Use of function versioning disabled, is "use_function_versionin=
g=3Dtrue"
> in meson.build?
> >  #endif
> >
> > diff --git a/lib/meson.build b/lib/meson.build index
> > c1b9e1633f..a1ab582a51 100644
> > --- a/lib/meson.build
> > +++ b/lib/meson.build
> > @@ -107,6 +107,11 @@ foreach l:libraries
> >  			shared_dep =3D declare_dependency(include_directories:
> includes)
> >  			static_dep =3D shared_dep
> >  		else
> > +			if is_windows and use_function_versioning
> > +				message('@0@: Function versioning is not
> supported by Windows.'
> > +				.format(name))
> > +				use_function_versioning =3D false
> > +			endif
> >
> >  			if use_function_versioning
> >  				cflags +=3D '-DRTE_USE_FUNCTION_VERSIONING'
> > --
>=20
> I wonder if this patch can be simplified as follows.
>=20
> Presumably the use of the RTE_USE_FUNCTION_VERSIONING cflag doesn't
> cause any problems building on windows, since it's basically nothing exce=
pt a flag
> to indicate the build is configured properly, so that block can be left i=
ntact.
> Instead what is needed to be disabled is the RTE_BUILD_SHARED_LIB setting=
 so
> that we use the static macros. Therefore, I think the same result can be =
got by
> just changing the following line in lib/meson.build:
>=20
> @@ -138,7 +138,7 @@ foreach l:libraries
>                                         include_directories: includes,
>                                         dependencies: static_deps)
>=20
> -                       if not use_function_versioning
> +                       if not use_function_versioning or is_windows
>                                 # use pre-build objects to build shared l=
ib
>                                 sources =3D []
>                                 objs +=3D static_lib.extract_all_objects(=
recursive: false)

Good point, the patch is much simpler now.
I'll send a new version soon.

>=20
> Then no error message disabling is needed in windows. I also don't think =
a
> message about function versioning not being supported on windows is
> necessary. It's not something the user can do anything about himself anyw=
ay. If
> we want such a message I think it should just be printed once at the star=
t of the
> configuration process, rather than each time we hit a versioned library.

It was added in order to avoid confusions in case Linux developers try to r=
un the=20
project on windows. I'll print it once.

>=20
> Regards,
> /Bruce