mr_route 212 drivers/net/ethernet/mellanox/mlxsw/spectrum2_mr_tcam.c struct mlxsw_sp2_mr_route *mr_route = route_priv; mr_route 218 drivers/net/ethernet/mellanox/mlxsw/spectrum2_mr_tcam.c mr_route->mr_tcam = mr_tcam; mr_route 269 drivers/net/ethernet/mellanox/mlxsw/spectrum2_mr_tcam.c struct mlxsw_sp2_mr_route *mr_route = route_priv; mr_route 270 drivers/net/ethernet/mellanox/mlxsw/spectrum2_mr_tcam.c struct mlxsw_sp2_mr_tcam *mr_tcam = mr_route->mr_tcam; mr_route 48 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c struct mlxsw_sp_mr_route *mr_route; mr_route 59 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c const struct mlxsw_sp_mr_route *mr_route); mr_route 108 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mlxsw_sp_mr_route_ivif_in_evifs(const struct mlxsw_sp_mr_route *mr_route) mr_route 110 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c vifi_t ivif = mr_route->mfc->mfc_parent; mr_route 112 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c return mr_route->mfc->mfc_un.res.ttls[ivif] != 255; mr_route 116 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mlxsw_sp_mr_route_valid_evifs_num(const struct mlxsw_sp_mr_route *mr_route) mr_route 122 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c list_for_each_entry(rve, &mr_route->evif_list, route_node) mr_route 129 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mlxsw_sp_mr_route_action(const struct mlxsw_sp_mr_route *mr_route) mr_route 134 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (!mlxsw_sp_mr_vif_valid(mr_route->ivif.mr_vif)) mr_route 140 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (mr_route->mr_table->ops->is_route_starg(mr_route->mr_table, mr_route 141 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route) && mr_route 142 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c !mlxsw_sp_mr_route_ivif_in_evifs(mr_route)) mr_route 146 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (!mlxsw_sp_mr_route_valid_evifs_num(mr_route)) mr_route 152 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c list_for_each_entry(rve, &mr_route->evif_list, route_node) mr_route 160 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mlxsw_sp_mr_route_prio(const struct mlxsw_sp_mr_route *mr_route) mr_route 162 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c return mr_route->mr_table->ops->is_route_starg(mr_route->mr_table, mr_route 163 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route) ? mr_route 167 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c static int mlxsw_sp_mr_route_evif_link(struct mlxsw_sp_mr_route *mr_route, mr_route 175 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rve->mr_route = mr_route; mr_route 177 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c list_add_tail(&rve->route_node, &mr_route->evif_list); mr_route 190 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c static void mlxsw_sp_mr_route_ivif_link(struct mlxsw_sp_mr_route *mr_route, mr_route 193 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route->ivif.mr_route = mr_route; mr_route 194 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route->ivif.mr_vif = mr_vif; mr_route 195 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c list_add_tail(&mr_route->ivif.vif_node, &mr_vif->route_ivif_list); mr_route 198 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c static void mlxsw_sp_mr_route_ivif_unlink(struct mlxsw_sp_mr_route *mr_route) mr_route 200 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c list_del(&mr_route->ivif.vif_node); mr_route 205 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c struct mlxsw_sp_mr_route *mr_route, mr_route 218 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c list_for_each_entry(rve, &mr_route->evif_list, route_node) { mr_route 226 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (mlxsw_sp_mr_vif_valid(mr_route->ivif.mr_vif)) mr_route 227 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c irif_index = mlxsw_sp_rif_index(mr_route->ivif.mr_vif->rif); mr_route 233 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c route_info->min_mtu = mr_route->min_mtu; mr_route 234 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c route_info->route_action = mr_route->route_action; mr_route 246 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c struct mlxsw_sp_mr_route *mr_route, mr_route 254 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c err = mlxsw_sp_mr_route_info_create(mr_table, mr_route, &route_info); mr_route 261 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route->route_priv = kzalloc(mr->mr_ops->route_priv_size, mr_route 263 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (!mr_route->route_priv) { mr_route 268 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c route_params.key = mr_route->key; mr_route 270 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c route_params.prio = mlxsw_sp_mr_route_prio(mr_route); mr_route 272 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route->route_priv, mr_route 275 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c kfree(mr_route->route_priv); mr_route 277 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c err = mr->mr_ops->route_update(mlxsw_sp, mr_route->route_priv, mr_route 286 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c struct mlxsw_sp_mr_route *mr_route) mr_route 291 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr->mr_ops->route_destroy(mlxsw_sp, mr->priv, mr_route->route_priv); mr_route 292 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c kfree(mr_route->route_priv); mr_route 300 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c struct mlxsw_sp_mr_route *mr_route; mr_route 305 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route = kzalloc(sizeof(*mr_route), GFP_KERNEL); mr_route 306 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (!mr_route) mr_route 308 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c INIT_LIST_HEAD(&mr_route->evif_list); mr_route 311 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route->min_mtu = ETH_MAX_MTU; mr_route 313 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route->mfc = mfc; mr_route 314 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_table->ops->key_create(mr_table, &mr_route->key, mr_route->mfc); mr_route 316 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route->mr_table = mr_table; mr_route 319 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c err = mlxsw_sp_mr_route_evif_link(mr_route, mr_route 324 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_table->vifs[i].dev->mtu < mr_route->min_mtu) mr_route 325 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route->min_mtu = mr_table->vifs[i].dev->mtu; mr_route 328 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mlxsw_sp_mr_route_ivif_link(mr_route, mr_route 331 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route->route_action = mlxsw_sp_mr_route_action(mr_route); mr_route 332 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c return mr_route; mr_route 335 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c list_for_each_entry_safe(rve, tmp, &mr_route->evif_list, route_node) mr_route 337 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c kfree(mr_route); mr_route 342 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c struct mlxsw_sp_mr_route *mr_route) mr_route 346 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mlxsw_sp_mr_route_ivif_unlink(mr_route); mr_route 347 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_cache_put(mr_route->mfc); mr_route 348 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c list_for_each_entry_safe(rve, tmp, &mr_route->evif_list, route_node) mr_route 350 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c kfree(mr_route); mr_route 353 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c static void mlxsw_sp_mr_mfc_offload_set(struct mlxsw_sp_mr_route *mr_route, mr_route 357 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route->mfc->mfc_flags |= MFC_OFFLOAD; mr_route 359 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route->mfc->mfc_flags &= ~MFC_OFFLOAD; mr_route 362 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c static void mlxsw_sp_mr_mfc_offload_update(struct mlxsw_sp_mr_route *mr_route) mr_route 366 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c offload = mr_route->route_action != MLXSW_SP_MR_ROUTE_ACTION_TRAP; mr_route 367 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mlxsw_sp_mr_mfc_offload_set(mr_route, offload); mr_route 371 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c struct mlxsw_sp_mr_route *mr_route) mr_route 373 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mlxsw_sp_mr_mfc_offload_set(mr_route, false); mr_route 374 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mlxsw_sp_mr_route_erase(mr_table, mr_route); mr_route 375 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rhashtable_remove_fast(&mr_table->route_ht, &mr_route->ht_node, mr_route 377 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c list_del(&mr_route->node); mr_route 378 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mlxsw_sp_mr_route_destroy(mr_table, mr_route); mr_route 385 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c struct mlxsw_sp_mr_route *mr_route; mr_route 392 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route = mlxsw_sp_mr_route_create(mr_table, mfc); mr_route 393 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (IS_ERR(mr_route)) mr_route 394 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c return PTR_ERR(mr_route); mr_route 398 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c &mr_route->key, mr_route 407 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route->route_priv = mr_orig_route->route_priv; mr_route 419 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c list_add_tail(&mr_route->node, &mr_table->route_list); mr_route 421 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c &mr_route->ht_node, mr_route 427 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c err = mlxsw_sp_mr_route_write(mr_table, mr_route, replace); mr_route 440 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mlxsw_sp_mr_mfc_offload_update(mr_route); mr_route 444 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rhashtable_remove_fast(&mr_table->route_ht, &mr_route->ht_node, mr_route 447 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c list_del(&mr_route->node); mr_route 450 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mlxsw_sp_mr_route_destroy(mr_table, mr_route); mr_route 457 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c struct mlxsw_sp_mr_route *mr_route; mr_route 461 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route = rhashtable_lookup_fast(&mr_table->route_ht, &key, mr_route 463 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (mr_route) mr_route 464 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c __mlxsw_sp_mr_route_del(mr_table, mr_route); mr_route 478 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c route_action = mlxsw_sp_mr_route_action(rve->mr_route); mr_route 484 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c err = mr->mr_ops->route_irif_update(mlxsw_sp, rve->mr_route->route_priv, mr_route 490 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rve->mr_route->route_priv, mr_route 498 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rve->mr_route->route_action = route_action; mr_route 499 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mlxsw_sp_mr_mfc_offload_update(rve->mr_route); mr_route 510 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr->mr_ops->route_action_update(mlxsw_sp, rve->mr_route->route_priv, mr_route 512 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rve->mr_route->route_action = MLXSW_SP_MR_ROUTE_ACTION_TRAP; mr_route 513 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mlxsw_sp_mr_mfc_offload_update(rve->mr_route); mr_route 530 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c route_action = mlxsw_sp_mr_route_action(rve->mr_route); mr_route 531 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (route_action != rve->mr_route->route_action) { mr_route 533 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rve->mr_route->route_priv, mr_route 543 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rve->mr_route->route_priv, mr_route 550 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (rve->mr_vif->dev->mtu < rve->mr_route->min_mtu) { mr_route 551 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rve->mr_route->min_mtu = rve->mr_vif->dev->mtu; mr_route 553 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rve->mr_route->route_priv, mr_route 554 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rve->mr_route->min_mtu); mr_route 559 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rve->mr_route->route_action = route_action; mr_route 560 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mlxsw_sp_mr_mfc_offload_update(rve->mr_route); mr_route 565 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr->mr_ops->route_erif_del(mlxsw_sp, rve->mr_route->route_priv, mr_route 568 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (route_action != rve->mr_route->route_action) mr_route 570 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rve->mr_route->route_priv, mr_route 571 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rve->mr_route->route_action); mr_route 594 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (mlxsw_sp_mr_route_valid_evifs_num(rve->mr_route) == 1) mr_route 597 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c route_action = mlxsw_sp_mr_route_action(rve->mr_route); mr_route 598 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (route_action != rve->mr_route->route_action) mr_route 600 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rve->mr_route->route_priv, mr_route 605 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr->mr_ops->route_erif_del(mlxsw_sp, rve->mr_route->route_priv, rifi); mr_route 606 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rve->mr_route->route_action = route_action; mr_route 607 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mlxsw_sp_mr_mfc_offload_update(rve->mr_route); mr_route 756 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (mtu < rve->mr_route->min_mtu) { mr_route 757 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rve->mr_route->min_mtu = mtu; mr_route 759 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rve->mr_route->route_priv, mr_route 803 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c const struct mlxsw_sp_mr_route *mr_route) mr_route 805 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c return mr_route->key.source_mask.addr4 == htonl(INADDR_ANY); mr_route 849 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c const struct mlxsw_sp_mr_route *mr_route) mr_route 851 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c return ipv6_addr_any(&mr_route->key.source_mask.addr6); mr_route 955 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c struct mlxsw_sp_mr_route *mr_route, *tmp; mr_route 958 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c list_for_each_entry_safe(mr_route, tmp, &mr_table->route_list, node) mr_route 959 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c __mlxsw_sp_mr_route_del(mr_table, mr_route); mr_route 978 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c struct mlxsw_sp_mr_route *mr_route) mr_route 983 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (mr_route->route_action == MLXSW_SP_MR_ROUTE_ACTION_TRAP) mr_route 986 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr->mr_ops->route_stats(mlxsw_sp, mr_route->route_priv, &packets, mr_route 989 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (mr_route->mfc->mfc_un.res.pkt != packets) mr_route 990 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route->mfc->mfc_un.res.lastuse = jiffies; mr_route 991 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route->mfc->mfc_un.res.pkt = packets; mr_route 992 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route->mfc->mfc_un.res.bytes = bytes; mr_route 1000 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c struct mlxsw_sp_mr_route *mr_route; mr_route 1005 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c list_for_each_entry(mr_route, &mr_table->route_list, node) mr_route 1007 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_route);