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()
80 rcu_assign_pointer(vlan->tinfo.tunnel_dst, metadata); in __vlan_tunnel_info_add()
81 WRITE_ONCE(vlan->tinfo.tunnel_id, key); in __vlan_tunnel_info_add()
83 err = rhashtable_lookup_insert_fast(&vg->tunnel_hash, &vlan->tnode, in __vlan_tunnel_info_add()
90 vlan_tunnel_info_release(vlan); in __vlan_tunnel_info_add()
102 struct net_bridge_vlan *vlan; in nbp_vlan_tunnel_info_add() local
107 vlan = br_vlan_find(vg, vid); in nbp_vlan_tunnel_info_add()
108 if (!vlan) in nbp_vlan_tunnel_info_add()
111 return __vlan_tunnel_info_add(vg, vlan, tun_id); in nbp_vlan_tunnel_info_add()
136 struct net_bridge_vlan *vlan, *tmp; in __vlan_tunnel_info_flush() local
138 list_for_each_entry_safe(vlan, tmp, &vg->vlan_list, vlist) in __vlan_tunnel_info_flush()
139 vlan_tunnel_info_del(vg, vlan); in __vlan_tunnel_info_flush()
167 struct net_bridge_vlan *vlan; in br_handle_ingress_vlan_tunnel() local
177 vlan = br_vlan_tunnel_lookup(&vg->tunnel_hash, tinfo->key.tun_id); in br_handle_ingress_vlan_tunnel()
178 if (!vlan) in br_handle_ingress_vlan_tunnel()
183 __vlan_hwaccel_put_tag(skb, p->br->vlan_proto, vlan->vid); in br_handle_ingress_vlan_tunnel()
187 struct net_bridge_vlan *vlan) in br_handle_egress_vlan_tunnel() argument
194 if (!vlan) in br_handle_egress_vlan_tunnel()
197 tunnel_id = READ_ONCE(vlan->tinfo.tunnel_id); in br_handle_egress_vlan_tunnel()
222 tunnel_dst = rcu_dereference(vlan->tinfo.tunnel_dst); in br_handle_egress_vlan_tunnel()