Lines Matching refs:vlan
398 struct net_bridge_vlan *vlan, *tmp; in __vlan_flush() local
402 list_for_each_entry_safe(vlan, tmp, &vg->vlan_list, vlist) { in __vlan_flush()
405 v_start = vlan->vid; in __vlan_flush()
406 } else if (vlan->vid - v_end != 1) { in __vlan_flush()
409 v_start = vlan->vid; in __vlan_flush()
411 v_end = vlan->vid; in __vlan_flush()
413 __vlan_del(vlan); in __vlan_flush()
648 struct net_bridge_vlan *vlan, in br_vlan_add_existing() argument
654 err = br_switchdev_port_vlan_add(br->dev, vlan->vid, flags, extack); in br_vlan_add_existing()
658 if (!br_vlan_is_brentry(vlan)) { in br_vlan_add_existing()
666 vlan->vid); in br_vlan_add_existing()
672 refcount_inc(&vlan->refcnt); in br_vlan_add_existing()
673 vlan->flags |= BRIDGE_VLAN_INFO_BRENTRY; in br_vlan_add_existing()
678 if (__vlan_add_flags(vlan, flags)) in br_vlan_add_existing()
685 br_switchdev_port_vlan_del(br->dev, vlan->vid); in br_vlan_add_existing()
697 struct net_bridge_vlan *vlan; in br_vlan_add() local
704 vlan = br_vlan_find(vg, vid); in br_vlan_add()
705 if (vlan) in br_vlan_add()
706 return br_vlan_add_existing(br, vg, vlan, flags, changed, in br_vlan_add()
709 vlan = kzalloc(sizeof(*vlan), GFP_KERNEL); in br_vlan_add()
710 if (!vlan) in br_vlan_add()
713 vlan->stats = netdev_alloc_pcpu_stats(struct br_vlan_stats); in br_vlan_add()
714 if (!vlan->stats) { in br_vlan_add()
715 kfree(vlan); in br_vlan_add()
718 vlan->vid = vid; in br_vlan_add()
719 vlan->flags = flags | BRIDGE_VLAN_INFO_MASTER; in br_vlan_add()
720 vlan->flags &= ~BRIDGE_VLAN_INFO_PVID; in br_vlan_add()
721 vlan->br = br; in br_vlan_add()
723 refcount_set(&vlan->refcnt, 1); in br_vlan_add()
724 ret = __vlan_add(vlan, flags, extack); in br_vlan_add()
726 free_percpu(vlan->stats); in br_vlan_add()
727 kfree(vlan); in br_vlan_add()
860 struct net_bridge_vlan *vlan; in __br_vlan_set_proto() local
870 list_for_each_entry(vlan, &vg->vlan_list, vlist) { in __br_vlan_set_proto()
871 err = vlan_vid_add(p->dev, proto, vlan->vid); in __br_vlan_set_proto()
886 list_for_each_entry(vlan, &vg->vlan_list, vlist) in __br_vlan_set_proto()
887 vlan_vid_del(p->dev, oldproto, vlan->vid); in __br_vlan_set_proto()
893 list_for_each_entry_continue_reverse(vlan, &vg->vlan_list, vlist) in __br_vlan_set_proto()
894 vlan_vid_del(p->dev, proto, vlan->vid); in __br_vlan_set_proto()
898 list_for_each_entry(vlan, &vg->vlan_list, vlist) in __br_vlan_set_proto()
899 vlan_vid_del(p->dev, proto, vlan->vid); in __br_vlan_set_proto()
1203 struct net_bridge_vlan *vlan; in nbp_vlan_add() local
1209 vlan = br_vlan_find(nbp_vlan_group(port), vid); in nbp_vlan_add()
1210 if (vlan) { in nbp_vlan_add()
1215 *changed = __vlan_add_flags(vlan, flags); in nbp_vlan_add()
1220 vlan = kzalloc(sizeof(*vlan), GFP_KERNEL); in nbp_vlan_add()
1221 if (!vlan) in nbp_vlan_add()
1224 vlan->vid = vid; in nbp_vlan_add()
1225 vlan->port = port; in nbp_vlan_add()
1226 ret = __vlan_add(vlan, flags, extack); in nbp_vlan_add()
1228 kfree(vlan); in nbp_vlan_add()
1455 struct net_bridge_vlan *vlan; in br_vlan_set_all_vlan_dev_state() local
1458 list_for_each_entry(vlan, &vg->vlan_list, vlist) { in br_vlan_set_all_vlan_dev_state()
1460 vlan->vid); in br_vlan_set_all_vlan_dev_state()