patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v1] net/iavf: fix not release memory issue in large VF
@ 2020-12-14  6:04 Ting Xu
  2020-12-15 12:05 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Ting Xu @ 2020-12-14  6:04 UTC (permalink / raw)
  To: dev; +Cc: jingjing.wu, beilei.xing, haiyue.wang, qi.z.zhang, stable

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH v1] net/iavf: fix not release memory issue in large VF
  2020-12-14  6:04 [dpdk-stable] [PATCH v1] net/iavf: fix not release memory issue in large VF Ting Xu
@ 2020-12-15 12:05 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2020-12-15 12:05 UTC (permalink / raw)
  To: Xu, Ting, dev; +Cc: Wu, Jingjing, Xing, Beilei, Wang, Haiyue, stable



> -----Original Message-----
> From: Xu, Ting <ting.xu@intel.com>
> Sent: Monday, December 14, 2020 2:04 PM
> To: dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
> Wang, Haiyue <haiyue.wang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> stable@dpdk.org
> Subject: [PATCH v1] net/iavf: fix not release memory issue in large VF
> 
> 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>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-15 12:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14  6:04 [dpdk-stable] [PATCH v1] net/iavf: fix not release memory issue in large VF Ting Xu
2020-12-15 12:05 ` Zhang, Qi Z

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://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/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


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