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 53C30A0350;
	Mon, 29 Jun 2020 10:12:56 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 0A2421B13C;
	Mon, 29 Jun 2020 10:12:55 +0200 (CEST)
Received: from EUR04-DB3-obe.outbound.protection.outlook.com
 (mail-eopbgr60067.outbound.protection.outlook.com [40.107.6.67])
 by dpdk.org (Postfix) with ESMTP id 3A0471023
 for <dev@dpdk.org>; Mon, 29 Jun 2020 10:12:53 +0200 (CEST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=NkMcJ4ZsZ0KBpS6fg8w2AGRlFTHNYRJwRKdi3Qpm2u6hjusacMdYhRArg/WgvJnbHUguMDWmiGRCrwLmliDxo4VjIhFw03DBRataAt2ucvVFPJ7YodHW/vokmq1PGzsrKiDTJ1oOvwDyRKEJ4bObplwDhcPMRFDxRQ5a2mBkawJKrPU6Bra3j0PhumZHJD2fYOg1+45tiz3MhT9s/8aEnz656KqD7hhUFJjlE0ffgakFlJie+EAGcZslF2e1rPg3EPoc6SKbH80msj/hEo2C5Bc2U+jHVUijf1QifXg+o3eLh6ZrfCk6GQG7rxnXHo4UoPJ0QGXy45Zwie+aRyLZ5A==
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=x5F2AnEUgEWLjrNp8jY94ZvPzDhePEhHwaNrQT1jTx0=;
 b=BBQhuJFUvmxv8ieEY6EM7cDvr8vwmMzsDVxR3r0KLDI7A/C15pdZe35A47wFKfZfF5WfM7F6Fps9QF8DJnTEeAKZOOSU1q9BIqW/wUDbU1tCopwJCtMNED7EFrAfRFh0IKvg4wQEmlA+GbA+t8vdqJRFCfP/4b7vSE9P/fF1nS2sbmfywMV7iorHEoQO6g73wd+Dh2gdJ2rj0tgHOzU8HXSbX1F3RUPMAduD0nbJ3hHu9ZmyKtDZju/svrml8Aa5dM5d5+8C+zwcrDPYlsvSio0QOE5YfodZ24qfh7ao3yOztRJ5ke3abYuRNgUyW1Uod1sSLcZ56kcfrLckHQ8zuQ==
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=x5F2AnEUgEWLjrNp8jY94ZvPzDhePEhHwaNrQT1jTx0=;
 b=KZzjFcc6C//BP6qg7S+9S7JW1NFebgCm8/X6uYs1uLba8kd6ttHWouE0AZhmmLj/E9MJM54qsSnDuYKQv/3E2gX2xLvNIlesXTd87C+aKpnmdyqy3le8KXdMJsiG8mbPlwZKfHejphpGaAczPitVnS9eP3jqWyxVRePZ/r2wDU0=
Received: from AM0PR05MB5313.eurprd05.prod.outlook.com (2603:10a6:208:f2::28)
 by AM0PR0502MB3956.eurprd05.prod.outlook.com (2603:10a6:208:11::20)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.23; Mon, 29 Jun
 2020 08:12:52 +0000
Received: from AM0PR05MB5313.eurprd05.prod.outlook.com
 ([fe80::9da9:e159:add2:64ee]) by AM0PR05MB5313.eurprd05.prod.outlook.com
 ([fe80::9da9:e159:add2:64ee%3]) with mapi id 15.20.3131.026; Mon, 29 Jun 2020
 08:12:51 +0000
From: Tal Shnaiderman <talshn@mellanox.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>, Ranjit Menon
 <ranjit.menon@intel.com>
CC: Fady Bader <fady@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>, Dmitry
 Malloy <dmitrym@microsoft.com>, Narcisa Ana Maria Vasile
 <Narcisa.Vasile@microsoft.com>, Thomas Monjalon <thomas@monjalon.net>,
 Olivier Matz <olivier.matz@6wind.com>
Thread-Topic: [dpdk-dev] [PATCH 6/7] cmdline: support Windows
Thread-Index: AQHWR0aFLL+KXPoj2kqX0TTdnIRIu6juH+EAgAENGICAABY0gIAABViQ
Date: Mon, 29 Jun 2020 08:12:51 +0000
Message-ID: <AM0PR05MB531357486EF9599503580488A96E0@AM0PR05MB5313.eurprd05.prod.outlook.com>
References: <20200620210511.13134-1-dmitry.kozliuk@gmail.com>
 <20200620210511.13134-7-dmitry.kozliuk@gmail.com>
 <VI1PR05MB5872166540572031222B60E5BF910@VI1PR05MB5872.eurprd05.prod.outlook.com>
 <8b908479-d64c-495d-3a69-de561f2608e8@intel.com>
 <20200629104239.7c0d3d68@sovereign>
In-Reply-To: <20200629104239.7c0d3d68@sovereign>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=mellanox.com;
x-originating-ip: [37.142.1.17]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: a2d5247b-0740-4241-8609-08d81c043813
x-ms-traffictypediagnostic: AM0PR0502MB3956:
x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs: <AM0PR0502MB395696A1528E6243ADC088B7A96E0@AM0PR0502MB3956.eurprd05.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-forefront-prvs: 044968D9E1
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: zU68Ro2XGhPkEUijH32L8abceOn3KQumxlLIZX5was+NfmCzZbZ9RLWGgJ9kH+A6OQlqacN0e0mUJx5AdoWuEkKEWErqyqOCJH5ElfSNgyZP0G/1m6L9JkL6VF1I+G5XYvgdKnW3ezqWp51MXJxiqdO4cUYfWxC0ZPdK0geKcZhFGbV59kqyTtRoXB36izaobKuIE93XxSKWWQkjOtSHuheT0+gfG5C6aF7j7I8PLjHbPzmXrgFidjIcR3cfqkKEzOlrSbgwHinN2bqd3FbuXPmrmaLXehU4/snjtFSvStsoJclIFA25hDPKo716I92ou5gdWQGUks0jg9MG0wOxUw==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:AM0PR05MB5313.eurprd05.prod.outlook.com; PTR:; CAT:NONE;
 SFTY:;
 SFS:(4636009)(396003)(376002)(346002)(136003)(39860400002)(366004)(2906002)(83380400001)(9686003)(7696005)(26005)(66946007)(316002)(8936002)(55016002)(4326008)(186003)(76116006)(110136005)(86362001)(6506007)(8676002)(53546011)(66446008)(71200400001)(33656002)(5660300002)(52536014)(478600001)(54906003)(66476007)(66556008)(64756008);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata: OXFzJxIdqNH1Ciliv+IrtprOe/8agGd8M4sxFHgi0B0nFl0nGvCG3zzt34oPAmVZaQ3nXKrUqhKJrF8TfJ1uSBGt3Lcx5OrFZHHSQiGDeAtSQu6GPbeVkhmJY9swdiStHdaDO6DL2SxTHsaCmPScS+jDQV1wIbe3CScdg9Ni34/ccpZpfUtjXx92nogcM/m6Kvg3ZpzGSASbUodp7ab38WQd1IZFQZaOB7lgk4Y1Bl7/yR8grKV+5i2SuF+CyQ9V0+cwIYyjH3dZ2u3kpgNQ0GaNzycBLKe+3pb14fy610aQVUkayspU9HK7tL9EBZzfWKA97DqtuTx30iDwp5mxi1vRa1lAk+6V4W2auxKYSw+CZXvZkOhLa8fWB1ot0jv754bIKT0+gjHp0zumbkzjZCrFx8+dVzWkTG30SZeWMmSStga6HieXeJf3nnk6hTk3gLupaujgQofM/i78m8mN1RW7yvuMjeNWXrDN+3e5xkQ=
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: AM0PR05MB5313.eurprd05.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: a2d5247b-0740-4241-8609-08d81c043813
X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jun 2020 08:12:51.7986 (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: SDi/ocGXk1Zb3fpY3NuVrCYT4JLNQ710RLsAY1vdMrZWzglKiqYjMgYkseLg0MkDMkqQvjxikjgHojFOhlwf5g==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3956
Subject: Re: [dpdk-dev] [PATCH 6/7] cmdline: support 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>

> From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> Subject: Re: [dpdk-dev] [PATCH 6/7] cmdline: support Windows
>=20
> On Sun, 28 Jun 2020 23:23:11 -0700, Ranjit Menon wrote:
> > On 6/28/2020 7:20 AM, Fady Bader wrote:
> > > Hi Dmitry,
> > > I'm trying to run test-pmd on Windows and I ran into this error with
> cmdline.
> > >
> > > The error log message is :
> > > In file included from ../app/test-pmd/cmdline_flow.c:23:
> > > ..\lib\librte_cmdline/cmdline_parse_num.h:24:2: error: 'INT64'
> redeclared as different kind of symbol
> > >    INT64
> > >
> > > In file included from C:/mingw-w64/x86_64/mingw64/x86_64-w64-
> mingw32/include/winnt.h:150,
> > >                   from C:/mingw-w64/x86_64/mingw64/x86_64-w64-
> mingw32/include/minwindef.h:163,
> > >                   from C:/mingw-w64/x86_64/mingw64/x86_64-w64-
> mingw32/include/windef.h:8,
> > >                   from C:/mingw-w64/x86_64/mingw64/x86_64-w64-
> mingw32/include/windows.h:69,
> > >                   from ..\lib/librte_eal/windows/include/rte_windows.=
h:22,
> > >                   from ..\lib/librte_eal/windows/include/pthread.h:20=
,
> > >                   from ..\lib/librte_eal/include/rte_per_lcore.h:25,
> > >                   from ..\lib/librte_eal/include/rte_errno.h:18,
> > >                   from ..\lib\librte_ethdev/rte_ethdev.h:156,
> > >                   from ../app/test-pmd/cmdline_flow.c:18:
> > > C:/mingw-w64/x86_64/mingw64/x86_64-w64-
> mingw32/include/basetsd.h:32:44: note: previous declaration of 'INT64' wa=
s
> here
> > >     __MINGW_EXTENSION typedef signed __int64 INT64,*PINT64;
> > >
> > > The same error is for the other types defined in cmdline_numtype.
> > >
> > > This problem with windows.h is popping in many places and some of
> > > them are cmdline and test-pmd and librte_net.
> > > We should find a way to exclude windows.h from the unneeded places,
> > > is there any suggestions on how it can be done ?
> >
> > We ran into this same issue when working with the code that is on the
> > draft repo.
> >
> > The issue is that UINT8, UINT16, INT32, INT64 etc. are reserved types
> > in Windows headers for integer types. We found that it is easier to
> > change the enum in cmdline_parse_num.h than try to play with the
> > include order of headers. AFAIK, the enums were only used to determine
> > the type in a series of switch() statements in librte_cmdline, so we
> > simply renamed the enums. Not sure, if that will be acceptable here.
>=20
> +1 for renaming enum values. It's not a problem of librte_cmdline itself
> +but a
> problem of its consumption on Windows, however renaming enum values
> doesn't break ABI and winn make librte_cmdline API "namespaced".
>=20
> I don't see a clean way not to expose windows.h, because pthread.h
> depends on it, and if we hide implementation, librte_eal would have to
> export pthread symbols on Windows, which is a hack (or is it?).

test_pmd redefine BOOLEAN and PATTERN in the index enum, I'm not sure how m=
any more conflicts we will face because of this huge include.

Also, DPDK applications will inherit it unknowingly, not sure if this is co=
mmon for windows libraries.

>=20
> --
> Dmitry Kozlyuk