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()
627 struct ice_esw_br_vlan *vlan) in ice_eswitch_br_vlan_cleanup() argument
632 trace_ice_eswitch_br_vlan_cleanup(vlan); in ice_eswitch_br_vlan_cleanup()
635 if (vlan->vid == fdb_entry->data.vid) in ice_eswitch_br_vlan_cleanup()
639 xa_erase(&port->vlans, vlan->vid); in ice_eswitch_br_vlan_cleanup()
640 if (port->pvid == vlan->vid) in ice_eswitch_br_vlan_cleanup()
642 kfree(vlan); in ice_eswitch_br_vlan_cleanup()
647 struct ice_esw_br_vlan *vlan; in ice_eswitch_br_port_vlans_flush() local
650 xa_for_each(&port->vlans, index, vlan) in ice_eswitch_br_port_vlans_flush()
651 ice_eswitch_br_vlan_cleanup(port, vlan); in ice_eswitch_br_port_vlans_flush()
656 struct ice_esw_br_vlan *vlan) in ice_eswitch_br_set_pvid() argument
658 struct ice_vlan port_vlan = ICE_VLAN(ETH_P_8021Q, vlan->vid, 0); in ice_eswitch_br_set_pvid()
663 if (port->pvid == vlan->vid || vlan->vid == 1) in ice_eswitch_br_set_pvid()
689 port->pvid = vlan->vid; in ice_eswitch_br_set_pvid()
698 struct ice_esw_br_vlan *vlan; in ice_eswitch_br_vlan_create() local
701 vlan = kzalloc(sizeof(*vlan), GFP_KERNEL); in ice_eswitch_br_vlan_create()
702 if (!vlan) in ice_eswitch_br_vlan_create()
705 vlan->vid = vid; in ice_eswitch_br_vlan_create()
706 vlan->flags = flags; in ice_eswitch_br_vlan_create()
709 err = ice_eswitch_br_set_pvid(port, vlan); in ice_eswitch_br_vlan_create()
719 err = xa_insert(&port->vlans, vlan->vid, vlan, GFP_KERNEL); in ice_eswitch_br_vlan_create()
723 trace_ice_eswitch_br_vlan_create(vlan); in ice_eswitch_br_vlan_create()
725 return vlan; in ice_eswitch_br_vlan_create()
731 kfree(vlan); in ice_eswitch_br_vlan_create()
740 struct ice_esw_br_vlan *vlan; in ice_eswitch_br_port_vlan_add() local
753 vlan = xa_load(&port->vlans, vid); in ice_eswitch_br_port_vlan_add()
754 if (vlan) { in ice_eswitch_br_port_vlan_add()
755 if (vlan->flags == flags) in ice_eswitch_br_port_vlan_add()
758 ice_eswitch_br_vlan_cleanup(port, vlan); in ice_eswitch_br_port_vlan_add()
761 vlan = ice_eswitch_br_vlan_create(vid, flags, port); in ice_eswitch_br_port_vlan_add()
762 if (IS_ERR(vlan)) { in ice_eswitch_br_port_vlan_add()
765 return PTR_ERR(vlan); in ice_eswitch_br_port_vlan_add()
775 struct ice_esw_br_vlan *vlan; in ice_eswitch_br_port_vlan_del() local
781 vlan = xa_load(&port->vlans, vid); in ice_eswitch_br_port_vlan_del()
782 if (!vlan) in ice_eswitch_br_port_vlan_del()
785 ice_eswitch_br_vlan_cleanup(port, vlan); in ice_eswitch_br_port_vlan_del()
794 struct switchdev_obj_port_vlan *vlan; in ice_eswitch_br_port_obj_add() local
802 vlan = SWITCHDEV_OBJ_PORT_VLAN(obj); in ice_eswitch_br_port_obj_add()
804 br_port->vsi_idx, vlan->vid, in ice_eswitch_br_port_obj_add()
805 vlan->flags, extack); in ice_eswitch_br_port_obj_add()
817 struct switchdev_obj_port_vlan *vlan; in ice_eswitch_br_port_obj_del() local
824 vlan = SWITCHDEV_OBJ_PORT_VLAN(obj); in ice_eswitch_br_port_obj_del()
826 vlan->vid); in ice_eswitch_br_port_obj_del()