From: Jun Yang Date: Tue, 7 Jul 2020 09:22:33 +0000 (+0530) Subject: net/dpaa2: free flow rule memory X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=627fb636dba8b571b0b8093792f8d4d70f3e2cb2;p=dpdk.git net/dpaa2: free flow rule memory Free rule memory when the flow is destroyed. Signed-off-by: Jun Yang Acked-by: Hemant Agrawal --- diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c index 9a449ca310..887fe75991 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);