DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Tal Shnaiderman <talshn@nvidia.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
	"pallavi.kadam@intel.com" <pallavi.kadam@intel.com>,
	"navasile@linux.microsoft.com" <navasile@linux.microsoft.com>,
	"dmitrym@microsoft.com" <dmitrym@microsoft.com>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>,
	"anatoly.burakov@intel.com" <anatoly.burakov@intel.com>,
	"vladimir.medvedkin@intel.com" <vladimir.medvedkin@intel.com>,
	"mb@smartsharesystems.com" <mb@smartsharesystems.com>
Subject: Re: [dpdk-dev] [PATCH v2 1/2] eal: error number enhancement for thread TLS API
Date: Wed, 3 Mar 2021 14:10:16 +0300	[thread overview]
Message-ID: <20210303141016.5e9071dd@sovereign> (raw)
In-Reply-To: <DM6PR12MB3945CDEE913E1375B2F964C8A4989@DM6PR12MB3945.namprd12.prod.outlook.com>

2021-03-03 10:37, Tal Shnaiderman:
> > Subject: Re: [PATCH v2 1/2] eal: error number enhancement for thread TLS
> > API
> > 
> > External email: Use caution opening links or attachments
> > 
> > 
> > 2021-03-02 17:26, Tal Shnaiderman:  
> > > add error number reporting to rte_errno in all functions in the
> > > rte_thread_tls_* API.
> > >
> > > Suggested-by: Anatoly Burakov <anatoly.burakov@intel.com>
> > > Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> > > ---
> > >  lib/librte_eal/include/rte_thread.h | 6 +++---
> > >  lib/librte_eal/unix/rte_thread.c    | 6 ++++++
> > >  lib/librte_eal/windows/rte_thread.c | 8 +++++++-
> > >  3 files changed, 16 insertions(+), 4 deletions(-)  
> > 
> > Using OS error codes for rte_errno isn't the right thing to do: this way callers
> > cannot write a portable check of rte_thread_*() result. Consider returning
> > some suitable stable values. OS-specific error info can be logged at debug
> > level, as it is already is some places.  
> 
> In Linux the error codes return are not OS specific (namely EAGAIN, ENOMEM and EINVAL).
> 
> The problem is that documentation on Windows doesn't publish which error code can be returned from GetLastError() for the TLS functions.
> 
> Or do we want to use the same errno for both OSs in case the functions fail regardless to the failure reason?

Yes, so that callers know which codes to check against regardless of the OS.


  reply	other threads:[~2021-03-03 11:10 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 15:26 [dpdk-dev] [PATCH v2 0/2] EAL Thread TLS API enhancements Tal Shnaiderman
2021-03-02 15:26 ` [dpdk-dev] [PATCH v2 1/2] eal: error number enhancement for thread TLS API Tal Shnaiderman
2021-03-02 17:09   ` Dmitry Kozlyuk
2021-03-03 10:37     ` Tal Shnaiderman
2021-03-03 11:10       ` Dmitry Kozlyuk [this message]
2021-03-03 11:53         ` Tal Shnaiderman
2021-03-10 12:06   ` [dpdk-dev] [PATCH v3 0/2] EAL Thread TLS API enhancements Tal Shnaiderman
2021-03-10 12:06     ` [dpdk-dev] [PATCH v3 1/2] eal: error number enhancement for thread TLS API Tal Shnaiderman
2021-03-10 12:48       ` [dpdk-dev] [PATCH v4 0/2] EAL Thread TLS API enhancements Tal Shnaiderman
2021-03-10 12:48         ` [dpdk-dev] [PATCH v4 1/2] eal: error number enhancement for thread TLS API Tal Shnaiderman
2021-03-10 19:45           ` Narcisa Ana Maria Vasile
2021-03-15 15:37             ` Tal Shnaiderman
2021-03-13  2:29           ` Dmitry Kozlyuk
2021-03-15 23:14           ` Thomas Monjalon
2021-03-16  9:15           ` [dpdk-dev] [PATCH v5 0/2] EAL Thread TLS API enhancements Tal Shnaiderman
2021-03-16  9:15             ` [dpdk-dev] [PATCH v5 1/2] eal: error number enhancement for thread TLS API Tal Shnaiderman
2021-03-16 13:28               ` [dpdk-dev] [PATCH v6 0/2] EAL Thread TLS API enhancements Tal Shnaiderman
2021-03-16 13:28                 ` [dpdk-dev] [PATCH v6 1/2] eal: error number enhancement for thread TLS API Tal Shnaiderman
2021-03-16 13:28                 ` [dpdk-dev] [PATCH v6 2/2] eal: rename key opaque pointer and functions in " Tal Shnaiderman
2021-03-26  8:24                 ` [dpdk-dev] [PATCH v6 0/2] EAL Thread TLS API enhancements Thomas Monjalon
2021-03-16  9:15             ` [dpdk-dev] [PATCH v5 2/2] eal: rename key opaque pointer and functions in TLS API Tal Shnaiderman
2021-03-10 12:48         ` [dpdk-dev] [PATCH v4 " Tal Shnaiderman
2021-03-15 23:16           ` Thomas Monjalon
2021-03-16  9:17             ` Tal Shnaiderman
2021-03-10 12:06     ` [dpdk-dev] [PATCH v3 " Tal Shnaiderman
2021-03-10 12:22       ` Morten Brørup
2021-03-02 15:26 ` [dpdk-dev] [PATCH v2 2/2] eal: rename key opaque pointer " Tal Shnaiderman
2021-03-02 15:36   ` Morten Brørup
2021-03-04 11:16     ` Tal Shnaiderman

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20210303141016.5e9071dd@sovereign \
    --to=dmitry.kozliuk@gmail.com \
    --cc=anatoly.burakov@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dmitrym@microsoft.com \
    --cc=mb@smartsharesystems.com \
    --cc=navasile@linux.microsoft.com \
    --cc=pallavi.kadam@intel.com \
    --cc=talshn@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=vladimir.medvedkin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).