patches for DPDK stable branches
 help / color / Atom feed
From: wangyunjian <wangyunjian@huawei.com>
To: Jeff Guo <jia.guo@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Lilijun (Jerry)" <jerry.lilijun@huawei.com>,
	xudingke <xudingke@huawei.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH 2/3] eal: fix remove incorrect event_cb
Date: Tue, 30 Jun 2020 11:29:28 +0000
Message-ID: <34EFBCA9F01B0748BEB6B629CE643AE60D0932F9@dggemm513-mbx.china.huawei.com> (raw)
In-Reply-To: <515b5d64-b43b-14c0-4f73-0818fc7340b9@intel.com>



> -----Original Message-----
> From: Jeff Guo [mailto:jia.guo@intel.com]
> Sent: Friday, June 12, 2020 1:56 PM
> To: wangyunjian <wangyunjian@huawei.com>; dev@dpdk.org
> Cc: Lilijun (Jerry) <jerry.lilijun@huawei.com>; xudingke
> <xudingke@huawei.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 2/3] eal: fix remove incorrect event_cb
> 
> hi, yunjian
> 
> On 6/3/2020 8:55 PM, wangyunjian wrote:
> > From: Yunjian Wang <wangyunjian@huawei.com>
> >
> > When the device_name is NULL, it will remove the event_cb directly.
> > We need to compare the 'cb_fn' and 'cb_arg' at the same time.
> >
> > Fixes: a753e53d517b ("eal: add device event monitor framework")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> > ---
> >   lib/librte_eal/common/eal_common_dev.c | 7 ++++++-
> >   1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/lib/librte_eal/common/eal_common_dev.c
> > b/lib/librte_eal/common/eal_common_dev.c
> > index 4cfdb80..6b465bc 100644
> > --- a/lib/librte_eal/common/eal_common_dev.c
> > +++ b/lib/librte_eal/common/eal_common_dev.c
> > @@ -516,7 +516,12 @@ static int cmp_dev_name(const struct rte_device
> *dev, const void *_name)
> >   				    event_cb->cb_arg != cb_arg))
> >   					continue;
> >   			}
> > -		} else if (device_name != NULL) {
> > +		} else if (device_name == NULL && event_cb->dev_name == NULL) {
> > +			if (event_cb->cb_fn != cb_fn ||
> > +			    (cb_arg != (void *)-1 &&
> > +			    event_cb->cb_arg != cb_arg))
> > +				continue;
> > +		} else {
> 
> 
> If we expect flush all event_cb when device_name is NULL, why we should
> check the cb_fn and cb_arg?

Oh, sorry! My mistake, I am wrong to think that this function is used like
rte_intr_callback_register()/rte_intr_callback_unregister().

Please discard it.

Thanks,
Yunjian
> 
> 
> >   			continue;
> >   		}
> >

  reply index

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1591186247.git.wangyunjian@huawei.com>
2020-06-03 12:54 ` [dpdk-stable] [dpdk-dev] [PATCH 1/3] eal: fix memory leak when removing event_cb wangyunjian
2020-06-03 12:55 ` [dpdk-stable] [dpdk-dev] [PATCH 2/3] eal: fix remove incorrect event_cb wangyunjian
2020-06-12  5:56   ` Jeff Guo
2020-06-30 11:29     ` wangyunjian [this message]
2020-06-30 11:56   ` [dpdk-stable] [dpdk-dev] [PATCH v2] eal: fix memory leak when removing event_cb wangyunjian
2020-07-02  9:28     ` Jeff Guo
2020-07-02 10:53       ` wangyunjian
2020-07-02 11:47   ` [dpdk-stable] [dpdk-dev] [PATCH v3 1/2] " wangyunjian
2020-07-03  6:04     ` Jeff Guo
2020-07-03  7:00       ` wangyunjian
2020-07-03  7:23     ` David Marchand
2020-07-03  7:52       ` wangyunjian
2020-07-03  8:01         ` David Marchand
2020-07-02 11:47   ` [dpdk-stable] [dpdk-dev] [PATCH v3 2/2] eal: return error code when failure wangyunjian
2020-06-03 12:55 ` [dpdk-stable] [dpdk-dev] [PATCH 3/3] " wangyunjian
2020-07-02  9:18   ` Jeff Guo
2020-07-02 10:43     ` wangyunjian

Reply instructions:

You may reply publically 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=34EFBCA9F01B0748BEB6B629CE643AE60D0932F9@dggemm513-mbx.china.huawei.com \
    --to=wangyunjian@huawei.com \
    --cc=dev@dpdk.org \
    --cc=jerry.lilijun@huawei.com \
    --cc=jia.guo@intel.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

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox