Lines Matching refs:bridge_vlan

491 	struct mlxsw_sp_bridge_vlan *bridge_vlan;  in mlxsw_sp_bridge_vlan_find()  local
493 list_for_each_entry(bridge_vlan, &bridge_port->vlans_list, list) { in mlxsw_sp_bridge_vlan_find()
494 if (bridge_vlan->vid == vid) in mlxsw_sp_bridge_vlan_find()
495 return bridge_vlan; in mlxsw_sp_bridge_vlan_find()
504 struct mlxsw_sp_bridge_vlan *bridge_vlan; in mlxsw_sp_bridge_vlan_create() local
506 bridge_vlan = kzalloc(sizeof(*bridge_vlan), GFP_KERNEL); in mlxsw_sp_bridge_vlan_create()
507 if (!bridge_vlan) in mlxsw_sp_bridge_vlan_create()
510 INIT_LIST_HEAD(&bridge_vlan->port_vlan_list); in mlxsw_sp_bridge_vlan_create()
511 bridge_vlan->vid = vid; in mlxsw_sp_bridge_vlan_create()
512 list_add(&bridge_vlan->list, &bridge_port->vlans_list); in mlxsw_sp_bridge_vlan_create()
514 return bridge_vlan; in mlxsw_sp_bridge_vlan_create()
518 mlxsw_sp_bridge_vlan_destroy(struct mlxsw_sp_bridge_vlan *bridge_vlan) in mlxsw_sp_bridge_vlan_destroy() argument
520 list_del(&bridge_vlan->list); in mlxsw_sp_bridge_vlan_destroy()
521 WARN_ON(!list_empty(&bridge_vlan->port_vlan_list)); in mlxsw_sp_bridge_vlan_destroy()
522 kfree(bridge_vlan); in mlxsw_sp_bridge_vlan_destroy()
528 struct mlxsw_sp_bridge_vlan *bridge_vlan; in mlxsw_sp_bridge_vlan_get() local
530 bridge_vlan = mlxsw_sp_bridge_vlan_find(bridge_port, vid); in mlxsw_sp_bridge_vlan_get()
531 if (bridge_vlan) in mlxsw_sp_bridge_vlan_get()
532 return bridge_vlan; in mlxsw_sp_bridge_vlan_get()
537 static void mlxsw_sp_bridge_vlan_put(struct mlxsw_sp_bridge_vlan *bridge_vlan) in mlxsw_sp_bridge_vlan_put() argument
539 if (list_empty(&bridge_vlan->port_vlan_list)) in mlxsw_sp_bridge_vlan_put()
540 mlxsw_sp_bridge_vlan_destroy(bridge_vlan); in mlxsw_sp_bridge_vlan_put()
545 struct mlxsw_sp_bridge_vlan *bridge_vlan, in mlxsw_sp_port_bridge_vlan_stp_set() argument
550 list_for_each_entry(mlxsw_sp_port_vlan, &bridge_vlan->port_vlan_list, in mlxsw_sp_port_bridge_vlan_stp_set()
555 bridge_vlan->vid, state); in mlxsw_sp_port_bridge_vlan_stp_set()
566 struct mlxsw_sp_bridge_vlan *bridge_vlan; in mlxsw_sp_port_attr_stp_state_set() local
577 list_for_each_entry(bridge_vlan, &bridge_port->vlans_list, list) { in mlxsw_sp_port_attr_stp_state_set()
579 bridge_vlan, state); in mlxsw_sp_port_attr_stp_state_set()
589 list_for_each_entry_continue_reverse(bridge_vlan, in mlxsw_sp_port_attr_stp_state_set()
591 mlxsw_sp_port_bridge_vlan_stp_set(mlxsw_sp_port, bridge_vlan, in mlxsw_sp_port_attr_stp_state_set()
598 struct mlxsw_sp_bridge_vlan *bridge_vlan, in mlxsw_sp_port_bridge_vlan_flood_set() argument
604 list_for_each_entry(mlxsw_sp_port_vlan, &bridge_vlan->port_vlan_list, in mlxsw_sp_port_bridge_vlan_flood_set()
623 struct mlxsw_sp_bridge_vlan *bridge_vlan; in mlxsw_sp_bridge_port_flood_table_set() local
626 list_for_each_entry(bridge_vlan, &bridge_port->vlans_list, list) { in mlxsw_sp_bridge_port_flood_table_set()
628 bridge_vlan, in mlxsw_sp_bridge_port_flood_table_set()
638 list_for_each_entry_continue_reverse(bridge_vlan, in mlxsw_sp_bridge_port_flood_table_set()
640 mlxsw_sp_port_bridge_vlan_flood_set(mlxsw_sp_port, bridge_vlan, in mlxsw_sp_bridge_port_flood_table_set()
647 struct mlxsw_sp_bridge_vlan *bridge_vlan, in mlxsw_sp_port_bridge_vlan_learning_set() argument
651 u16 vid = bridge_vlan->vid; in mlxsw_sp_port_bridge_vlan_learning_set()
653 list_for_each_entry(mlxsw_sp_port_vlan, &bridge_vlan->port_vlan_list, in mlxsw_sp_port_bridge_vlan_learning_set()
668 struct mlxsw_sp_bridge_vlan *bridge_vlan; in mlxsw_sp_bridge_port_learning_set() local
671 list_for_each_entry(bridge_vlan, &bridge_port->vlans_list, list) { in mlxsw_sp_bridge_port_learning_set()
673 bridge_vlan, set); in mlxsw_sp_bridge_port_learning_set()
681 list_for_each_entry_continue_reverse(bridge_vlan, in mlxsw_sp_bridge_port_learning_set()
684 bridge_vlan, !set); in mlxsw_sp_bridge_port_learning_set()
1075 struct mlxsw_sp_bridge_vlan *bridge_vlan; in mlxsw_sp_port_vlan_bridge_join() local
1098 bridge_vlan = mlxsw_sp_bridge_vlan_get(bridge_port, vid); in mlxsw_sp_port_vlan_bridge_join()
1099 if (!bridge_vlan) { in mlxsw_sp_port_vlan_bridge_join()
1105 &bridge_vlan->port_vlan_list); in mlxsw_sp_port_vlan_bridge_join()
1127 struct mlxsw_sp_bridge_vlan *bridge_vlan; in mlxsw_sp_port_vlan_bridge_leave() local
1138 bridge_vlan = mlxsw_sp_bridge_vlan_find(bridge_port, vid); in mlxsw_sp_port_vlan_bridge_leave()
1139 last_port = list_is_singular(&bridge_vlan->port_vlan_list); in mlxsw_sp_port_vlan_bridge_leave()
1142 mlxsw_sp_bridge_vlan_put(bridge_vlan); in mlxsw_sp_port_vlan_bridge_leave()