- const struct tnl_vport *tnl_vport = tnl_vport_table_cast(node);
- struct port_lookup_key *lookup = target;
-
- lookup->mutable = rcu_dereference_rtnl(tnl_vport->mutable);
-
- return (lookup->mutable->tunnel_type == lookup->tunnel_type &&
- lookup->mutable->daddr == lookup->daddr &&
- lookup->mutable->in_key == lookup->key &&
- lookup->mutable->saddr == lookup->saddr);
-}
-
-static u32 port_hash(struct port_lookup_key *k)
-{
- u32 x = jhash_3words((__force u32)k->saddr, (__force u32)k->daddr,
- k->tunnel_type, 0);
- return jhash_2words((__force u64)k->key >> 32, (__force u32)k->key, x);
-}
-
-static u32 mutable_hash(const struct tnl_mutable_config *mutable)
-{
- 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);