From: Mingxia Liu <mingxia.liu@intel.com>
To: dev@dpdk.org
Cc: jingjing.wu@intel.com, beilei.xing@intel.com,
Mingxia Liu <mingxia.liu@intel.com>
Subject: [PATCH] net/idpf: refine idpf_dev_vport_init() function
Date: Mon, 26 Jun 2023 14:06:06 +0000 [thread overview]
Message-ID: <20230626140606.490871-1-mingxia.liu@intel.com> (raw)
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--;
err:
return ret;
}
--
2.34.1
next reply other threads:[~2023-06-26 5:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-26 14:06 Mingxia Liu [this message]
2023-06-30 8:13 ` Zhang, Qi Z
2023-06-30 8:14 ` Zhang, Qi Z
2023-06-30 10:46 ` Liu, Mingxia
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=20230626140606.490871-1-mingxia.liu@intel.com \
--to=mingxia.liu@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@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).