From patchwork Wed May 27 13:23:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 187255 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp1124929ilb; Wed, 27 May 2020 06:31:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGtJH2CfxV00NC3fxOgaIxlStI4rfP7wGFgdCmpk1QzFCPEiU1nX0UgWqDAEMHVYuw0Rri X-Received: by 2002:a17:906:5243:: with SMTP id y3mr6402988ejm.193.1590586313657; Wed, 27 May 2020 06:31:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590586313; cv=none; d=google.com; s=arc-20160816; b=DHQj4AwBJNu7n0/tPY6R5YuD98bqjxy/Pl4+jLtNfsylrSj0nOX/nO/gKgrApKh0Pf hBlSZw4T5ZP0c+ojTuVzQb6lPLFevzBBYbkWuHMSFCY79wtsnutfvZcHwMpFo3GuPizk FGMLqBSR6wnPW0iXHSHecTKXd0PPIT7HF+hRlRI57lqHuoPjGG6MGPCYlzQMDNElSGfn JnmNvEh2igA8jjfhMq5xN2hiwaCCJXF+9Zx4xHlILeRK2NZaAxfUcT4EkmCMAiZQs9G3 z1aUioyBFrQmntL1kVE4zh3ktjIuKRnYcOUam4OZijN7ovhP4NNl5BFKtsWVYl2nYwio /eWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=M8OG8GAYbzoHVrkiknFokl2vkVJfoC+7fYarAZiUnx4=; b=YDmZmLFF1XH+iqbt9fEXGuCJUkQlghq9Iv7+9YmSfGJArSpt4J/fMt4av967fiIkDi vDmMWvd6pLmLgcJvG9dCPvTWFb3YZMBwk+wpVYHY8wYj7IBWg+SJk80fz1fGzBM8P3fz XOE8pZUz9bZ0G9oORjkt60ZYmM6+QghSZEkd6lqV9UhxgKZGql++QjNTzh9NHYCUexTe w3+onVgA1iNUAKTqNhhEMQih8wypzAz7N4oERTpjc8Gy9pYKLoPd6VsjMO1AeelusVSK pCdBPN7Tcx/DPP8PZpm9u307QODTC+YpceYPRin2xu7aEVck1fgHVbwC4sBIrlUVi6tN J79Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id qp11si2036092ejb.316.2020.05.27.06.31.53; Wed, 27 May 2020 06:31:53 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 602401DAC6; Wed, 27 May 2020 15:27:14 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 1176C1DA58 for ; Wed, 27 May 2020 15:26:45 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id E908720077B; Wed, 27 May 2020 15:26:44 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 48F5F20051D; Wed, 27 May 2020 15:26:43 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 6578C4028B; Wed, 27 May 2020 21:26:37 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Jun Yang Date: Wed, 27 May 2020 18:53:15 +0530 Message-Id: <20200527132326.1382-27-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200527132326.1382-1-hemant.agrawal@nxp.com> References: <20200527132326.1382-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 26/37] net/dpaa2: free flow rule memory 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" From: Jun Yang Free rule memory when the flow is destroyed. Signed-off-by: Jun Yang --- drivers/net/dpaa2/dpaa2_flow.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.17.1 diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c index 507a5d0e3..941d62b80 100644 --- a/drivers/net/dpaa2/dpaa2_flow.c +++ b/drivers/net/dpaa2/dpaa2_flow.c @@ -3594,6 +3594,7 @@ int dpaa2_flow_destroy(struct rte_eth_dev *dev, "Error in entry addition in QoS table(%d)", ret); goto error; } + priv->qos_index[flow->qos_index] = 0; break; default: DPAA2_PMD_ERR( @@ -3603,6 +3604,10 @@ int dpaa2_flow_destroy(struct rte_eth_dev *dev, } LIST_REMOVE(flow, next); + rte_free((void *)(size_t)flow->qos_rule.key_iova); + rte_free((void *)(size_t)flow->qos_rule.mask_iova); + rte_free((void *)(size_t)flow->fs_rule.key_iova); + rte_free((void *)(size_t)flow->fs_rule.mask_iova); /* Now free the flow */ rte_free(flow);