[ovs-dev] [PATCH] datapath: Remove vport_del_all() because it is now a no-op.

Ben Pfaff blp at nicira.com
Thu Jan 20 23:35:32 UTC 2011


vport_del_all() was created when vports could exist without being attached
to any datapath.  Now, a vport is always attached to a datapath.  This
function was only called on module unload, but the module can't be unloaded
if any datapath exists, so it won't ever have any work to do, and we might
as well delete it entirely.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Suggested-by: Jesse Gross <jesse at nicira.com>
---
 datapath/vport.c |   22 ----------------------
 1 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/datapath/vport.c b/datapath/vport.c
index 9ac216c..1416ed0 100644
--- a/datapath/vport.c
+++ b/datapath/vport.c
@@ -136,26 +136,6 @@ error:
 	return err;
 }
 
-static void vport_del_all(void)
-{
-	int i;
-
-	rtnl_lock();
-	vport_lock();
-
-	for (i = 0; i < VPORT_HASH_BUCKETS; i++) {
-		struct hlist_head *bucket = &dev_table[i];
-		struct vport *vport;
-		struct hlist_node *node, *next;
-
-		hlist_for_each_entry_safe(vport, node, next, bucket, hash_node)
-			vport_del(vport);
-	}
-
-	vport_unlock();
-	rtnl_unlock();
-}
-
 /**
  *	vport_exit - shutdown vport subsystem
  *
@@ -166,8 +146,6 @@ void vport_exit(void)
 {
 	int i;
 
-	vport_del_all();
-
 	for (i = 0; i < n_vport_types; i++) {
 		if (vport_ops_list[i]->exit)
 			vport_ops_list[i]->exit();
-- 
1.7.1





More information about the dev mailing list