- struct port_lookup_key lookup;
-
- lookup.saddr = mutable->saddr;
- lookup.daddr = mutable->daddr;
- lookup.key = mutable->in_key;
- lookup.tunnel_type = mutable->tunnel_type;
-
- return port_hash(&lookup);
-}
-
-static void check_table_empty(void)
-{
- struct tbl *old_table = rtnl_dereference(port_table);
-
- if (tbl_count(old_table) == 0) {
- cancel_delayed_work_sync(&cache_cleaner_wq);
- rcu_assign_pointer(port_table, NULL);
- tbl_deferred_destroy(old_table, NULL);
- }
-}
-
-static int add_port(struct vport *vport)
-{
- struct tbl *cur_table = rtnl_dereference(port_table);