Lines Matching refs:bridge_vlan

528 	struct mlxsw_sp_bridge_vlan *bridge_vlan;  in mlxsw_sp_bridge_vlan_find()  local
530 list_for_each_entry(bridge_vlan, &bridge_port->vlans_list, list) { in mlxsw_sp_bridge_vlan_find()
531 if (bridge_vlan->vid == vid) in mlxsw_sp_bridge_vlan_find()
532 return bridge_vlan; in mlxsw_sp_bridge_vlan_find()
541 struct mlxsw_sp_bridge_vlan *bridge_vlan; in mlxsw_sp_bridge_vlan_create() local
543 bridge_vlan = kzalloc(sizeof(*bridge_vlan), GFP_KERNEL); in mlxsw_sp_bridge_vlan_create()
544 if (!bridge_vlan) in mlxsw_sp_bridge_vlan_create()
547 INIT_LIST_HEAD(&bridge_vlan->port_vlan_list); in mlxsw_sp_bridge_vlan_create()
548 bridge_vlan->vid = vid; in mlxsw_sp_bridge_vlan_create()
549 list_add(&bridge_vlan->list, &bridge_port->vlans_list); in mlxsw_sp_bridge_vlan_create()
551 return bridge_vlan; in mlxsw_sp_bridge_vlan_create()
555 mlxsw_sp_bridge_vlan_destroy(struct mlxsw_sp_bridge_vlan *bridge_vlan) in mlxsw_sp_bridge_vlan_destroy() argument
557 list_del(&bridge_vlan->list); in mlxsw_sp_bridge_vlan_destroy()
558 WARN_ON(!list_empty(&bridge_vlan->port_vlan_list)); in mlxsw_sp_bridge_vlan_destroy()
559 kfree(bridge_vlan); in mlxsw_sp_bridge_vlan_destroy()
565 struct mlxsw_sp_bridge_vlan *bridge_vlan; in mlxsw_sp_bridge_vlan_get() local
567 bridge_vlan = mlxsw_sp_bridge_vlan_find(bridge_port, vid); in mlxsw_sp_bridge_vlan_get()
568 if (bridge_vlan) in mlxsw_sp_bridge_vlan_get()
569 return bridge_vlan; in mlxsw_sp_bridge_vlan_get()
574 static void mlxsw_sp_bridge_vlan_put(struct mlxsw_sp_bridge_vlan *bridge_vlan) in mlxsw_sp_bridge_vlan_put() argument
576 if (list_empty(&bridge_vlan->port_vlan_list)) in mlxsw_sp_bridge_vlan_put()
577 mlxsw_sp_bridge_vlan_destroy(bridge_vlan); in mlxsw_sp_bridge_vlan_put()
582 struct mlxsw_sp_bridge_vlan *bridge_vlan, in mlxsw_sp_port_bridge_vlan_stp_set() argument
587 list_for_each_entry(mlxsw_sp_port_vlan, &bridge_vlan->port_vlan_list, in mlxsw_sp_port_bridge_vlan_stp_set()
592 bridge_vlan->vid, state); in mlxsw_sp_port_bridge_vlan_stp_set()
603 struct mlxsw_sp_bridge_vlan *bridge_vlan; in mlxsw_sp_port_attr_stp_state_set() local
614 list_for_each_entry(bridge_vlan, &bridge_port->vlans_list, list) { in mlxsw_sp_port_attr_stp_state_set()
616 bridge_vlan, state); in mlxsw_sp_port_attr_stp_state_set()
626 list_for_each_entry_continue_reverse(bridge_vlan, in mlxsw_sp_port_attr_stp_state_set()
628 mlxsw_sp_port_bridge_vlan_stp_set(mlxsw_sp_port, bridge_vlan, in mlxsw_sp_port_attr_stp_state_set()
635 struct mlxsw_sp_bridge_vlan *bridge_vlan, in mlxsw_sp_port_bridge_vlan_flood_set() argument
641 list_for_each_entry(mlxsw_sp_port_vlan, &bridge_vlan->port_vlan_list, in mlxsw_sp_port_bridge_vlan_flood_set()
660 struct mlxsw_sp_bridge_vlan *bridge_vlan; in mlxsw_sp_bridge_port_flood_table_set() local
663 list_for_each_entry(bridge_vlan, &bridge_port->vlans_list, list) { in mlxsw_sp_bridge_port_flood_table_set()
665 bridge_vlan, in mlxsw_sp_bridge_port_flood_table_set()
675 list_for_each_entry_continue_reverse(bridge_vlan, in mlxsw_sp_bridge_port_flood_table_set()
677 mlxsw_sp_port_bridge_vlan_flood_set(mlxsw_sp_port, bridge_vlan, in mlxsw_sp_bridge_port_flood_table_set()
683 mlxsw_sp_bridge_vlans_flood_set(struct mlxsw_sp_bridge_vlan *bridge_vlan, in mlxsw_sp_bridge_vlans_flood_set() argument
690 list_for_each_entry(mlxsw_sp_port_vlan, &bridge_vlan->port_vlan_list, in mlxsw_sp_bridge_vlans_flood_set()
704 &bridge_vlan->port_vlan_list, in mlxsw_sp_bridge_vlans_flood_set()
720 struct mlxsw_sp_bridge_vlan *bridge_vlan; in mlxsw_sp_bridge_ports_flood_table_set() local
723 list_for_each_entry(bridge_vlan, &bridge_port->vlans_list, list) { in mlxsw_sp_bridge_ports_flood_table_set()
724 err = mlxsw_sp_bridge_vlans_flood_set(bridge_vlan, packet_type, in mlxsw_sp_bridge_ports_flood_table_set()
733 list_for_each_entry_continue_reverse(bridge_vlan, in mlxsw_sp_bridge_ports_flood_table_set()
735 mlxsw_sp_bridge_vlans_flood_set(bridge_vlan, packet_type, in mlxsw_sp_bridge_ports_flood_table_set()
742 struct mlxsw_sp_bridge_vlan *bridge_vlan, in mlxsw_sp_port_bridge_vlan_learning_set() argument
746 u16 vid = bridge_vlan->vid; in mlxsw_sp_port_bridge_vlan_learning_set()
748 list_for_each_entry(mlxsw_sp_port_vlan, &bridge_vlan->port_vlan_list, in mlxsw_sp_port_bridge_vlan_learning_set()
763 struct mlxsw_sp_bridge_vlan *bridge_vlan; in mlxsw_sp_bridge_port_learning_set() local
766 list_for_each_entry(bridge_vlan, &bridge_port->vlans_list, list) { in mlxsw_sp_bridge_port_learning_set()
768 bridge_vlan, set); in mlxsw_sp_bridge_port_learning_set()
776 list_for_each_entry_continue_reverse(bridge_vlan, in mlxsw_sp_bridge_port_learning_set()
779 bridge_vlan, !set); in mlxsw_sp_bridge_port_learning_set()
1320 struct mlxsw_sp_bridge_vlan *bridge_vlan; in mlxsw_sp_port_vlan_bridge_join() local
1343 bridge_vlan = mlxsw_sp_bridge_vlan_get(bridge_port, vid); in mlxsw_sp_port_vlan_bridge_join()
1344 if (!bridge_vlan) { in mlxsw_sp_port_vlan_bridge_join()
1350 &bridge_vlan->port_vlan_list); in mlxsw_sp_port_vlan_bridge_join()
1372 struct mlxsw_sp_bridge_vlan *bridge_vlan; in mlxsw_sp_port_vlan_bridge_leave() local
1382 bridge_vlan = mlxsw_sp_bridge_vlan_find(bridge_port, vid); in mlxsw_sp_port_vlan_bridge_leave()
1383 last_port = list_is_singular(&bridge_vlan->port_vlan_list); in mlxsw_sp_port_vlan_bridge_leave()
1386 mlxsw_sp_bridge_vlan_put(bridge_vlan); in mlxsw_sp_port_vlan_bridge_leave()