DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nick Connolly <nick.connolly@mayadata.io>
To: Thomas Monjalon <thomas@monjalon.net>,
	Tal Shnaiderman <talshn@nvidia.com>
Cc: dev@dpdk.org, navasile@linux.microsoft.com,
	dmitrym@microsoft.com, pallavi.kadam@intel.com,
	Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Subject: [dpdk-dev] Windows: A fundamental issue (was eal/windows: definition for ETOOMANYREFS errno)
Date: Tue, 17 Nov 2020 10:51:05 +0000
Message-ID: <92e984ae-23b1-7a44-5d8f-8d699d487115@mayadata.io> (raw)
In-Reply-To: <2575505.0jHVfIEzSa@thomas>

Unfortunately, this change has broken the build for SPDK on Windows.

To use the DPDK libraries, an application needs to include the rte_* 
header, which includes rte_os.h via rte_common.h.  The definition of 
ETOOMANYREFS clashes with the value used when building the SPDK on Windows.

The fundamental issue here is how to support missing POSIX/Linux 
functionality.  If I understand correctly, the EAL should be responsible 
for providing all such functionality.  The support should be private to 
the EAL and only exported through rte_* definitions.

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.

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?

Apologies that I didn't spot the issue earlier.


On 15/11/2020 23:10, Thomas Monjalon wrote:
> 15/11/2020 00:13, Dmitry Kozlyuk:
>> On Sun, 15 Nov 2020 00:21:29 +0200, Tal Shnaiderman wrote:
>>> The ETOOMANYREFS errno is missing from the Windows build.
>>> it is used in initialization of flow error structures.
>>> The commit will define it with the same error code used by
>>> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
>>> ---
>>> v2: log message fix, apply errno to both Windows builds
>>> and remove dependency on winsock2.h [DmitryK]
>> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> Applied, thanks

  reply	other threads:[~2020-11-17 10:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-14 21:11 [dpdk-dev] [PATCH] eal/windows: definition for ETOOMANYREFS errno Tal Shnaiderman
2020-11-14 22:01 ` Dmitry Kozlyuk
2020-11-14 22:11   ` Tal Shnaiderman
2020-11-15 10:51     ` Thomas Monjalon
2020-11-15 14:23       ` Tal Shnaiderman
2020-11-14 22:21 ` [dpdk-dev] [PATCH v2] " Tal Shnaiderman
2020-11-14 23:13   ` Dmitry Kozlyuk
2020-11-15 23:10     ` Thomas Monjalon
2020-11-17 10:51       ` Nick Connolly [this message]
2020-11-17 12:53         ` [dpdk-dev] Windows: A fundamental issue (was eal/windows: definition for ETOOMANYREFS errno) Dmitry Kozlyuk
2020-11-19 13:21           ` Tal Shnaiderman
2020-11-19 14:46             ` Thomas Monjalon
2020-11-19 15:27               ` Tal Shnaiderman
2020-11-19 15:38                 ` Nick Connolly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=92e984ae-23b1-7a44-5d8f-8d699d487115@mayadata.io \
    --to=nick.connolly@mayadata.io \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=dmitrym@microsoft.com \
    --cc=navasile@linux.microsoft.com \
    --cc=pallavi.kadam@intel.com \
    --cc=talshn@nvidia.com \
    --cc=thomas@monjalon.net \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git