2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-27 15:18:06 +00:00

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 <blp@nicira.com>
Suggested-by: Jesse Gross <jesse@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
Ben Pfaff
2011-01-20 16:34:15 -08:00
parent 8368c090ca
commit a80a9fbd06

View 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();