Lines Matching refs:vlan
44 static void vlan_tunnel_info_release(struct net_bridge_vlan *vlan) in vlan_tunnel_info_release() argument
46 struct metadata_dst *tdst = rtnl_dereference(vlan->tinfo.tunnel_dst); in vlan_tunnel_info_release()
48 WRITE_ONCE(vlan->tinfo.tunnel_id, 0); in vlan_tunnel_info_release()
49 RCU_INIT_POINTER(vlan->tinfo.tunnel_dst, NULL); in vlan_tunnel_info_release()
54 struct net_bridge_vlan *vlan) in vlan_tunnel_info_del() argument
56 if (!rcu_access_pointer(vlan->tinfo.tunnel_dst)) in vlan_tunnel_info_del()
58 rhashtable_remove_fast(&vg->tunnel_hash, &vlan->tnode, in vlan_tunnel_info_del()
60 vlan_tunnel_info_release(vlan); in vlan_tunnel_info_del()
64 struct net_bridge_vlan *vlan, u32 tun_id) in __vlan_tunnel_info_add() argument
66 struct metadata_dst *metadata = rtnl_dereference(vlan->tinfo.tunnel_dst); in __vlan_tunnel_info_add()
79 rcu_assign_pointer(vlan->tinfo.tunnel_dst, metadata); in __vlan_tunnel_info_add()
80 WRITE_ONCE(vlan->tinfo.tunnel_id, key); in __vlan_tunnel_info_add()
82 err = rhashtable_lookup_insert_fast(&vg->tunnel_hash, &vlan->tnode, in __vlan_tunnel_info_add()
89 vlan_tunnel_info_release(vlan); in __vlan_tunnel_info_add()
101 struct net_bridge_vlan *vlan; in nbp_vlan_tunnel_info_add() local
106 vlan = br_vlan_find(vg, vid); in nbp_vlan_tunnel_info_add()
107 if (!vlan) in nbp_vlan_tunnel_info_add()
110 return __vlan_tunnel_info_add(vg, vlan, tun_id); in nbp_vlan_tunnel_info_add()
135 struct net_bridge_vlan *vlan, *tmp; in __vlan_tunnel_info_flush() local
137 list_for_each_entry_safe(vlan, tmp, &vg->vlan_list, vlist) in __vlan_tunnel_info_flush()
138 vlan_tunnel_info_del(vg, vlan); in __vlan_tunnel_info_flush()
166 struct net_bridge_vlan *vlan; in br_handle_ingress_vlan_tunnel() local
176 vlan = br_vlan_tunnel_lookup(&vg->tunnel_hash, tinfo->key.tun_id); in br_handle_ingress_vlan_tunnel()
177 if (!vlan) in br_handle_ingress_vlan_tunnel()
182 __vlan_hwaccel_put_tag(skb, p->br->vlan_proto, vlan->vid); in br_handle_ingress_vlan_tunnel()
186 struct net_bridge_vlan *vlan) in br_handle_egress_vlan_tunnel() argument
192 if (!vlan) in br_handle_egress_vlan_tunnel()
195 tunnel_id = READ_ONCE(vlan->tinfo.tunnel_id); in br_handle_egress_vlan_tunnel()
219 tunnel_dst = rcu_dereference(vlan->tinfo.tunnel_dst); in br_handle_egress_vlan_tunnel()