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 78CE7A0C41; Mon, 2 Aug 2021 16:57:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 43E4541147; Mon, 2 Aug 2021 16:57:49 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2051.outbound.protection.outlook.com [40.107.237.51]) by mails.dpdk.org (Postfix) with ESMTP id 1B20040140 for ; Mon, 2 Aug 2021 16:57:48 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aBvYOcTcAOxWQV6z3UIKks7YZxoVQ8bVNGMpK1KWFMraxeOfMqeIh8iR62s8LhY+5+/9tU7SIi4ehlUCUkcDi7OEBGoVOhZLA9fROhn+cbCFweL2sTHBGGE7Hgywc7TIYspN71X4OR8FIbZYSrBi8hliOlIFEW4Xw/Ne+uzzbThXYzxaoUSBZKzvXvSiMQIFTWmgIIIgx8BLGgxIBEWdhQ0QSW9tLaf2oLx8fnhoU1RClNXwAcq+oajYGWFrz/O0aj12YlC9IN03oVIyEXYuMIN27A/m2p8Sy5yAXkAa63BxTjveV54H09ksCYWf6lxhsxsyOdeM82SOtXW69HdVnw== 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=sEoYtsldTBuh/4STktx2mtW6FlvESw1dBRK0T71P6dc=; b=gAyUBQXNRsNKSydVP9rgx/IOmxzRyhSw6mLNhh2LDTCvBcVo6rsxxRvPZuj7kHObH8EMbxHm9Qj4k1t/S/jWtM4SilHYKa0eKqEIdsO7QLwnmvQ4d3JZJa94gLdocOU/nzrsyhTCcdAWqD1FYblXYasPpDSNOA5BkOE4ooSw4efXnmvYtSYjC+Vys+8/Tc+IRagm0q5ic30zTYr+reHJ0rhate6aetfNfKZWrBlk/VGT669w5M4VrmJWU7k9JXX774sqdgr9w2FL1wnmOoNgVLdRTsjQCoZlWorOMZD6xKYaMoRzP7CiWqnEveV/uR8Y+Vp5L1DHhKzyerfvyUXN1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sEoYtsldTBuh/4STktx2mtW6FlvESw1dBRK0T71P6dc=; b=AsTqDS/zZWav2UZYRoH5UIqll9eL1lgEG2yfuPxWX90Z261lYjXH2XRk5DZFiMw59qh5iqvMBLDp/pHbaCwZydFrWwYRvrHYannqLVvi3kmYgeoI+Wg7borG0QLXAv46joRraefGK4wQVUkBjhAkuMeWwjiyv4eJUVgp0okxc67gidZ0Nj6VprtbBa5g7PIkf2I2GGdAU72+UISylXV4m0rKkgi5rIr4t3Ak4z0cdz1lOma6MLz2pR3Qf6ZkA/ALmp33Sq5wGs6pav+5I+iexsZl+76kyNcX8YSrPSiNIC9/YzpRBaE0fqGydElej1mks2WOx3pcFKZelp+MGWL2Ew== Received: from DM4PR12MB5389.namprd12.prod.outlook.com (2603:10b6:5:39a::7) by DM4PR12MB5247.namprd12.prod.outlook.com (2603:10b6:5:39b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18; Mon, 2 Aug 2021 14:57:44 +0000 Received: from DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::6823:63cc:f7d6:dd00]) by DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::6823:63cc:f7d6:dd00%8]) with mapi id 15.20.4373.026; Mon, 2 Aug 2021 14:57:44 +0000 From: Tal Shnaiderman To: Akhil Goyal , Dmitry Kozlyuk CC: NBU-Contact-Thomas Monjalon , "dev@dpdk.org" , Ferruh Yigit , Fiona Trahe , Khoa To , Ray Kinsella , "andrew.rybchenko@oktetlabs.ru" , "olivier.matz@6wind.com" , "navasile@linux.microsoft.com" , "pallavi.kadam@intel.com" , "ranjit.menon@intel.com" , "bruce.richardson@intel.com" , "stephen@networkplumber.org" Thread-Topic: [dpdk-dev] [EXT] Re: [PATCH v4] doc: announce API changes for Windows compatibility Thread-Index: AQHXh5xSedAMufcIOUSM4IXqPqEJvqtgLY2AgAANgwCAABIgEA== Date: Mon, 2 Aug 2021 14:57:43 +0000 Message-ID: References: <20210520184254.16790-1-dmitry.kozliuk@gmail.com> <20210721195557.762726-1-dmitry.kozliuk@gmail.com> <20210721195557.762726-2-dmitry.kozliuk@gmail.com> <9358059.UORW4hmLsd@thomas> <20210802160037.6f8f9c0b@sovereign> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cee3e55c-0a30-42b8-ff78-08d955c5e21f x-ms-traffictypediagnostic: DM4PR12MB5247: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3826; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0m/XSqYFKsybKIdnxasim9g6abxfwgMCDpLzv00p4oFIOU3bcIuEtl1rL7CHx7J6j4bU9Ql0aou241K0iOTdQIzT5W5I0ZTyNUxrgtyCLIbjztaqlUc3ofgHH6eT4WQIEg7SVboWH8PDs2Z69LUrkcubjJOo1zxt4kFRbctOJrl1lMOwPvK/qeVG6ohkq0ECHQH9fhAZa52Xf8+2JIuusTYFhkH2KT972FyelmshuPzME6L2YxSynxDDoxyGqtPHFpVMYD1GG+6GC1+OdukxI5g3jqxJJH0cvBM5P8NeexZIt3+zeNhUJ6YKNKCLSxKCkjulNcR7qIkiXJ3KjGDEjitfP/mWqHM5bRN6HHcaApyTC7yE668tF+ApeTaBSpT4rl5gt+P7HQkEv293Kqy6WQ8vJXa+EjCLtV7VoOuuRIJjATdSNl8xG9auB8xcEfP2uHBgc/PfoNoFz+QWScvnqodvBo98XV36haa02IAx9HOlAmMBhErKxqi4MmHrntROKFLAXu8ldT0gaUG6aDA6/CRUVO5omZuHRlxWH95VlG4uvOOhExl450/gzndi/z0zpbx1rXlMgaNKNnPzkDBLJ2tYsJgBJrhjWO1KsQ6lpWm/HRctpQ+yV9fjiuDQWdeBBdK4aYfundShp42Ffd7CFyP28EwsXCCw9v0SYlY1X0YunnJjZuzbWodNq/vPQvBReM+aw8UJFHjSIqIl5HPPQQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5389.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(136003)(376002)(346002)(39860400002)(2906002)(83380400001)(86362001)(55016002)(66946007)(66476007)(52536014)(66556008)(8936002)(76116006)(4326008)(54906003)(316002)(7416002)(9686003)(110136005)(66446008)(186003)(64756008)(71200400001)(478600001)(26005)(5660300002)(33656002)(38070700005)(8676002)(7696005)(6506007)(122000001)(38100700002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?sf7gwxHPDRLKXrhwjzM3lVhWgOHCLG4ynyc85VTPeoAtyjIPhaSWhtG19JMp?= =?us-ascii?Q?YldCZSp3VEbLmBkNDDCC3iRlTiAVPqcic8v989w69JpJe/zxZcWzkHWzSpmz?= =?us-ascii?Q?QO00WIfnQHO6HJFuDiSK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39PD8ZyQx3PhNmYd/5DT+GOdg1BVOn8khS2sGOqwZPYK6W+Br4WRUoaCT0Hz?= =?us-ascii?Q?kOlQRZPKZ3l4vK+ZIdBvBgoKWaOfv2gGZV9xk50mu+hwyIYWtQr1uuv6o5tt?= =?us-ascii?Q?Khm9eBXG32eZRKHIi0ZHBCCB1OmnC7m/6idUE7DnN3LHOZ+47uNQnYLVYDvi?= =?us-ascii?Q?TXu5+sAdkOYIcEHsy71FOit/h4qwKQ3QKQtvSxs3R7dLXEzljAffmYKm86VB?= =?us-ascii?Q?JLhvn5OBPyvSDAtzhH1Z/l25AzkSEWTJp7BfU9BndgzJu9KjvdgFP9DmlUIb?= =?us-ascii?Q?Owg=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5389.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cee3e55c-0a30-42b8-ff78-08d955c5e21f X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Aug 2021 14:57:43.8669 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: bQ9BqKBYtMnKNpzac2CmkxQ8Ip6FRQ52DbLtfhIp1tRFHwVDKuXyJP/29Oa8DLxWUGAUhdsbEGh36JaKY8mxlA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5247 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v4] doc: announce API changes for Windows compatibility 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 Sender: "dev" > Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v4] doc: announce API changes fo= r > Windows compatibility >=20 > External email: Use caution opening links or attachments >=20 >=20 > > 2021-08-02 12:45 (UTC+0000), Akhil Goyal: > > > > 21/07/2021 21:55, Dmitry Kozlyuk: > > > > > Windows headers define `s_addr`, `min`, and `max` as macros. > > > > > If DPDK headers are included after Windows ones, DPDK structure > > > > > definitions containing fields with these names get broken > > > > > (example 1), as well as any usage of such fields (example 2). If > > > > > DPDK headers undefined these macros, it could break consumer code > (example 3). > > > > > It is proposed to rename structure fields in DPDK, because Win32 > > headers > > > > > are used more widely than DPDK, as a general-purpose platform > > compared > > > > > to domain-specific kit, and are harder to fix because of that. > > > > > Exact new names are left for further discussion. > > > > > > > > > > Example 1: > > > > > > > > > > /* in DPDK public header included after windows.h */ > > > > > struct rte_type { > > > > > int min; /* ERROR: `min` is a macro */ > > > > > }; > > > > > > > > > > Example 2: > > > > > > > > > > #include > > > > > #include > > > > > struct rte_ether_hdr eh; > > > > > eh.s_addr.addr_bytes[0] =3D 0; /* ERROR: `addr_s` is a mac= ro */ > > > > > > > > > > Example 3: > > > > > > > > > > #include > > > > > #include > > > > > struct in_addr addr; > > > > > addr.s_addr =3D 0; /* ERROR: there is no `s_addr` field, > > > > > and `s_addr` macro is undefined by > > > > > DPDK. */ > > > > > > > > > > Commit 6c068dbd9fea ("net: work around s_addr macro on > Windows") > > > > > modified definition of `struct rte_ether_hdr` to avoid the issue. > > > > > However, the workaround assumes `#define s_addr S_addr.S_un` in > > > > > Windows headers, which is not a part of official API. > > > > > It also complicates the definition of `struct rte_ether_hdr`. > > > > > > > > > > Signed-off-by: Dmitry Kozlyuk > > > > > Acked-by: Khoa To > > > > > --- > > > > > +* net: ``s_addr`` and ``d_addr`` fields of ``rte_ether_hdr`` > > > > > +structure > > > > > + will be renamed in DPDK 21.11 to avoid conflict with Windows > > Sockets > > > > headers. > > > > > + > > > > > +* compressdev: ``min`` and ``max`` fields of > > > > > +``rte_param_log2_range`` > > > > structure > > > > > + will be renamed in DPDK 21.11 to avoid conflict with Windows > > Sockets > > > > headers. > > > > > > > > The struct rte_param_log2_range should also be renamed to include > > > > "compress" prefix. > > > > But as we break the struct API, it is not an issue I guess. > > > > > > > > > +* cryptodev: ``min`` and ``max`` fields of > > > > > +``rte_crypto_param_range`` > > > > structure > > > > > + will be renamed in DPDK 21.11 to avoid conflict with Windows > > Sockets > > > > headers. > > > > > > > > Acked-by: Thomas Monjalon > > > > > > > Can we have a local variable named as min/max? > > > If not, then I believe it is not a good idea. > > > > Yes, except for inline functions in public headers. > > The only problematic one I know of is this (rte_lru_x86.h): > > > > static inline int > > f_lru_pos(uint64_t lru_list) > > { > > __m128i lst =3D _mm_set_epi64x((uint64_t)-1, lru_list); > > __m128i min =3D _mm_minpos_epu16(lst); /* <<< */ > > return _mm_extract_epi16(min, 1); } > > > > Fixing it breaks neither API nor ABI, thus no explicit deprecation noti= ce. > OK, > Acked-by: Akhil Goyal >=20 > I hope when windows compilation is enabled, it will be part of CI and it = will > run on each patch which goes to patchworks. Windows compilation is already part of CI in ci/iol-testing and ci/Intel-co= mpilation.