On 11/05/2012 18:52, Ben Pfaff wrote:
Will you give me a Signed-off-by: line for this, for example:
         Signed-off-by: Giuseppe Lettieri<[email protected]>

By doing this, you are agreeing to the Developer's Certificate of Origin
(see below for more details).

Ok, but I don't know how this works. Is it sufficient to say "Yes"?
Just in case, I have amended my commit with --signoff and attached the resulting patch.

Best regards,
Giuseppe

--
Dr. Ing. Giuseppe Lettieri
Dipartimento di Ingegneria della Informazione
Universita' di Pisa
Largo Lucio Lazzarino 2, 56122 Pisa - Italy
Ph. : (+39) 050-2217.649 (direct) .599 (switch)
Fax : (+39) 050-2217.600
e-mail: [email protected]

>From 48148689237c92df4b5911527c71478623374390 Mon Sep 17 00:00:00 2001
From: Giuseppe Lettieri <[email protected]>
Date: Wed, 9 May 2012 12:17:15 +0200
Subject: [PATCH] proper destruction of netdev datapaths

Bridges with datapath_type=netdev do not destroy the datapath when
deleted. In particular, the tap device implementing the internal
interface is not close()d, and therefore the tap persists until
ovs-vswitchd exit()s.

This behaviour appears to be caused by the missing callback
for 'enumerate' in the dpif-netdev class. Without this callback
'bridge_reconfigure' fails to realize that there are datapaths with no
bridge, and thus cannot destroy them. Providing an 'enumerate' callback
fixes this.

Signed-off-by: Giuseppe Lettieri <[email protected]>
---
 lib/dpif-netdev.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index a33fe23..6a05a7f 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -165,6 +165,17 @@ get_dp_netdev(const struct dpif *dpif)
     return dpif_netdev_cast(dpif)->dp;
 }
 
+static int
+dpif_netdev_enumerate(struct sset *all_dps)
+{
+    struct shash_node *node;
+
+    SHASH_FOR_EACH(node, &dp_netdevs) {
+        sset_add(all_dps, node->name);        
+    }
+    return 0;    
+}
+
 static struct dpif *
 create_dpif_netdev(struct dp_netdev *dp)
 {
@@ -1241,7 +1252,7 @@ dp_netdev_execute_actions(struct dp_netdev *dp,
 
 const struct dpif_class dpif_netdev_class = {
     "netdev",
-    NULL,                       /* enumerate */
+    dpif_netdev_enumerate,
     dpif_netdev_open,
     dpif_netdev_close,
     dpif_netdev_destroy,
-- 
1.7.3.4

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to