Lines Matching refs:rve

121 	struct mlxsw_sp_mr_route_vif_entry *rve;  in mlxsw_sp_mr_route_valid_evifs_num()  local
125 list_for_each_entry(rve, &mr_route->evif_list, route_node) in mlxsw_sp_mr_route_valid_evifs_num()
126 if (mlxsw_sp_mr_vif_valid(rve->mr_vif)) in mlxsw_sp_mr_route_valid_evifs_num()
134 struct mlxsw_sp_mr_route_vif_entry *rve; in mlxsw_sp_mr_route_action() local
155 list_for_each_entry(rve, &mr_route->evif_list, route_node) in mlxsw_sp_mr_route_action()
156 if (mlxsw_sp_mr_vif_exists(rve->mr_vif) && !rve->mr_vif->rif) in mlxsw_sp_mr_route_action()
173 struct mlxsw_sp_mr_route_vif_entry *rve; in mlxsw_sp_mr_route_evif_link() local
175 rve = kzalloc(sizeof(*rve), GFP_KERNEL); in mlxsw_sp_mr_route_evif_link()
176 if (!rve) in mlxsw_sp_mr_route_evif_link()
178 rve->mr_route = mr_route; in mlxsw_sp_mr_route_evif_link()
179 rve->mr_vif = mr_vif; in mlxsw_sp_mr_route_evif_link()
180 list_add_tail(&rve->route_node, &mr_route->evif_list); in mlxsw_sp_mr_route_evif_link()
181 list_add_tail(&rve->vif_node, &mr_vif->route_evif_list); in mlxsw_sp_mr_route_evif_link()
186 mlxsw_sp_mr_route_evif_unlink(struct mlxsw_sp_mr_route_vif_entry *rve) in mlxsw_sp_mr_route_evif_unlink() argument
188 list_del(&rve->route_node); in mlxsw_sp_mr_route_evif_unlink()
189 list_del(&rve->vif_node); in mlxsw_sp_mr_route_evif_unlink()
190 kfree(rve); in mlxsw_sp_mr_route_evif_unlink()
211 struct mlxsw_sp_mr_route_vif_entry *rve; in mlxsw_sp_mr_route_info_create() local
221 list_for_each_entry(rve, &mr_route->evif_list, route_node) { in mlxsw_sp_mr_route_info_create()
222 if (mlxsw_sp_mr_vif_valid(rve->mr_vif)) { in mlxsw_sp_mr_route_info_create()
223 u16 rifi = mlxsw_sp_rif_index(rve->mr_vif->rif); in mlxsw_sp_mr_route_info_create()
302 struct mlxsw_sp_mr_route_vif_entry *rve, *tmp; in mlxsw_sp_mr_route_create() local
338 list_for_each_entry_safe(rve, tmp, &mr_route->evif_list, route_node) in mlxsw_sp_mr_route_create()
339 mlxsw_sp_mr_route_evif_unlink(rve); in mlxsw_sp_mr_route_create()
347 struct mlxsw_sp_mr_route_vif_entry *rve, *tmp; in mlxsw_sp_mr_route_destroy() local
351 list_for_each_entry_safe(rve, tmp, &mr_route->evif_list, route_node) in mlxsw_sp_mr_route_destroy()
352 mlxsw_sp_mr_route_evif_unlink(rve); in mlxsw_sp_mr_route_destroy()
481 struct mlxsw_sp_mr_route_vif_entry *rve) in mlxsw_sp_mr_route_ivif_resolve() argument
489 route_action = mlxsw_sp_mr_route_action(rve->mr_route); in mlxsw_sp_mr_route_ivif_resolve()
494 irif_index = mlxsw_sp_rif_index(rve->mr_vif->rif); in mlxsw_sp_mr_route_ivif_resolve()
495 err = mr->mr_ops->route_irif_update(mlxsw_sp, rve->mr_route->route_priv, in mlxsw_sp_mr_route_ivif_resolve()
501 rve->mr_route->route_priv, in mlxsw_sp_mr_route_ivif_resolve()
509 rve->mr_route->route_action = route_action; in mlxsw_sp_mr_route_ivif_resolve()
510 mlxsw_sp_mr_mfc_offload_update(rve->mr_route); in mlxsw_sp_mr_route_ivif_resolve()
516 struct mlxsw_sp_mr_route_vif_entry *rve) in mlxsw_sp_mr_route_ivif_unresolve() argument
521 mr->mr_ops->route_action_update(mlxsw_sp, rve->mr_route->route_priv, in mlxsw_sp_mr_route_ivif_unresolve()
523 rve->mr_route->route_action = MLXSW_SP_MR_ROUTE_ACTION_TRAP; in mlxsw_sp_mr_route_ivif_unresolve()
524 mlxsw_sp_mr_mfc_offload_update(rve->mr_route); in mlxsw_sp_mr_route_ivif_unresolve()
530 struct mlxsw_sp_mr_route_vif_entry *rve) in mlxsw_sp_mr_route_evif_resolve() argument
539 if (mlxsw_sp_mr_vif_valid(rve->mr_vif)) { in mlxsw_sp_mr_route_evif_resolve()
540 erif_index = mlxsw_sp_rif_index(rve->mr_vif->rif); in mlxsw_sp_mr_route_evif_resolve()
542 rve->mr_route->route_priv, in mlxsw_sp_mr_route_evif_resolve()
551 route_action = mlxsw_sp_mr_route_action(rve->mr_route); in mlxsw_sp_mr_route_evif_resolve()
552 if (route_action != rve->mr_route->route_action) { in mlxsw_sp_mr_route_evif_resolve()
554 rve->mr_route->route_priv, in mlxsw_sp_mr_route_evif_resolve()
561 if (rve->mr_vif->dev->mtu < rve->mr_route->min_mtu) { in mlxsw_sp_mr_route_evif_resolve()
562 rve->mr_route->min_mtu = rve->mr_vif->dev->mtu; in mlxsw_sp_mr_route_evif_resolve()
564 rve->mr_route->route_priv, in mlxsw_sp_mr_route_evif_resolve()
565 rve->mr_route->min_mtu); in mlxsw_sp_mr_route_evif_resolve()
570 rve->mr_route->route_action = route_action; in mlxsw_sp_mr_route_evif_resolve()
571 mlxsw_sp_mr_mfc_offload_update(rve->mr_route); in mlxsw_sp_mr_route_evif_resolve()
575 if (route_action != rve->mr_route->route_action) in mlxsw_sp_mr_route_evif_resolve()
577 rve->mr_route->route_priv, in mlxsw_sp_mr_route_evif_resolve()
578 rve->mr_route->route_action); in mlxsw_sp_mr_route_evif_resolve()
580 if (mlxsw_sp_mr_vif_valid(rve->mr_vif)) in mlxsw_sp_mr_route_evif_resolve()
581 mr->mr_ops->route_erif_del(mlxsw_sp, rve->mr_route->route_priv, in mlxsw_sp_mr_route_evif_resolve()
589 struct mlxsw_sp_mr_route_vif_entry *rve) in mlxsw_sp_mr_route_evif_unresolve() argument
597 if (!mlxsw_sp_mr_vif_valid(rve->mr_vif)) in mlxsw_sp_mr_route_evif_unresolve()
605 if (mlxsw_sp_mr_route_valid_evifs_num(rve->mr_route) == 1) in mlxsw_sp_mr_route_evif_unresolve()
608 route_action = mlxsw_sp_mr_route_action(rve->mr_route); in mlxsw_sp_mr_route_evif_unresolve()
609 if (route_action != rve->mr_route->route_action) in mlxsw_sp_mr_route_evif_unresolve()
611 rve->mr_route->route_priv, in mlxsw_sp_mr_route_evif_unresolve()
615 rifi = mlxsw_sp_rif_index(rve->mr_vif->rif); in mlxsw_sp_mr_route_evif_unresolve()
616 mr->mr_ops->route_erif_del(mlxsw_sp, rve->mr_route->route_priv, rifi); in mlxsw_sp_mr_route_evif_unresolve()
617 rve->mr_route->route_action = route_action; in mlxsw_sp_mr_route_evif_unresolve()
618 mlxsw_sp_mr_mfc_offload_update(rve->mr_route); in mlxsw_sp_mr_route_evif_unresolve()
666 struct mlxsw_sp_mr_route_vif_entry *rve; in mlxsw_sp_mr_vif_unresolve() local
669 list_for_each_entry(rve, &mr_vif->route_evif_list, vif_node) in mlxsw_sp_mr_vif_unresolve()
670 mlxsw_sp_mr_route_evif_unresolve(mr_table, rve); in mlxsw_sp_mr_vif_unresolve()
673 list_for_each_entry(rve, &mr_vif->route_ivif_list, vif_node) in mlxsw_sp_mr_vif_unresolve()
674 mlxsw_sp_mr_route_ivif_unresolve(mr_table, rve); in mlxsw_sp_mr_vif_unresolve()
753 struct mlxsw_sp_mr_route_vif_entry *rve; in mlxsw_sp_mr_rif_mtu_update() local
766 list_for_each_entry(rve, &mr_vif->route_evif_list, vif_node) { in mlxsw_sp_mr_rif_mtu_update()
767 if (mtu < rve->mr_route->min_mtu) { in mlxsw_sp_mr_rif_mtu_update()
768 rve->mr_route->min_mtu = mtu; in mlxsw_sp_mr_rif_mtu_update()
770 rve->mr_route->route_priv, in mlxsw_sp_mr_rif_mtu_update()