DPDK patches and discussions
 help / color / mirror / Atom feed
From: John Daley <johndale@cisco.com>
To: ferruh.yigit@intel.com
Cc: dev@dpdk.org, John Daley <johndale@cisco.com>,
	stable@dpdk.org, Hyong Youb Kim <hyonkim@cisco.com>
Subject: [dpdk-dev] [PATCH 1/3] net/enic: fix flow API memory leak
Date: Thu, 27 Sep 2018 18:58:25 -0700	[thread overview]
Message-ID: <20180928015827.25786-1-johndale@cisco.com> (raw)

rte_flow structures were not being freed when destroyed or flushed.

Fixes: 6ced137607d0 ("net/enic: flow API for NICs with advanced filters enabled")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_flow.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c
index 0cf04aefd..9b612f1d5 100644
--- a/drivers/net/enic/enic_flow.c
+++ b/drivers/net/enic/enic_flow.c
@@ -1532,6 +1532,7 @@ enic_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
 	enic_flow_del_filter(enic, flow->enic_filter_id, error);
 	LIST_REMOVE(flow, next);
 	rte_spinlock_unlock(&enic->flows_lock);
+	rte_free(flow);
 	return 0;
 }
 
@@ -1555,6 +1556,7 @@ enic_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
 		flow = LIST_FIRST(&enic->flows);
 		enic_flow_del_filter(enic, flow->enic_filter_id, error);
 		LIST_REMOVE(flow, next);
+		rte_free(flow);
 	}
 	rte_spinlock_unlock(&enic->flows_lock);
 	return 0;
-- 
2.16.2

             reply	other threads:[~2018-09-28  1:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-28  1:58 John Daley [this message]
2018-09-28  1:58 ` [dpdk-dev] [PATCH 2/3] net/enic: support for flow counter action John Daley
2018-09-28  1:58 ` [dpdk-dev] [PATCH 3/3] doc: update enic guide for flow API " John Daley
2018-09-28  3:08 ` [dpdk-dev] [PATCH v2 1/3] net/enic: fix flow API memory leak John Daley
2018-09-28  3:08   ` [dpdk-dev] [PATCH v2 2/3] net/enic: support for flow counter action John Daley
2018-09-28  3:08   ` [dpdk-dev] [PATCH v2 3/3] doc: update enic guide for flow API " John Daley
2018-10-02 14:49   ` [dpdk-dev] [PATCH v2 1/3] net/enic: fix flow API memory leak Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180928015827.25786-1-johndale@cisco.com \
    --to=johndale@cisco.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=hyonkim@cisco.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).