From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 998B0A04B5; Mon, 14 Dec 2020 07:05:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0E1543257; Mon, 14 Dec 2020 07:05:01 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id A24E92BBD; Mon, 14 Dec 2020 07:04:57 +0100 (CET) IronPort-SDR: nszPlHz1bAB4z5VL2JHR1OZBVPBJar/xFpDn3r3Jpmy+1MLmyAbSvCwvDAt08t5SW4v1qdS/ij x68h5qtpzORg== X-IronPort-AV: E=McAfee;i="6000,8403,9834"; a="154469915" X-IronPort-AV: E=Sophos;i="5.78,417,1599548400"; d="scan'208";a="154469915" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2020 22:04:54 -0800 IronPort-SDR: PmBojBt49BILjeQ+AAJPLTb2S9rh/o+MpFgxRfuJZb7fNJcyK86QcGkz3hiiiUgTbwi94++AVY gu/KxIOBmE0g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,417,1599548400"; d="scan'208";a="367110018" Received: from dpdk-xuting-main.sh.intel.com ([10.67.117.84]) by orsmga008.jf.intel.com with ESMTP; 13 Dec 2020 22:04:51 -0800 From: Ting Xu 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 Date: Mon, 14 Dec 2020 14:04:10 +0800 Message-Id: <20201214060410.21799-1-ting.xu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v1] net/iavf: fix not release memory issue in large VF X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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