datapath: Remove vport_del_all() because it is now a no-op.
authorBen Pfaff <blp@nicira.com>
Fri, 21 Jan 2011 00:34:15 +0000 (16:34 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 21 Jan 2011 00:34:15 +0000 (16:34 -0800)
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@nicira.com>
Suggested-by: Jesse Gross <jesse@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath/vport.c

index 9ac216c..1416ed0 100644 (file)
@@ -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();