From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5F05BA04DD; Thu, 19 Nov 2020 15:47:07 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 33C583B5; Thu, 19 Nov 2020 15:47:06 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 6732498 for ; Thu, 19 Nov 2020 15:47:03 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id CE2B65C00B3; Thu, 19 Nov 2020 09:47:01 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 19 Nov 2020 09:47:01 -0500 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=fm2; bh= qym5XF4woL8ECNAQtNz5B5GfcEDZEKCgNJFff2FQoBQ=; b=GDqKOouNBsjkmSj2 tDIBCVgB+KMKqesnH3IqDb2344ZpJEPD2Ei4zF31ycNsjmdb+FYfqB6FCehQ8re/ /R25yhNl8TnvoARS1EW0IgT5NKwrj1m3RzsnwETYtWPSjOE5+wdbUnEK8NscN4rt MjovdrzX1BhhiG2LCBZPMarg6qlIpdmF32fCkpCqeITPjbzWRhyMZ+k45r7Xhca7 9Zs2Ydp3tMhpUwqXKkMNIHRELXyli+NQrXaC75vrHv4S5Gpe22dQLgBRjIfjFEaw NYmxgRoXbkefLw+6+Ryx2HsyDn0hG2kpkNPJ0b+lREq8pof+q6AyNEiUht9tWh54 BgJ4Dg== 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=fm1; bh=qym5XF4woL8ECNAQtNz5B5GfcEDZEKCgNJFff2FQo BQ=; b=cyzkxZURku+bdvcgZR7LSfuIQ81MClZHVmZZ04Lak4Q43eGY/PcDvbxnz ltvp9wWJ+x7t6EeSyQ4scGsm8N7ddgLFGZH5k6lHX+2g1fcksUWPpdzlXptn9SD9 YuqSrAzsGxSQiFMfH7+Ge+Y+qTDobz880nP/ElqywIepsjJGtkxsGYPMWhbrP3sp Dp5zK6O6qlV+MGjvCJBJk4BZP7ZdLvm6phU7+1yRdY9Vl/wZst+H+y/0X4m7whwO 1OtRNJXPwUblMkNk5pw9INT0LsZ+ihg1k7nX3Nqw/jE6wYeDv8ZhkmIEEYH8Pl/n DjGzEyZa7BZh865OeUdNHYhNysW4w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudefjedgieekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 529A23064AAF; Thu, 19 Nov 2020 09:47:00 -0500 (EST) From: Thomas Monjalon To: Dmitry Kozlyuk , Nick Connolly , Tal Shnaiderman Cc: "dev@dpdk.org" , "navasile@linux.microsoft.com" , "dmitrym@microsoft.com" , "pallavi.kadam@intel.com" , Andrey Vesnovaty , asafp@nvidia.com Date: Thu, 19 Nov 2020 15:46:59 +0100 Message-ID: <2257677.iy3WzgjemN@thomas> In-Reply-To: References: <20201114211156.17196-1-talshn@nvidia.com> <20201117155318.48728dac@sovereign> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] Windows: A fundamental issue (was eal/windows: definition for ETOOMANYREFS errno) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" 19/11/2020 14:21, Tal Shnaiderman: > > Subject: Re: Windows: A fundamental issue (was eal/windows: definition for > > ETOOMANYREFS errno) > > > > External email: Use caution opening links or attachments > > > > > > Hi Nick, > > > > > This means that rte_os.h should not include POSIX/Linux definitions to > > > avoid clashes such as the one seen with this change. It's clearly not > > > sustainable if applications have to be modified every time we add more > > > Windows support to the DPDK. > > > > > > Note that this is not an isolated issue - most of the definitions in > > > rte_os.h (redefining close, unlink, strdup etc) should not be present > > > if other layers (application, other libraries, etc) are to be able to > > > implement their own POSIX/Linux support. > > > > The purpose of rte_os.h must be clarified. It now says: > > > > /** > > * This is header should contain any function/macro definition > > * which are not supported natively or named differently in the > > * ... OS. Functions will be added in future releases. > > */ > > > > This doesn't specify if the file should expose wrappers or POSIX-named bits. > > Linux and FreeBSD, however, only use it for RTE_CPU_xxx() macros for > > CPU_xxx() and don't define anything with POSIX names. So should Windows. > > > > > Please can we back this change out until we have a strategy that > > > allows us to make these definitions available for 'internal' use, but > > > prevent them being visible outside of the DPDK tree. If we can't wrap > > > them with > > > rte_* yet, perhaps the short term solution could be as simple as > > > setting RTE_DEFINE_POSIX when building DPDK code and hiding them if it is > > not set? > > > > You need the same value both inside DPDK to return it and outside of DPDK > > to match on it. Returning an unnamed, unspecified code is not an option. > > RTE_ prefix is a way to go. We can just rename ETOOMANYREFS. > > Thanks for the info Nick. > Dmitry, If we go with RTE_ETOOMANYREFS, I assume we need to define it for Linux and FreeBSD as well? Or we can use a "more standard" error code? > > Strictly speaking, C standard defines very few errno, so using POSIX values in > > API is incorrect anyway. It has to be deprecated and removed eventually, we > > already had issues with MMAP_FAILED.