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>
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
*
{
int i;
- vport_del_all();
-
for (i = 0; i < n_vport_types; i++) {
if (vport_ops_list[i]->exit)
vport_ops_list[i]->exit();