DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	Tyler Retzlaff <roretzla@linux.microsoft.com>,
	"navasile@linux.microsoft.com" <navasile@linux.microsoft.com>
Cc: "Richardson, Bruce" <bruce.richardson@intel.com>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"dmitry.kozliuk@gmail.com" <dmitry.kozliuk@gmail.com>,
	"dmitrym@microsoft.com" <dmitrym@microsoft.com>,
	"khot@microsoft.com" <khot@microsoft.com>,
	"navasile@microsoft.com" <navasile@microsoft.com>,
	"ocardona@microsoft.com" <ocardona@microsoft.com>,
	"Kadam, Pallavi" <pallavi.kadam@intel.com>,
	"roretzla@microsoft.com" <roretzla@microsoft.com>,
	"talshn@nvidia.com" <talshn@nvidia.com>
Subject: Re: [PATCH v18 2/8] eal: add thread attributes
Date: Sat, 05 Feb 2022 10:00:01 +0100	[thread overview]
Message-ID: <7543187.gsGJI6kyIV@thomas> (raw)
In-Reply-To: <20220205044140.GA7734@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>

05/02/2022 05:41, Tyler Retzlaff:
> On Fri, Feb 04, 2022 at 07:21:10PM +0000, Ananyev, Konstantin wrote:
> > > +int
> > > +rte_thread_attr_init(rte_thread_attr_t *attr)
> > > +{
> > > +	RTE_VERIFY(attr != NULL);
> > 
> > As a generic one, here and everywhere:
> > Please don't use RTE_VERIFY() for checking input function parameters.
> > We don't want to panic in case of just invalid parameter from user.
> 
> i ask this question again. what useful thing will the user application
> do when handling -EINVAL or rte_errno = EINVAL is returned for
> incorrectly supplied parameters?
> 
> again, there should be a mechanism that allows a policy for how these
> non-recoverable errors are handled rather than defaulting to tossing 
> it over the fence and expecting the application to do something 
> sensible when the only thing it could do is conclusively more
> complicated than having passed the correct parameters in the first place.
> 
> more often then not application programmers will ignore superfluous
> return values from functions like this resulting in the bug remaining
> longer and the state / reason being lost.
> 
> please reconsider.

The application should just abort this feature indeed.
But remember the application can have other features.
In some applications, the DPDK features are a minor part.
So we don't want to crash the entire application just because
a DPDK feature has a bug.
More generally, a library should never crash an entire application.




  reply	other threads:[~2022-02-05  9:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 19:21 Ananyev, Konstantin
2022-02-05  4:41 ` Tyler Retzlaff
2022-02-05  9:00   ` Thomas Monjalon [this message]
2022-02-06  3:45     ` Tyler Retzlaff
2022-02-05 12:51   ` Ananyev, Konstantin
  -- strict thread matches above, loose matches on Subject: below --
2021-11-10  3:01 [dpdk-dev] [PATCH v17 00/13] eal: Add EAL API for threading Narcisa Ana Maria Vasile
2021-11-11  1:33 ` [PATCH v18 0/8] " Narcisa Ana Maria Vasile
2021-11-11  1:33   ` [PATCH v18 2/8] eal: add thread attributes Narcisa Ana Maria Vasile

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=7543187.gsGJI6kyIV@thomas \
    --to=thomas@monjalon.net \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=dmitrym@microsoft.com \
    --cc=khot@microsoft.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=navasile@linux.microsoft.com \
    --cc=navasile@microsoft.com \
    --cc=ocardona@microsoft.com \
    --cc=pallavi.kadam@intel.com \
    --cc=roretzla@linux.microsoft.com \
    --cc=roretzla@microsoft.com \
    --cc=talshn@nvidia.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).