From: Ben Pfaff Date: Fri, 21 Jan 2011 00:34:15 +0000 (-0800) Subject: datapath: Remove vport_del_all() because it is now a no-op. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a80a9fbd061fe9023cd669d6fe0a4faea7e31af3;p=openvswitch datapath: Remove vport_del_all() because it is now a no-op. 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 Suggested-by: Jesse Gross Acked-by: Jesse Gross --- diff --git a/datapath/vport.c b/datapath/vport.c index 9ac216c8..1416ed0c 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();