net/iavf: fix not release memory issue in large VF
PATCH 1/1 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.
--- drivers/net/iavf/iavf_vchnl.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
drivers/net/iavf/iavf_vchnl.c +10 -8
@@ -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; }
Signature · 1 line
2.17.1
Quoted 11 lines
-----Original Message-----
From: Xu, Ting <[email protected]>
Sent: Monday, December 14, 2020 2:04 PM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Wang, Haiyue <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: [PATCH v1] net/iavf: fix not release memory issue in large VF
Quoted 8 lines
This patch fixed the issue that the memory allocated for structure
virtchnl_del_ena_dis_queuesis not released at the end of the functionsiavf_enable_queues_lv,iavf_disable_queues_lvandiavf_switch_queue_lv.Fixes 9cf9c02bf6ee ("net/iavf: add enable/disable queues for large VF")Signed-off-by Ting Xu <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi