eal/windows: definition for ETOOMANYREFS errno

Message ID 20201114211156.17196-1-talshn@nvidia.com (mailing list archive)
State Superseded, archived
Headers
Series eal/windows: definition for ETOOMANYREFS errno |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot warning Travis build: failed

Commit Message

Tal Shnaiderman Nov. 14, 2020, 9:11 p.m. UTC
  The ETOOMANYREFS errno is missing from the Windows clang build
is it used in initialization of flow error structures.

The commit will define it as it is done in the minGW Windows build.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 lib/librte_eal/windows/include/rte_os.h | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Dmitry Kozlyuk Nov. 14, 2020, 10:01 p.m. UTC | #1
On Sat, 14 Nov 2020 23:11:56 +0200, Tal Shnaiderman wrote:
> The ETOOMANYREFS errno is missing from the Windows clang build
> is it used in initialization of flow error structures.

"is it" -> "it is"
 
> The commit will define it as it is done in the minGW Windows build.

"The commit will" is unnecessary.

"minGW" -> "MinGW"
 
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> ---
>  lib/librte_eal/windows/include/rte_os.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h
> index 569ed92d51..2a91ebf6a1 100644
> --- a/lib/librte_eal/windows/include/rte_os.h
> +++ b/lib/librte_eal/windows/include/rte_os.h
> @@ -90,6 +90,7 @@ eal_strerror(int code)
>  }
>  
>  #define strerror eal_strerror
> +#define ETOOMANYREFS WSAETOOMANYREFS
>  
>  #endif /* RTE_TOOLCHAIN_GCC */

Should be #define ETOOMANYREFS 10059 /* WSAETOOMANYREFS */ for all toolchains:

1. Users of librte_ethdev, who check for ETOOMANYREFS, may not wish to include
<winsock2.h> because of its defines that break librte_net headers.

2. Now that I looked closely, MinGW-w64's #define ETOOMANYREFS
WSAETOOMANYREFS is under #if 0 clause (for documentation?). Apologies for
earlier misinformation.
  
Tal Shnaiderman Nov. 14, 2020, 10:11 p.m. UTC | #2
> Subject: Re: [PATCH] eal/windows: definition for ETOOMANYREFS errno
> 
> External email: Use caution opening links or attachments
> 
> 
> On Sat, 14 Nov 2020 23:11:56 +0200, Tal Shnaiderman wrote:
> > The ETOOMANYREFS errno is missing from the Windows clang build is it
> > used in initialization of flow error structures.
> 
> "is it" -> "it is"
> 
> > The commit will define it as it is done in the minGW Windows build.
> 
> "The commit will" is unnecessary.
> 
> "minGW" -> "MinGW"
> 
> > Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> > ---
> >  lib/librte_eal/windows/include/rte_os.h | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/lib/librte_eal/windows/include/rte_os.h
> > b/lib/librte_eal/windows/include/rte_os.h
> > index 569ed92d51..2a91ebf6a1 100644
> > --- a/lib/librte_eal/windows/include/rte_os.h
> > +++ b/lib/librte_eal/windows/include/rte_os.h
> > @@ -90,6 +90,7 @@ eal_strerror(int code)  }
> >
> >  #define strerror eal_strerror
> > +#define ETOOMANYREFS WSAETOOMANYREFS
> >
> >  #endif /* RTE_TOOLCHAIN_GCC */
> 
> Should be #define ETOOMANYREFS 10059 /* WSAETOOMANYREFS */ for all
> toolchains:
> 
> 1. Users of librte_ethdev, who check for ETOOMANYREFS, may not wish to
> include <winsock2.h> because of its defines that break librte_net headers.
> 
> 2. Now that I looked closely, MinGW-w64's #define ETOOMANYREFS
> WSAETOOMANYREFS is under #if 0 clause (for documentation?). Apologies
> for earlier misinformation.

Thank you for the comments Dmitry, will send a v2 promptly.
  
Thomas Monjalon Nov. 15, 2020, 10:51 a.m. UTC | #3
14/11/2020 23:11, Tal Shnaiderman:
> > On Sat, 14 Nov 2020 23:11:56 +0200, Tal Shnaiderman wrote:
> > > The ETOOMANYREFS errno is missing from the Windows clang build is it
> > > used in initialization of flow error structures.
> > 
> > "is it" -> "it is"
> > 
> > > The commit will define it as it is done in the minGW Windows build.
> > 
> > "The commit will" is unnecessary.
> > 
> > "minGW" -> "MinGW"

[...]
> Thank you for the comments Dmitry, will send a v2 promptly.

Just a detail, I see you missed this comment in v2:
	"The commit will" is unnecessary.
  
Tal Shnaiderman Nov. 15, 2020, 2:23 p.m. UTC | #4
> Subject: Re: [PATCH] eal/windows: definition for ETOOMANYREFS errno
> 
> External email: Use caution opening links or attachments
> 
> 
> 14/11/2020 23:11, Tal Shnaiderman:
> > > On Sat, 14 Nov 2020 23:11:56 +0200, Tal Shnaiderman wrote:
> > > > The ETOOMANYREFS errno is missing from the Windows clang build is
> > > > it used in initialization of flow error structures.
> > >
> > > "is it" -> "it is"
> > >
> > > > The commit will define it as it is done in the minGW Windows build.
> > >
> > > "The commit will" is unnecessary.
> > >
> > > "minGW" -> "MinGW"
> 
> [...]
> > Thank you for the comments Dmitry, will send a v2 promptly.
> 
> Just a detail, I see you missed this comment in v2:
>         "The commit will" is unnecessary.
> 

Yes I missed it, Thanks for noticing Thomas.

>
  

Patch

diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h
index 569ed92d51..2a91ebf6a1 100644
--- a/lib/librte_eal/windows/include/rte_os.h
+++ b/lib/librte_eal/windows/include/rte_os.h
@@ -90,6 +90,7 @@  eal_strerror(int code)
 }
 
 #define strerror eal_strerror
+#define ETOOMANYREFS WSAETOOMANYREFS
 
 #endif /* RTE_TOOLCHAIN_GCC */