From: "Liu, Mingxia" <mingxia.liu@intel.com>
To: "Zhang, Qi Z" <qi.z.zhang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Wu, Jingjing" <jingjing.wu@intel.com>,
"Xing, Beilei" <beilei.xing@intel.com>
Subject: RE: [PATCH] net/idpf: refine idpf_dev_vport_init() function
Date: Fri, 30 Jun 2023 10:46:04 +0000 [thread overview]
Message-ID: <PH0PR11MB5877481C83E080676697D75CEC2AA@PH0PR11MB5877.namprd11.prod.outlook.com> (raw)
In-Reply-To: <DM4PR11MB5994C413F28E5476759ADF95D72AA@DM4PR11MB5994.namprd11.prod.outlook.com>
> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Friday, June 30, 2023 4:14 PM
> To: Liu, Mingxia <mingxia.liu@intel.com>; dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
> Liu, Mingxia <mingxia.liu@intel.com>
> Subject: RE: [PATCH] net/idpf: refine idpf_dev_vport_init() function
>
>
>
> > -----Original Message-----
> > From: Zhang, Qi Z
> > Sent: Friday, June 30, 2023 4:13 PM
> > To: Mingxia Liu <mingxia.liu@intel.com>; dev@dpdk.org
> > Cc: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> > <beilei.xing@intel.com>; Liu, Mingxia <mingxia.liu@intel.com>
> > Subject: RE: [PATCH] net/idpf: refine idpf_dev_vport_init() function
> >
> >
> >
> > > -----Original Message-----
> > > From: Mingxia Liu <mingxia.liu@intel.com>
> > > Sent: Monday, June 26, 2023 10:06 PM
> > > To: dev@dpdk.org
> > > Cc: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> > > <beilei.xing@intel.com>; Liu, Mingxia <mingxia.liu@intel.com>
> > > Subject: [PATCH] net/idpf: refine idpf_dev_vport_init() function
> > >
> > > This patch adds 'cur_vports' and 'cur_vport_nb' updation in error path.
> > >
> > > Signed-off-by: Mingxia Liu <mingxia.liu@intel.com>
> > > ---
> > > drivers/net/idpf/idpf_ethdev.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/drivers/net/idpf/idpf_ethdev.c
> > > b/drivers/net/idpf/idpf_ethdev.c index 801da57472..3e66898aaf 100644
> > > --- a/drivers/net/idpf/idpf_ethdev.c
> > > +++ b/drivers/net/idpf/idpf_ethdev.c
> > > @@ -1300,6 +1300,8 @@ idpf_dev_vport_init(struct rte_eth_dev *dev,
> > > void
> > > *init_params)
> > > err_mac_addrs:
> > > adapter->vports[param->idx] = NULL; /* reset */
> > > idpf_vport_deinit(vport);
> > > + adapter->cur_vports &= ~RTE_BIT32(param->devarg_id);
> > > + adapter->cur_vport_nb--;
> >
> > Can we move below two lines to the last?
> >
> > adapter->cur_vports |= RTE_BIT32(param->devarg_id); cur_vport_nb++;
> >
> > so we don't need to revert them in error handle
>
> Btw this is a fix, please also add the fixline.
> >
[Liu, Mingxia] Thanks, new patch has been sent.
> > > err:
> > > return ret;
> > > }
> > > --
> > > 2.34.1
next prev parent reply other threads:[~2023-06-30 10:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-26 14:06 Mingxia Liu
2023-06-30 8:13 ` Zhang, Qi Z
2023-06-30 8:14 ` Zhang, Qi Z
2023-06-30 10:46 ` Liu, Mingxia [this message]
2023-06-30 18:54 ` [PATCH v2] net/idpf: fix error path processing Mingxia Liu
2023-07-03 2:19 ` 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=PH0PR11MB5877481C83E080676697D75CEC2AA@PH0PR11MB5877.namprd11.prod.outlook.com \
--to=mingxia.liu@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=qi.z.zhang@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).