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 F163645B04; Thu, 10 Oct 2024 14:33:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E025B4064C; Thu, 10 Oct 2024 14:33:08 +0200 (CEST) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by mails.dpdk.org (Postfix) with ESMTP id 5326F4042C for ; Thu, 10 Oct 2024 14:33:07 +0200 (CEST) Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2facf48166bso9037011fa.0 for ; Thu, 10 Oct 2024 05:33:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728563587; x=1729168387; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=tJHx3hdafTR9Z5R1HBLXRR6lVj0vSg3pTHbRh6T1Ek0=; b=Z1ZyDWu9AkW5pBOOju5TAnvioZhHMnyKgE++AU2mv2Tlu3eyd4IgkroeMWBDKg7+eL ipyXdw+NA70QdRm4K0xBcnjI6rjGrMzOFBKmy2oRZCfazhkknHexLx+VF5SP/QefbJU/ +FjwsyYLY0xPtUabNS61uLNuwZ7mGLeKQ+6W4uujPOEutNMIMw6VbmVR1QL6zNkdy9Xr LhHm07Q/WECqGcW9pZRXNyiW9PBaQXMWH4sQYkx/T2sYgvPpqgP7EBoR+Nmb4MJQB+rA 07xOp0vOeKgPtBXBjqr7acQ+1p8/8cvFCXFhW/XL6Uc6El+bhDfCCPNp1gWyDPY/KZzj cOBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728563587; x=1729168387; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tJHx3hdafTR9Z5R1HBLXRR6lVj0vSg3pTHbRh6T1Ek0=; b=Uvbwj7eW71RnYk8ZblvQnnS/YfI/uLcd+4VfzEkhrDqGPIuf6QwMfqUorr2qCZyG+X fUpzLGq80jYbt9ZSEaseojKnE9tX+hPdVwIu5twXXsd9bxML1stENHhnfw6fzeew3Yhe sg+kreIM8SHqqndh2OKtz2yEwDylr93k2o7nAxgvtdLAoCLJDMzMsYDoadyirYirekKz KGwIRlvbW9M3hGmiLwRJi8B0LOZ4IaTe2hF1eh00KwJkwyA45TWmtqRlA6hacz/aL7w/ 0mCCznFRaayBMXMB0IUBncTFfaic671TbnK2Hv7RQdGHX/lg+FeJ4AZD8eCdspDCbAsH Sp8w== X-Gm-Message-State: AOJu0Yzy1vs2/E0b8g7s02FkWB+T3/e6W7fU3d3ZXaWzIgwlsfEvaenP k6RNDq/VepumJ3HU9D/TexLwSc0lLKaLji64BEn8u5+Onn5DA/Nh X-Google-Smtp-Source: AGHT+IEXYGqfR2HT+CS66l1WkUAgvSZFpDxZ45uOJSf57p7CCvMF5kubVxiBzxYN4Gn69RJ3ll2P+w== X-Received: by 2002:a05:6512:31c8:b0:52c:e3bd:c70b with SMTP id 2adb3069b0e04-539c4892653mr3679787e87.1.1728563586269; Thu, 10 Oct 2024 05:33:06 -0700 (PDT) Received: from sovereign (broadband-109-173-43-194.ip.moscow.rt.ru. [109.173.43.194]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-539cb6c85f2sm235737e87.67.2024.10.10.05.33.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 05:33:05 -0700 (PDT) Date: Thu, 10 Oct 2024 15:33:03 +0300 From: Dmitry Kozlyuk To: Bruce Richardson Cc: , , , , Tyler Retzlaff , "Pallavi Kadam" Subject: Re: [PATCH] eal/windows: define standard file numbers Message-ID: <20241010153303.7e4318bc@sovereign> In-Reply-To: References: <20241010095434.358810-1-bruce.richardson@intel.com> <20241010134341.142453cf@sovereign> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 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