From: Ting Xu <ting.xu@intel.com>
To: dev@dpdk.org
Cc: jingjing.wu@intel.com, beilei.xing@intel.com,
haiyue.wang@intel.com, qi.z.zhang@intel.com, stable@dpdk.org
Subject: [dpdk-stable] [PATCH v1] net/iavf: fix not release memory issue in large VF
Date: Mon, 14 Dec 2020 14:04:10 +0800 [thread overview]
Message-ID: <20201214060410.21799-1-ting.xu@intel.com> (raw)
This patch fixed the issue that the memory allocated for structure
virtchnl_del_ena_dis_queues is not released at the end of the functions
iavf_enable_queues_lv, iavf_disable_queues_lv and iavf_switch_queue_lv.
Fixes: 9cf9c02bf6ee ("net/iavf: add enable/disable queues for large VF")
Cc: stable@dpdk.org
Signed-off-by: Ting Xu <ting.xu@intel.com>
---
drivers/net/iavf/iavf_vchnl.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 33d03af653..c17ae06227 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -644,12 +644,12 @@ iavf_enable_queues_lv(struct iavf_adapter *adapter)
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
err = iavf_execute_vf_cmd(adapter, &args);
- if (err) {
+ if (err)
PMD_DRV_LOG(ERR,
"Failed to execute command of OP_ENABLE_QUEUES_V2");
- return err;
- }
- return 0;
+
+ rte_free(queue_select);
+ return err;
}
int
@@ -688,12 +688,12 @@ iavf_disable_queues_lv(struct iavf_adapter *adapter)
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
err = iavf_execute_vf_cmd(adapter, &args);
- if (err) {
+ if (err)
PMD_DRV_LOG(ERR,
"Failed to execute command of OP_DISABLE_QUEUES_V2");
- return err;
- }
- return 0;
+
+ rte_free(queue_select);
+ return err;
}
int
@@ -737,6 +737,8 @@ iavf_switch_queue_lv(struct iavf_adapter *adapter, uint16_t qid,
if (err)
PMD_DRV_LOG(ERR, "Failed to execute command of %s",
on ? "OP_ENABLE_QUEUES_V2" : "OP_DISABLE_QUEUES_V2");
+
+ rte_free(queue_select);
return err;
}
--
2.17.1
next reply other threads:[~2020-12-14 6:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-14 6:04 Ting Xu [this message]
2020-12-15 12:05 ` 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=20201214060410.21799-1-ting.xu@intel.com \
--to=ting.xu@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=haiyue.wang@intel.com \
--cc=jingjing.wu@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
/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).