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 3DC63A0C41; Mon, 2 Aug 2021 14:45:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 12F6941147; Mon, 2 Aug 2021 14:45:44 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 7CB9A40140 for ; Mon, 2 Aug 2021 14:45:42 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 172CfWlM010578; Mon, 2 Aug 2021 05:45:39 -0700 Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by mx0b-0016f401.pphosted.com with ESMTP id 3a6b46s207-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Aug 2021 05:45:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DY4qc0f55pODWUnZp/PXNLWvwHQsxKCvXX9ggunA+cu1ppNqVRD+1/vjb0nJwPDY841H2j8VIomOUC+CzKKjRqSMKIq2F5dFHaYs1j1iQjtb4p8kKxYh+G2hp9AaFzRGpzNfdC3L0WsQGFL38mwEAJVRXrtq3t1XiYTWHhe8LXdWUGPYth3YkHASG9KVJBhVNq9svuzSNpjbYJ/01WY27haJrehcUA727d18K6ZLzthYAU9J/ilfLIEjwhb+RnKP7CMc0n0MsdeKE6K1X7njBsU+LALAanRIFaYK6UA5rVE5FUvb195e/LyWQt6xlrUKumoCcXeHf4YYuaPclYZqMw== 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=tZRLmLqSrVWvf4YXvFySLUprrX0ak2aEj3rovW2eq/4=; b=laoi1x8rBndD0rjWIwKKO74fMz4KqWorf1+WAAW5jioJLlNH6g4mqxxXS3nL+wH/I5Yu+700YsYRVVSSKabBHQJmd41e6JZ5o9Zxvs1Roey1yXVygKed8vQqIjjAvYkr7jbFJn71N9ZuUEX8yZ45RFxfeU/vPBs18gYg5l6/dL0muJT6c4iSeMO+ck1TpOaKCIBujeFgV3HTs0JYBqnV78jn4O8DvGdxg2evwdXF+F425xiZZ0ssArpm/nXhvbT+rtEU0oKIwBUh7SEllVjbmzvp7M4k00dDbpdFWpLvlDIGqRdVjjIi+Wxoq61/eRRdyz2hWHOrMOSfmNhtDJX2Lw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tZRLmLqSrVWvf4YXvFySLUprrX0ak2aEj3rovW2eq/4=; b=SWuzng7+3WYmHFykMffS02kY9Q8FLxSE3Egdj39ZD9omB4v5VyP4ZqeeEALaeJW7IPqOfG/uj8R9Z9gldIrWolBvKXpq4rTHib8pEB9j045uRCXXH0PFfQGf6qTHDD1qpi14WW3pncuDbriO46oRuhp2vR9eZRll7CizkFzTqvg= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by CO1PR18MB4683.namprd18.prod.outlook.com (2603:10b6:303:e6::9) 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 12:45:37 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::1455:9a67:a6e7:e557]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::1455:9a67:a6e7:e557%7]) with mapi id 15.20.4373.026; Mon, 2 Aug 2021 12:45:37 +0000 From: Akhil Goyal To: Thomas Monjalon , Dmitry Kozlyuk CC: "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" , "ferruh.yigit@intel.com" , "bruce.richardson@intel.com" , "stephen@networkplumber.org" Thread-Topic: [EXT] Re: [dpdk-dev] [PATCH v4] doc: announce API changes for Windows compatibility Thread-Index: AQHXh5fJMf1504ykvkC2n8np3S2IWKtgKKig Date: Mon, 2 Aug 2021 12:45:37 +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> In-Reply-To: <9358059.UORW4hmLsd@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=marvell.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 82de823d-70a8-4668-a76a-08d955b36db5 x-ms-traffictypediagnostic: CO1PR18MB4683: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3383; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: tiwZ7j3NQAd+4jNBPDpDs1FLHq/AqMOYPRUQFy5+VG14I7dQwhED8eo/WUGNEIxv076JeZFYn5ZVC3zXpC7w030/j7Fqcl3PpVN9481ONoWBVILyqX/cazw1x7NOsbk7GxQQEtY5U26Eq9TTgyC/wV1y/3Lxur2LHjJi528zVZls5y4fG4gsEQOTP0DTUN+gN+exMqAhKxTPW6MB0cBvcOn3FVM9p8kzlbJwTfldSIFLxyYFjAEiXY/HYi4P1fC2/Wqk0oDSktaIhmHDdMBDjV3a2aoMQmDSuDwHRe82BWMcA+3KCy5zh2e+kFFctTX8s7jxfUNHvyaz6lljmWL/GQzuDJqPjatwSYtfl8mE9On5PqXrbT3A9/YwuQC1SXj7F6w6Px7tAITaBaQHI1sZcdNWFXUVfHZSxQkdp555Y7zQD3xqlqlreq35ND6Rm0z/FtwhW9bNc0sudNvJCY0yaMz0ANSu0cGd0sob5wTNhbPWUV6FhIrTxpgaaOeeqY1IWNNVxVU/7l3I+uJmkz71AJ1X+CxZqX3/oXDHkp1MP6Wnf8xD5TWVvbEOHGb1DQYyFnIMeABZdbI4kUC8+S3qyqp5gc5XNUv3hH0db1mTB/H0uWfi4HLZuEn3KPzPYf6MfMBOGK3bRXjYoBaEz/uxxy2lEGHp7kN+Liuh4bYNeUnsUERpjxvlFQ08SE0TZcfEagmJe5MejVwvQDqhPHHovg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(396003)(346002)(376002)(366004)(39860400002)(8936002)(66946007)(66556008)(66476007)(86362001)(478600001)(54906003)(26005)(7696005)(110136005)(2906002)(38100700002)(5660300002)(76116006)(38070700005)(9686003)(316002)(71200400001)(122000001)(6506007)(52536014)(7416002)(186003)(55236004)(66446008)(64756008)(33656002)(55016002)(4326008)(8676002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?vfEta2KGKPqIAKZB6PB8C7+dw6Ngi+eusW1gb92TyrLqD4EOJCAlcOW9q6kv?= =?us-ascii?Q?2zdJLs2ZxONU147Jmye/WC0+BnTRumERhFfjFbfc+B3ZiGKarWBOnksFV/Kr?= =?us-ascii?Q?LGzV2AF+phusm1EfDiUtDzO9u3g9YokQfL/gqzZSus40g+6fJOtPPjpK7YL0?= =?us-ascii?Q?yXV1dm6FpdgVSumiazMOzOmGbAd5e+S0kV1tiMXBUzQU930pZOOcVcaaapNJ?= =?us-ascii?Q?JoMA+ioB6VLt351wKDdys0thKu7pAFpsCCuBXmVSegZrMxERjjbT3T/UQlHk?= =?us-ascii?Q?vDoyKSNOcL3ZTeGXBoOuE8KKGDh4qpuhCoL5bRMPuLG7tdMKVG7CCBlL1FKf?= =?us-ascii?Q?HwILm/dRsNws60GjkWHVFRJ1BIrlwFnJItVN4Bp8PpbscLkSoTnT1+c2d478?= =?us-ascii?Q?RVPHmRQj2T5sQqI5NnaN94RxRGcLWDXF0wB3I1htTj++wV9aH+4caToxzyfl?= =?us-ascii?Q?/0H0nbA+0MSGo5pyqSLG3ycXCyPvn4rA8y6NplYW67is+0Hjb6czHfreqJOB?= =?us-ascii?Q?CjX+3h/VYUr92+EnOKVkP9KN1mJf31h2M1fj3zb1gBOUv1rJuVdL3vkuhtur?= =?us-ascii?Q?IjpOGEJCIi8IucpAKSwOWaAY7T6yxETFPMVXmmJPPgk5vReTAURcj+YiErFr?= =?us-ascii?Q?ya6a0C6m/nWm9ftW1/hNSPet96EvTj5U7YXCYHTXEa5n3VXKBWjrMfXJjT35?= =?us-ascii?Q?oeFVXImvPBqXQpqbBNtvrAhESV+hEERkkLO34/5mbE8BlmZVDC6SUFImZLqf?= =?us-ascii?Q?UGMjUnDdsuUDLswYHil1lbvpDuPaa7M00RYpMeq/wtBobgjChBPpGxGhm3hh?= =?us-ascii?Q?PtAw+cOaGbr3t0zuTtbiMhs+Gtfe75ciXBGYgJb6v8Izd6/sol8d/97/HXJV?= =?us-ascii?Q?IRFUHx9XjifepxqN5FFTFC3WHVVeJtoWK1xueEpFQhsNFpev5V6Jtx8wYfe8?= =?us-ascii?Q?lTSnnvdt/tECb00dBdy4RMZtglM7++iyItU23NPEe1LDO4IUpr50CxUfv72L?= =?us-ascii?Q?LVs6Vy7h/GmfR84aWeU+XI83NnbbDTbJXvensXD4Hlvsb29WukCrHZUnfKa8?= =?us-ascii?Q?oeQMqG+wYENUCguffmybQdAo6fekvh+gfykWOLsRtd3t61w24yy7c+R4cyeO?= =?us-ascii?Q?USZpO7ImBERIhKJzsqZXMhwYEyeN7KgMjnhbfeUBPzMxTFZzYu2B+U+yZp4a?= =?us-ascii?Q?TCEpkHjoL+JSuFDDNzkCoezG2//f6AUvVKZXJIYzCpuzG75hnI50x3bIbMm+?= =?us-ascii?Q?Qy0l5YvaJ9mhd+U8x+hKdt4Zcj2HZjwboF2Wi9CrqCyKb6ZGVYab9xL2nxaV?= =?us-ascii?Q?/i/7d7tafExEB7+PHXrxBiGj?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82de823d-70a8-4668-a76a-08d955b36db5 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Aug 2021 12:45:37.6937 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: GQ2a7My93Bic+xNidXI6iYZvblB821YLrfZC9SJydh/tnJ9d7F0awNUvYtv4KC+BXBOz17DbS8WVR0W+rs5iYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR18MB4683 X-Proofpoint-GUID: -Vv_ENPBfL7h3Np7kDZ46sGpzVmWUKFH X-Proofpoint-ORIG-GUID: -Vv_ENPBfL7h3Np7kDZ46sGpzVmWUKFH X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-02_05:2021-08-02, 2021-08-02 signatures=0 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" > 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 header= s > > 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 macro */ > > > > 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. >=20 > 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. >=20 > > +* 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. >=20 > Acked-by: Thomas Monjalon >=20 Can we have a local variable named as min/max? If not, then I believe it is not a good idea.