DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: "Wang, Haiyue" <haiyue.wang@intel.com>
Cc: dev <dev@dpdk.org>, "Zhang, Qi Z" <qi.z.zhang@intel.com>,
	dpdk stable <stable@dpdk.org>,
	 "Yang, Qiming" <qiming.yang@intel.com>,
	Xiaolong Ye <xiaolong.ye@intel.com>,
	 "Xing, Beilei" <beilei.xing@intel.com>,
	"Wang, Ying A" <ying.a.wang@intel.com>
Subject: Re: [dpdk-dev] [PATCH v1] net/ice: fix memzone leak when device init failed
Date: Wed, 18 Aug 2021 09:07:57 +0200	[thread overview]
Message-ID: <CAJFAV8yXPJ-hO-=rBjLhgF05=xag6Gkm+qD+sUh_kfy_59S3xw@mail.gmail.com> (raw)
In-Reply-To: <BN8PR11MB37958D06F7EA7F47BBF63C61F7FF9@BN8PR11MB3795.namprd11.prod.outlook.com>

On Wed, Aug 18, 2021 at 2:46 AM Wang, Haiyue <haiyue.wang@intel.com> wrote:
>
> > -----Original Message-----
> > From: David Marchand <david.marchand@redhat.com>
> > Sent: Tuesday, August 17, 2021 17:19
> > To: Wang, Haiyue <haiyue.wang@intel.com>
> > Cc: dev <dev@dpdk.org>; Zhang, Qi Z <qi.z.zhang@intel.com>; dpdk stable <stable@dpdk.org>; Yang,
> > Qiming <qiming.yang@intel.com>; Xiaolong Ye <xiaolong.ye@intel.com>; Xing, Beilei
> > <beilei.xing@intel.com>; Wang, Ying A <ying.a.wang@intel.com>
> > Subject: Re: [PATCH v1] net/ice: fix memzone leak when device init failed
> >
> > On Fri, Aug 13, 2021 at 8:45 AM Haiyue Wang <haiyue.wang@intel.com> wrote:
> > >
> > > When flow engine initialization or FXP resource reset failed, it needs
> > > to free the memory zone and unregister the interrupt callback.
> > >
> > > Bugzilla ID: 752
> > > Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine")
> > > Fixes: 7615a6895009 ("net/ice: rework for generic flow enabling")
> > > Fixes: 7edc7158d771 ("net/ice: cleanup RSS/FDIR profile on device init")
> > > Cc: stable@dpdk.org
> > >
> > > Reported-by: David Marchand <david.marchand@redhat.com>
> > > Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> > > ---
> > >  drivers/net/ice/ice_ethdev.c      | 10 ++++++++--
> > >  drivers/net/ice/ice_fdir_filter.c |  2 ++
> > >  2 files changed, 10 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
> > > index 64ee569525..8d62b84805 100644
> > > --- a/drivers/net/ice/ice_ethdev.c
> > > +++ b/drivers/net/ice/ice_ethdev.c
> > > @@ -2139,20 +2139,26 @@ ice_dev_init(struct rte_eth_dev *dev)
> > >                 ret = ice_flow_init(ad);
> > >                 if (ret) {
> > >                         PMD_INIT_LOG(ERR, "Failed to initialize flow");
> > > -                       return ret;
> > > +                       goto err_flow_init;
> >
> > Is it safe to call flow engine uninit callbacks when ice_flow_init() fails?
>
> If each engine->init/uninit handles its internal setting correctly, yes,
> it's safe, if not, this single engine has BUG, let's fix it. ;-)

That was my understanding, but I preferred to ask.
Then, patch lgtm, thanks Haiyue.


-- 
David Marchand


  reply	other threads:[~2021-08-18  7:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13  6:21 Haiyue Wang
2021-08-17  9:19 ` David Marchand
2021-08-18  0:46   ` Wang, Haiyue
2021-08-18  7:07     ` David Marchand [this message]
2021-08-29 11:01 ` Zhang, Qi Z

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='CAJFAV8yXPJ-hO-=rBjLhgF05=xag6Gkm+qD+sUh_kfy_59S3xw@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=haiyue.wang@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    --cc=xiaolong.ye@intel.com \
    --cc=ying.a.wang@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).