Lines Matching refs:vlan

115 		list[1].h_u.vlan_hdr.vlan = cpu_to_be16(vid & VLAN_VID_MASK);  in ice_eswitch_br_add_vlan_lkup()
116 list[1].m_u.vlan_hdr.vlan = cpu_to_be16(0xFFFF); in ice_eswitch_br_add_vlan_lkup()
310 struct ice_esw_br_vlan *vlan; in ice_esw_br_port_vlan_lookup() local
318 vlan = xa_load(&port->vlans, vid); in ice_esw_br_port_vlan_lookup()
319 if (!vlan) { in ice_esw_br_port_vlan_lookup()
325 return vlan; in ice_esw_br_port_vlan_lookup()
398 struct ice_esw_br_vlan *vlan; in ice_eswitch_br_fdb_entry_create() local
408 vlan = ice_esw_br_port_vlan_lookup(bridge, br_port->vsi_idx, in ice_eswitch_br_fdb_entry_create()
410 if (IS_ERR(vlan)) { in ice_eswitch_br_fdb_entry_create()
412 PTR_ERR(vlan)); in ice_eswitch_br_fdb_entry_create()
624 struct ice_esw_br_vlan *vlan) in ice_eswitch_br_vlan_cleanup() argument
629 trace_ice_eswitch_br_vlan_cleanup(vlan); in ice_eswitch_br_vlan_cleanup()
632 if (vlan->vid == fdb_entry->data.vid) in ice_eswitch_br_vlan_cleanup()
636 xa_erase(&port->vlans, vlan->vid); in ice_eswitch_br_vlan_cleanup()
637 if (port->pvid == vlan->vid) in ice_eswitch_br_vlan_cleanup()
639 kfree(vlan); in ice_eswitch_br_vlan_cleanup()
644 struct ice_esw_br_vlan *vlan; in ice_eswitch_br_port_vlans_flush() local
647 xa_for_each(&port->vlans, index, vlan) in ice_eswitch_br_port_vlans_flush()
648 ice_eswitch_br_vlan_cleanup(port, vlan); in ice_eswitch_br_port_vlans_flush()
653 struct ice_esw_br_vlan *vlan) in ice_eswitch_br_set_pvid() argument
655 struct ice_vlan port_vlan = ICE_VLAN(ETH_P_8021Q, vlan->vid, 0); in ice_eswitch_br_set_pvid()
660 if (port->pvid == vlan->vid || vlan->vid == 1) in ice_eswitch_br_set_pvid()
686 port->pvid = vlan->vid; in ice_eswitch_br_set_pvid()
695 struct ice_esw_br_vlan *vlan; in ice_eswitch_br_vlan_create() local
698 vlan = kzalloc(sizeof(*vlan), GFP_KERNEL); in ice_eswitch_br_vlan_create()
699 if (!vlan) in ice_eswitch_br_vlan_create()
702 vlan->vid = vid; in ice_eswitch_br_vlan_create()
703 vlan->flags = flags; in ice_eswitch_br_vlan_create()
706 err = ice_eswitch_br_set_pvid(port, vlan); in ice_eswitch_br_vlan_create()
716 err = xa_insert(&port->vlans, vlan->vid, vlan, GFP_KERNEL); in ice_eswitch_br_vlan_create()
720 trace_ice_eswitch_br_vlan_create(vlan); in ice_eswitch_br_vlan_create()
722 return vlan; in ice_eswitch_br_vlan_create()
728 kfree(vlan); in ice_eswitch_br_vlan_create()
737 struct ice_esw_br_vlan *vlan; in ice_eswitch_br_port_vlan_add() local
750 vlan = xa_load(&port->vlans, vid); in ice_eswitch_br_port_vlan_add()
751 if (vlan) { in ice_eswitch_br_port_vlan_add()
752 if (vlan->flags == flags) in ice_eswitch_br_port_vlan_add()
755 ice_eswitch_br_vlan_cleanup(port, vlan); in ice_eswitch_br_port_vlan_add()
758 vlan = ice_eswitch_br_vlan_create(vid, flags, port); in ice_eswitch_br_port_vlan_add()
759 if (IS_ERR(vlan)) { in ice_eswitch_br_port_vlan_add()
762 return PTR_ERR(vlan); in ice_eswitch_br_port_vlan_add()
772 struct ice_esw_br_vlan *vlan; in ice_eswitch_br_port_vlan_del() local
778 vlan = xa_load(&port->vlans, vid); in ice_eswitch_br_port_vlan_del()
779 if (!vlan) in ice_eswitch_br_port_vlan_del()
782 ice_eswitch_br_vlan_cleanup(port, vlan); in ice_eswitch_br_port_vlan_del()
791 struct switchdev_obj_port_vlan *vlan; in ice_eswitch_br_port_obj_add() local
799 vlan = SWITCHDEV_OBJ_PORT_VLAN(obj); in ice_eswitch_br_port_obj_add()
801 br_port->vsi_idx, vlan->vid, in ice_eswitch_br_port_obj_add()
802 vlan->flags, extack); in ice_eswitch_br_port_obj_add()
814 struct switchdev_obj_port_vlan *vlan; in ice_eswitch_br_port_obj_del() local
821 vlan = SWITCHDEV_OBJ_PORT_VLAN(obj); in ice_eswitch_br_port_obj_del()
823 vlan->vid); in ice_eswitch_br_port_obj_del()