Re: [ovs-dev] [PATCH v3 01/18] dpif-netdev: Fix memory leak.

2017-01-13 Thread Ben Pfaff
On Sun, Jan 08, 2017 at 07:14:59PM -0800, Daniele Di Proietto wrote:
> We keep all the per-port classifiers around, since they can be reused,
> but when a pmd thread is destroyed we should free them.
> 
> Found using valgrind.
> 
> Fixes: 3453b4d62a98("dpif-netdev: dpcls per in_port with sorted
> subtables")
> 
> Signed-off-by: Daniele Di Proietto 

Acked-by: Ben Pfaff 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v3 01/18] dpif-netdev: Fix memory leak.

2017-01-08 Thread Daniele Di Proietto
We keep all the per-port classifiers around, since they can be reused,
but when a pmd thread is destroyed we should free them.

Found using valgrind.

Fixes: 3453b4d62a98("dpif-netdev: dpcls per in_port with sorted
subtables")

Signed-off-by: Daniele Di Proietto 
---
 lib/dpif-netdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index d1f9661a2..9003f703d 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -,6 +,7 @@ dp_netdev_destroy_pmd(struct dp_netdev_pmd_thread *pmd)
 /* All flows (including their dpcls_rules) have been deleted already */
 CMAP_FOR_EACH (cls, node, >classifiers) {
 dpcls_destroy(cls);
+ovsrcu_postpone(free, cls);
 }
 cmap_destroy(>classifiers);
 cmap_destroy(>flow_table);
-- 
2.11.0

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev