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 C75A545B09; Thu, 10 Oct 2024 23:41:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 901F64060F; Thu, 10 Oct 2024 23:41:08 +0200 (CEST) Received: from fhigh-a3-smtp.messagingengine.com (fhigh-a3-smtp.messagingengine.com [103.168.172.154]) by mails.dpdk.org (Postfix) with ESMTP id 1574C402E3 for ; Thu, 10 Oct 2024 23:41:07 +0200 (CEST) Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfhigh.phl.internal (Postfix) with ESMTP id 93446114011F; Thu, 10 Oct 2024 17:41:06 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-10.internal (MEProxy); Thu, 10 Oct 2024 17:41:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1728596466; x=1728682866; bh=QYK47PAX5Fricz062/UhhKi/AkRJQpAsvxMYqrahkq8=; b= YtakEou6mkHtou2yUVe3vO5oqCAlRG8fMGC5UTpFUc3QEj0ROZqh1U5tHrGYGPLh ZrW9qnO+Bzkr6Nui/XeWw1bqI5/lh8Ddi/jzFe0OXTaTxSSGAMJ+J0QvFy53lWnw E8js5HErOATqCmHdrdbl1RVw/Pwbm1EinYDQTu5fsZqoNaYTdRHn+SK8CgHpnPh4 c62+bPyACfGsxa50qJvfmIOleQmcByok4cjkcVaowtq0yVT0haYwbl+g3SLd1+WX 1hLddQMHMzIpTy9ttQi7kv47ZOl5lCSni3BGo0ORzZ1V7s1Ihrs89f+21MyVZr21 tWks166URM3POOsHmOBf9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1728596466; x= 1728682866; bh=QYK47PAX5Fricz062/UhhKi/AkRJQpAsvxMYqrahkq8=; b=o swiB8XeXUAImkUt+RFwT5RX75+E4V6BwcY+k8bUm8pzFjahr9X/IoSz4gqQk94zS 3L7DKqlGVFLREQYl5UE16JBknuSjvtsPPJ8sPWMlDAkADUMrcnjlSE+d8xsm5La+ nFR8jqnxLpf3V0HIBxUjsTff8bYxFmD6bKR1nXum7LBUAXPCD6iVSsBFQyq3gcA4 BAli0dsGvh0AMb42VsgjgTuSr+aMY/9dHigoyTz8xyWfSGJhMIf2HpQd/J094PgX VVoin52xWsyu1wprf1rvxnRvwlBY73rEGO+pWe7tniyCbttYBruw3vgv5Rm7R1QA 8hCYD/jyaTVEKs+zIFw5g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdefjedgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeen ucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrg hlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpeekfeehfedtgedtjeehueeutdfgleef ieevkeeikeelkefflefgtdevieehheffudenucffohhmrghinhepughpughkrdhorhhgne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhm rghssehmohhnjhgrlhhonhdrnhgvthdpnhgspghrtghpthhtohepjedpmhhouggvpehsmh htphhouhhtpdhrtghpthhtohepsghruhgtvgdrrhhitghhrghrughsohhnsehinhhtvghl rdgtohhmpdhrtghpthhtohepuggvvhesughpughkrdhorhhgpdhrtghpthhtohepuggrvh hiugdrmhgrrhgthhgrnhgusehrvgguhhgrthdrtghomhdprhgtphhtthhopehfvghrrhhu hhdrhihighhithesrghmugdrtghomhdprhgtphhtthhopehrohhrvghtiihlrgeslhhinh hugidrmhhitghrohhsohhfthdrtghomhdprhgtphhtthhopehprghllhgrvhhirdhkrggu rghmsehinhhtvghlrdgtohhmpdhrtghpthhtohepughmihhtrhihrdhkohiilhhiuhhkse hgmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 10 Oct 2024 17:41:05 -0400 (EDT) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org, david.marchand@redhat.com, ferruh.yigit@amd.com, Tyler Retzlaff , Pallavi Kadam , Dmitry Kozlyuk Subject: Re: [PATCH] eal/windows: define standard file numbers Date: Thu, 10 Oct 2024 23:41:03 +0200 Message-ID: <2067452.jZfb76A358@thomas> In-Reply-To: <20241010153303.7e4318bc@sovereign> References: <20241010095434.358810-1-bruce.richardson@intel.com> <20241010153303.7e4318bc@sovereign> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" 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 10/10/2024 14:33, Dmitry Kozlyuk: > 2024-10-10 12:39 (UTC+0100), Bruce Richardson: > > On Thu, Oct 10, 2024 at 01:43:41PM +0300, Dmitry Kozlyuk wrote: > > > 2024-10-10 10:54 (UTC+0100), Bruce Richardson: > > > > The macros for STD*_FILENO are missing on windows. Add defines for them > > > > to the DPDK-local unistd.h file. > > > > > > > > Signed-off-by: Bruce Richardson > > > > --- > > > > lib/eal/windows/include/unistd.h | 11 +++++++++++ > > > > 1 file changed, 11 insertions(+) > > > > > > > > diff --git a/lib/eal/windows/include/unistd.h b/lib/eal/windows/include/unistd.h > > > > index 6b33005b24..78150c6480 100644 > > > > --- a/lib/eal/windows/include/unistd.h > > > > +++ b/lib/eal/windows/include/unistd.h > > > > @@ -12,4 +12,15 @@ > > > > > > > > #include > > > > > > > > +/* > > > > + * Windows appears to be missing STD*_FILENO macros, so define here. > > > > + * For simplicity, assume that if STDIN_FILENO is missing, all are, > > > > + * rather than checking each individually. > > > > + */ > > > > +#ifndef STDIN_FILENO > > > > +#define STDIN_FILENO _fileno(stdin) > > > > +#define STDOUT_FILENO _fileno(stdout) > > > > +#define STDERR_FILENO _fileno(stderr) > > > > +#endif > > > > + > > > > #endif /* _UNISTD_H_ */ > > > > > > Why is this needed? > > > There are 3 users of STD*_FILENO within DPDK: > > > * lib/eal/unix/eal_debug.c - not for Windows, obviously > > > * app/dumpcap - not for Windows, requires multi-process > > > * app/proc-info - not for Windows, requires multi-process > > > * examples/l2fwd-cat - not for Windows, requires > > > > https://patches.dpdk.org/project/dpdk/patch/20240822104109.116208-2-bruce.richardson@intel.com/ > > > > This merged patch is now throwing errors about the missing defines on > > Windows. > > Thanks, I was searching some outdated source. > > Currently, contains at least `read()`, `write()`, > and `unlink()` which POSIX places in . > I wonder whether all that stuff should be moved into EAL's > or, on the opposite, should consume all other shims. > But that would be a broader refactoring, so for the fix: > > Acked-by: Dmitry Kozlyuk Applied, thanks.