Lines Matching refs:mlxsw_sp_port_vlan
1040 struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan, *tmp; in mlxsw_sp_port_vlan_flush() local
1042 list_for_each_entry_safe(mlxsw_sp_port_vlan, tmp, in mlxsw_sp_port_vlan_flush()
1045 mlxsw_sp_port_vlan->vid == MLXSW_SP_DEFAULT_VID) in mlxsw_sp_port_vlan_flush()
1047 mlxsw_sp_port_vlan_destroy(mlxsw_sp_port_vlan); in mlxsw_sp_port_vlan_flush()
1052 mlxsw_sp_port_vlan_cleanup(struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan) in mlxsw_sp_port_vlan_cleanup() argument
1054 if (mlxsw_sp_port_vlan->bridge_port) in mlxsw_sp_port_vlan_cleanup()
1055 mlxsw_sp_port_vlan_bridge_leave(mlxsw_sp_port_vlan); in mlxsw_sp_port_vlan_cleanup()
1056 else if (mlxsw_sp_port_vlan->fid) in mlxsw_sp_port_vlan_cleanup()
1057 mlxsw_sp_port_vlan_router_leave(mlxsw_sp_port_vlan); in mlxsw_sp_port_vlan_cleanup()
1060 struct mlxsw_sp_port_vlan *
1063 struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan; in mlxsw_sp_port_vlan_create() local
1067 mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_vid(mlxsw_sp_port, vid); in mlxsw_sp_port_vlan_create()
1068 if (mlxsw_sp_port_vlan) in mlxsw_sp_port_vlan_create()
1075 mlxsw_sp_port_vlan = kzalloc(sizeof(*mlxsw_sp_port_vlan), GFP_KERNEL); in mlxsw_sp_port_vlan_create()
1076 if (!mlxsw_sp_port_vlan) { in mlxsw_sp_port_vlan_create()
1081 mlxsw_sp_port_vlan->mlxsw_sp_port = mlxsw_sp_port; in mlxsw_sp_port_vlan_create()
1082 mlxsw_sp_port_vlan->vid = vid; in mlxsw_sp_port_vlan_create()
1083 list_add(&mlxsw_sp_port_vlan->list, &mlxsw_sp_port->vlans_list); in mlxsw_sp_port_vlan_create()
1085 return mlxsw_sp_port_vlan; in mlxsw_sp_port_vlan_create()
1092 void mlxsw_sp_port_vlan_destroy(struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan) in mlxsw_sp_port_vlan_destroy() argument
1094 struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port_vlan->mlxsw_sp_port; in mlxsw_sp_port_vlan_destroy()
1095 u16 vid = mlxsw_sp_port_vlan->vid; in mlxsw_sp_port_vlan_destroy()
1097 mlxsw_sp_port_vlan_cleanup(mlxsw_sp_port_vlan); in mlxsw_sp_port_vlan_destroy()
1098 list_del(&mlxsw_sp_port_vlan->list); in mlxsw_sp_port_vlan_destroy()
1099 kfree(mlxsw_sp_port_vlan); in mlxsw_sp_port_vlan_destroy()
1121 struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan; in mlxsw_sp_port_kill_vid() local
1129 mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_vid(mlxsw_sp_port, vid); in mlxsw_sp_port_kill_vid()
1130 if (!mlxsw_sp_port_vlan) in mlxsw_sp_port_kill_vid()
1132 mlxsw_sp_port_vlan_destroy(mlxsw_sp_port_vlan); in mlxsw_sp_port_kill_vid()
1603 struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan; in mlxsw_sp_port_create() local
1803 mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_create(mlxsw_sp_port, in mlxsw_sp_port_create()
1805 if (IS_ERR(mlxsw_sp_port_vlan)) { in mlxsw_sp_port_create()
1808 err = PTR_ERR(mlxsw_sp_port_vlan); in mlxsw_sp_port_create()
1811 mlxsw_sp_port->default_vlan = mlxsw_sp_port_vlan; in mlxsw_sp_port_create()
1852 mlxsw_sp_port_vlan_destroy(mlxsw_sp_port_vlan); in mlxsw_sp_port_create()