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 6D523A0C4D; Mon, 2 Aug 2021 14:13:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ECF1040140; Mon, 2 Aug 2021 14:13:20 +0200 (CEST) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by mails.dpdk.org (Postfix) with ESMTP id 876324003D for ; Mon, 2 Aug 2021 14:13:19 +0200 (CEST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id ECB5F580C58; Mon, 2 Aug 2021 08:13:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 02 Aug 2021 08:13:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= AFPygG6QFO/2oKTYSXO6SUKuuZBBOQZpj9dwy04Bh6M=; b=ddqONkgQqwzya4Nn tDNhHr8EOM+qD3gbz67MpuraeaUXKNXEYKJAHO3T8l3d2lGeAAwQ3Ml0KyKtD2x5 bxXyz9KHVlzUOyl0+bI7pMIg/OiwleN1aUiUTLctKDFvsj9mpTKSYnJdZsPsN4I8 t7gCZkrFliN3b8VgRq6FClJQ9nqJm3MgBt2fiufYbKqv2fUE/iIV9apZpLlDJN5t i8e916JZ/NW9YMi2fVHAJsI87IDhlhhRqKYeuogjcmLw/HLQosmZIHwNI8d/y/cD hPd7+W79ubmzDVnTKlMXpM8oVXlqjAluCik2QRPSF2WSgAo8mFkJ3rWT9rPu6Yuo Q2EQPA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=AFPygG6QFO/2oKTYSXO6SUKuuZBBOQZpj9dwy04Bh 6M=; b=BI8pyDymSWMMT7t0pyRDBRfgZ1D9eStad14I1f1VYQ3rlDQOzHBDNhIPX /rY391WLQLkvBFh3Sv8E+1X11bNcmQ9PesqpZG6PdeJfHtqNYzkV/vKwaBBb/kIi rVPYX155f1J7AeoyMX6PqKdOyeE51fwFnElMOdLhN4tAfT5lCxXIzsF4J3081AWh kq8FjPGOpCwebNAQx6qBaT99ytwzOK3gYDw34WU0Jiph/qih0EdMgsse6BFnQQ6r +HUwD5rjEdSwTxcrJUEPRErbrOhmrNDyXUp78c+eoaD+6TYyLTHFkriVfPF5FWyg my6A+md2fr4g5pNlvbhZjpHhRdMfg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddriedvgdeghecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 2 Aug 2021 08:13:15 -0400 (EDT) From: Thomas Monjalon To: Dmitry Kozlyuk Cc: dev@dpdk.org, Ferruh Yigit , Akhil Goyal , 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 Date: Mon, 02 Aug 2021 14:13:13 +0200 Message-ID: <9358059.UORW4hmLsd@thomas> In-Reply-To: <20210721195557.762726-2-dmitry.kozliuk@gmail.com> References: <20210520184254.16790-1-dmitry.kozliuk@gmail.com> <20210721195557.762726-1-dmitry.kozliuk@gmail.com> <20210721195557.762726-2-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [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 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] = 0; /* ERROR: `addr_s` is a macro */ > > Example 3: > > #include > #include > struct in_addr addr; > addr.s_addr = 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