DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"navasile@linux.microsoft.com" <navasile@linux.microsoft.com>,
	"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, 5 Feb 2022 19:45:13 -0800	[thread overview]
Message-ID: <20220206034513.GA4118@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> (raw)
In-Reply-To: <7543187.gsGJI6kyIV@thomas>

On Sat, Feb 05, 2022 at 10:00:01AM +0100, Thomas Monjalon wrote:
> 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.
> 
> 

you haven't addressed my concern. when deployed at scale i need to be
able to capture the state of what was wrong in order to debug the
problem. a crash dump does this.

i agree that the dpdk functionality may be shared/hosted in a process
that does other work but this api hard-codes a behavior that does not
permit easy diagnostics of buggy usage of api vs actual errors. there
is a distinction and it is important.

with the api hard-coded to a single policy you leave the application
author only the option of wrapping every single api in some boilerplate
error handling logic that has to teadeously log part of the application
state (hopefully the part you need)  from the current scope before
explicitly exiting.

as i explained previously i'm not asking that dpdk hard-codes a policy
of crashing either. we just need it to be a choice rather than forcing a
single hard-coded behavior.

  reply	other threads:[~2022-02-06  3:45 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
2022-02-06  3:45     ` Tyler Retzlaff [this message]
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=20220206034513.GA4118@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net \
    --to=roretzla@linux.microsoft.com \
    --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@microsoft.com \
    --cc=talshn@nvidia.com \
    --cc=thomas@monjalon.net \
    /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).