DPDK patches and discussions
 help / color / mirror / Atom feed
From: wangyunjian <wangyunjian@huawei.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, Jeff Guo <jia.guo@intel.com>,
	"Jerin Jacob Kollanukkaran" <jerinj@marvell.com>,
	"Lilijun (Jerry)" <jerry.lilijun@huawei.com>,
	xudingke <xudingke@huawei.com>, dpdk stable <stable@dpdk.org>,
	Kevin Traynor <ktraynor@redhat.com>,
	Luca Boccassi <bluca@debian.org>
Subject: Re: [dpdk-dev] [PATCH v5 2/3] eal: return error code when failure
Date: Fri, 23 Oct 2020 09:05:03 +0000	[thread overview]
Message-ID: <34EFBCA9F01B0748BEB6B629CE643AE60DAC8AAE@dggemm513-mbx.china.huawei.com> (raw)
In-Reply-To: <CAJFAV8zrzQpMs8PyOtk-7ShifSgBX8qURoE_p2SeKR2EREmEeQ@mail.gmail.com>

> -----Original Message-----
> From: David Marchand [mailto:david.marchand@redhat.com]
> Sent: Thursday, October 22, 2020 8:52 PM
> To: wangyunjian <wangyunjian@huawei.com>
> Cc: dev <dev@dpdk.org>; Jeff Guo <jia.guo@intel.com>; Jerin Jacob
> Kollanukkaran <jerinj@marvell.com>; Lilijun (Jerry) <jerry.lilijun@huawei.com>;
> xudingke <xudingke@huawei.com>; dpdk stable <stable@dpdk.org>; Kevin
> Traynor <ktraynor@redhat.com>; Luca Boccassi <bluca@debian.org>
> Subject: Re: [dpdk-dev] [PATCH v5 2/3] eal: return error code when failure
> 
> On Wed, Oct 21, 2020 at 1:19 PM wangyunjian <wangyunjian@huawei.com>
> wrote:
> >
> > From: Yunjian Wang <wangyunjian@huawei.com>
> >
> > Fix return value, using -EAGAIN instead of 0 when the callback is busy
> > and using -ENOENT instead of 0 when the callback is not found.
> >
> > Fixes: a753e53d517b ("eal: add device event monitor framework")
> > Cc: stable@dpdk.org
> 
> This API is experimental, its description is vague enough and we can change it
> in the current release.
> But I see this as a change in behavior for existing users, not a fix and I would
> not backport it.
> 
> Opinions?

Agree, not backport it.

Yunjian

> 
> 
> >
> > Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> > Acked-by: Jeff Guo <jia.guo@intel.com>
> > ---
> >  lib/librte_eal/common/eal_common_dev.c | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/lib/librte_eal/common/eal_common_dev.c
> > b/lib/librte_eal/common/eal_common_dev.c
> > index 363a2ca95e..d990bfd20d 100644
> > --- a/lib/librte_eal/common/eal_common_dev.c
> > +++ b/lib/librte_eal/common/eal_common_dev.c
> > @@ -530,9 +530,15 @@ rte_dev_event_callback_unregister(const char
> *device_name,
> >                         free(event_cb);
> >                         ret++;
> >                 } else {
> > -                       continue;
> > +                       ret = -EAGAIN;
> > +                       break;
> >                 }
> >         }
> > +
> > +       /* this callback is not be registered */
> > +       if (ret == 0)
> > +               ret = -ENOENT;
> > +
> >         rte_spinlock_unlock(&dev_event_lock);
> >         return ret;
> >  }
> > --
> > 2.23.0
> >
> 
> 
> --
> David Marchand


  reply	other threads:[~2020-10-23  9:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03  9:44 [dpdk-dev] [PATCH v4 0/3] fixes for device event wangyunjian
2020-07-03  9:46 ` [dpdk-dev] [PATCH v4 1/3] eal: fix memory leak when removing event_cb wangyunjian
2020-07-29 11:47   ` wangyunjian
2020-07-30  2:57     ` Jeff Guo
2020-07-03  9:46 ` [dpdk-dev] [PATCH v4 2/3] eal: return error code when failure wangyunjian
2020-07-03  9:46 ` [dpdk-dev] [PATCH v4 3/3] eal: fix a wrong returned value when callback exists wangyunjian
2020-10-20 13:18   ` [dpdk-dev] [dpdk-stable] " David Marchand
2020-10-20 14:31     ` wangyunjian
2020-09-03  3:33 ` [dpdk-dev] [PATCH v4 0/3] fixes for device event wangyunjian
2020-10-21 11:18 ` [dpdk-dev] [PATCH v5 " wangyunjian
2020-10-21 11:19   ` [dpdk-dev] [PATCH v5 1/3] eal: fix memory leak when removing event_cb wangyunjian
2020-10-21 11:19   ` [dpdk-dev] [PATCH v5 2/3] eal: return error code when failure wangyunjian
2020-10-22 12:51     ` David Marchand
2020-10-23  9:05       ` wangyunjian [this message]
2020-10-21 11:19   ` [dpdk-dev] [PATCH v5 3/3] eal: fix a wrong returned value when callback exists wangyunjian
2020-10-22 12:55     ` David Marchand
2020-10-23  9:05       ` wangyunjian
2020-10-23 11:37   ` [dpdk-dev] [PATCH v5 0/3] fixes for device event David Marchand

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=34EFBCA9F01B0748BEB6B629CE643AE60DAC8AAE@dggemm513-mbx.china.huawei.com \
    --to=wangyunjian@huawei.com \
    --cc=bluca@debian.org \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=jerry.lilijun@huawei.com \
    --cc=jia.guo@intel.com \
    --cc=ktraynor@redhat.com \
    --cc=stable@dpdk.org \
    --cc=xudingke@huawei.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).