rif 1266 arch/mips/include/asm/octeon/cvmx-pko-defs.h uint64_t rif:1; rif 1286 arch/mips/include/asm/octeon/cvmx-pko-defs.h uint64_t rif:1; rif 367 drivers/atm/iphase.c srv_p->rif = 0xf; rif 415 drivers/atm/iphase.c if (srv_p->rif > MAX_RIF) rif 449 drivers/atm/iphase.c air = srv_p->pcr << (15 - srv_p->rif); rif 1858 drivers/atm/iphase.c if (vcc->qos.txtp.rif) rif 1859 drivers/atm/iphase.c srv_p.rif = vcc->qos.txtp.rif; rif 834 drivers/atm/iphase.h u8 rif; /* Rate Increment Factor (4-bit) */ rif 336 drivers/media/tuners/tda9887.c static char *rif[4] = { rif 376 drivers/media/tuners/tda9887.c rif[(buf[3] & 0x0c) >> 2]); rif 5787 drivers/net/ethernet/mellanox/mlxsw/reg.h MLXSW_ITEM32(reg, ritr, rif, 0x00, 0, 16); rif 6044 drivers/net/ethernet/mellanox/mlxsw/reg.h static inline void mlxsw_reg_ritr_rif_pack(char *payload, u16 rif) rif 6047 drivers/net/ethernet/mellanox/mlxsw/reg.h mlxsw_reg_ritr_rif_set(payload, rif); rif 6060 drivers/net/ethernet/mellanox/mlxsw/reg.h u16 rif, u16 vr_id, u16 mtu) rif 6072 drivers/net/ethernet/mellanox/mlxsw/reg.h mlxsw_reg_ritr_rif_set(payload, rif); rif 7116 drivers/net/ethernet/mellanox/mlxsw/reg.h MLXSW_ITEM32(reg, rauht, rif, 0x00, 0, 16); rif 7171 drivers/net/ethernet/mellanox/mlxsw/reg.h enum mlxsw_reg_rauht_op op, u16 rif, rif 7176 drivers/net/ethernet/mellanox/mlxsw/reg.h mlxsw_reg_rauht_rif_set(payload, rif); rif 7181 drivers/net/ethernet/mellanox/mlxsw/reg.h enum mlxsw_reg_rauht_op op, u16 rif, rif 7184 drivers/net/ethernet/mellanox/mlxsw/reg.h mlxsw_reg_rauht_pack(payload, op, rif, mac); rif 7189 drivers/net/ethernet/mellanox/mlxsw/reg.h enum mlxsw_reg_rauht_op op, u16 rif, rif 7192 drivers/net/ethernet/mellanox/mlxsw/reg.h mlxsw_reg_rauht_pack(payload, op, rif, mac); rif 559 drivers/net/ethernet/mellanox/mlxsw/spectrum.h struct mlxsw_sp_fid *mlxsw_sp_rif_fid(const struct mlxsw_sp_rif *rif); rif 876 drivers/net/ethernet/mellanox/mlxsw/spectrum.h void mlxsw_sp_fid_rif_set(struct mlxsw_sp_fid *fid, struct mlxsw_sp_rif *rif); rif 155 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c struct mlxsw_sp_rif *rif, rif 165 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c *rif_value = mlxsw_sp_rif_index(rif); rif 166 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c entry->match_values->mapping_value = mlxsw_sp_rif_dev_ifindex(rif); rif 175 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c entry->index = mlxsw_sp_rif_index(rif); rif 180 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c err = mlxsw_sp_rif_counter_value_get(mlxsw_sp, rif, rif 221 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c struct mlxsw_sp_rif *rif = mlxsw_sp_rif_by_index(mlxsw_sp, i); rif 223 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c if (!rif || !mlxsw_sp_rif_dev(rif)) rif 225 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c err = mlxsw_sp_erif_entry_get(mlxsw_sp, &entry, rif, rif 263 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c struct mlxsw_sp_rif *rif = mlxsw_sp_rif_by_index(mlxsw_sp, i); rif 265 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c if (!rif) rif 268 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c mlxsw_sp_rif_counter_alloc(mlxsw_sp, rif, rif 271 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c mlxsw_sp_rif_counter_free(mlxsw_sp, rif, rif 456 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c struct mlxsw_sp_rif *rif, rif 467 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c *rif_value = mlxsw_sp_rif_index(rif); rif 468 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c value->mapping_value = mlxsw_sp_rif_dev_ifindex(rif); rif 484 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c struct mlxsw_sp_rif *rif) rif 491 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c __mlxsw_sp_dpipe_table_host_entry_fill(entry, rif, ha, &dip); rif 497 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c struct mlxsw_sp_rif *rif) rif 505 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c __mlxsw_sp_dpipe_table_host_entry_fill(entry, rif, ha, dip); rif 512 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c struct mlxsw_sp_rif *rif, rif 519 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c mlxsw_sp_dpipe_table_host4_entry_fill(entry, neigh_entry, rif); rif 522 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c mlxsw_sp_dpipe_table_host6_entry_fill(entry, neigh_entry, rif); rif 559 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c struct mlxsw_sp_rif *rif = mlxsw_sp_rif_by_index(mlxsw_sp, i); rif 562 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c if (!rif) rif 566 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c mlxsw_sp_rif_neigh_for_each(neigh_entry, rif) { rif 580 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c neigh_entry, rif, rif 667 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c struct mlxsw_sp_rif *rif = mlxsw_sp_rif_by_index(mlxsw_sp, i); rif 670 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c if (!rif) rif 672 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c mlxsw_sp_rif_neigh_for_each(neigh_entry, rif) { rif 706 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c struct mlxsw_sp_rif *rif = mlxsw_sp_rif_by_index(mlxsw_sp, i); rif 709 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c if (!rif) rif 711 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c mlxsw_sp_rif_neigh_for_each(neigh_entry, rif) { rif 1035 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c struct mlxsw_sp_rif *rif) rif 1058 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c *p_rif_value = mlxsw_sp_rif_index(rif); rif 1059 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c value->mapping_value = mlxsw_sp_rif_dev_ifindex(rif); rif 1067 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c struct mlxsw_sp_rif *rif = mlxsw_sp_nexthop_rif(nh); rif 1076 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c adj_hash_index, ha, rif); rif 26 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp_rif *rif; rif 372 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c void mlxsw_sp_fid_rif_set(struct mlxsw_sp_fid *fid, struct mlxsw_sp_rif *rif) rif 374 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c fid->rif = rif; rif 379 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c return fid->rif; rif 27 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c const struct mlxsw_sp_rif *rif; rif 99 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c return vif->ops->is_regular(vif) && vif->dev && vif->rif; rif 153 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c if (mlxsw_sp_mr_vif_exists(rve->mr_vif) && !rve->mr_vif->rif) rif 220 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c u16 rifi = mlxsw_sp_rif_index(rve->mr_vif->rif); rif 227 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c irif_index = mlxsw_sp_rif_index(mr_route->ivif.mr_vif->rif); rif 483 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c irif_index = mlxsw_sp_rif_index(rve->mr_vif->rif); rif 541 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c erif_index = mlxsw_sp_rif_index(rve->mr_vif->rif); rif 604 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c rifi = mlxsw_sp_rif_index(rve->mr_vif->rif); rif 614 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c const struct mlxsw_sp_rif *rif) rif 621 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_vif->rif = rif; rif 647 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_vif->rif = NULL; rif 667 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_vif->rif = NULL; rif 672 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c unsigned long vif_flags, const struct mlxsw_sp_rif *rif) rif 680 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c return mlxsw_sp_mr_vif_resolve(mr_table, dev, mr_vif, vif_flags, rif); rif 707 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c const struct mlxsw_sp_rif *rif) rif 709 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c const struct net_device *rif_dev = mlxsw_sp_rif_dev(rif); rif 719 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_vif->vif_flags, rif); rif 723 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c const struct mlxsw_sp_rif *rif) rif 725 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c const struct net_device *rif_dev = mlxsw_sp_rif_dev(rif); rif 738 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c const struct mlxsw_sp_rif *rif, int mtu) rif 740 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c const struct net_device *rif_dev = mlxsw_sp_rif_dev(rif); rif 963 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c mr_table->vifs[i].rif = NULL; rif 80 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.h const struct mlxsw_sp_rif *rif); rif 83 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.h const struct mlxsw_sp_rif *rif); rif 85 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.h const struct mlxsw_sp_rif *rif); rif 87 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.h const struct mlxsw_sp_rif *rif, int mtu); rif 136 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c void (*setup)(struct mlxsw_sp_rif *rif, rif 138 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c int (*configure)(struct mlxsw_sp_rif *rif); rif 139 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c void (*deconfigure)(struct mlxsw_sp_rif *rif); rif 140 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fid * (*fid_get)(struct mlxsw_sp_rif *rif, rif 142 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c void (*fdb_del)(struct mlxsw_sp_rif *rif, const char *mac); rif 145 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static void mlxsw_sp_rif_destroy(struct mlxsw_sp_rif *rif); rif 156 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_p_counter_get(struct mlxsw_sp_rif *rif, rif 161 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return &rif->counter_egress; rif 163 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return &rif->counter_ingress; rif 169 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_counter_valid_get(struct mlxsw_sp_rif *rif, rif 174 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return rif->counter_egress_valid; rif 176 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return rif->counter_ingress_valid; rif 182 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_counter_valid_set(struct mlxsw_sp_rif *rif, rif 188 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif->counter_egress_valid = valid; rif 191 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif->counter_ingress_valid = valid; rif 217 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif, rif 225 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c valid = mlxsw_sp_rif_counter_valid_get(rif, dir); rif 229 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c p_counter_index = mlxsw_sp_rif_p_counter_get(rif, dir); rif 252 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif, rif 258 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c p_counter_index = mlxsw_sp_rif_p_counter_get(rif, dir); rif 270 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_rif_counter_edit(mlxsw_sp, rif->rif_index, rif 274 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_counter_valid_set(rif, dir, true); rif 285 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif, rif 290 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!mlxsw_sp_rif_counter_valid_get(rif, dir)) rif 293 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c p_counter_index = mlxsw_sp_rif_p_counter_get(rif, dir); rif 296 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_counter_edit(mlxsw_sp, rif->rif_index, rif 300 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_counter_valid_set(rif, dir, false); rif 303 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static void mlxsw_sp_rif_counters_alloc(struct mlxsw_sp_rif *rif) rif 305 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp *mlxsw_sp = rif->mlxsw_sp; rif 312 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_counter_alloc(mlxsw_sp, rif, MLXSW_SP_RIF_COUNTER_EGRESS); rif 315 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static void mlxsw_sp_rif_counters_free(struct mlxsw_sp_rif *rif) rif 317 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp *mlxsw_sp = rif->mlxsw_sp; rif 319 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_counter_free(mlxsw_sp, rif, MLXSW_SP_RIF_COUNTER_EGRESS); rif 1013 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 1022 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_create(mlxsw_sp, &lb_params.common, extack); rif 1023 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (IS_ERR(rif)) rif 1024 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return ERR_CAST(rif); rif 1025 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return container_of(rif, struct mlxsw_sp_rif_ipip_lb, common); rif 1449 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif = &lb_rif->common; rif 1450 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp *mlxsw_sp = rif->mlxsw_sp; rif 1458 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif->rif_index, rif->vr_id, rif->dev->mtu); rif 1550 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif); rif 1875 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c u16 rif; rif 1893 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_neigh_next(struct mlxsw_sp_rif *rif, rif 1897 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (list_empty(&rif->neigh_list)) rif 1900 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return list_first_entry(&rif->neigh_list, rif 1904 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (list_is_last(&neigh_entry->rif_list_node, &rif->neigh_list)) rif 1950 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c u16 rif) rif 1959 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c neigh_entry->rif = rif; rif 2039 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 2042 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, n->dev); rif 2043 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!rif) rif 2046 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c neigh_entry = mlxsw_sp_neigh_entry_alloc(mlxsw_sp, n, rif->rif_index); rif 2055 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_add(&neigh_entry->rif_list_node, &rif->neigh_list); rif 2107 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c u16 rif; rif 2109 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_reg_rauhtd_ent_ipv4_unpack(rauhtd_pl, ent_index, &rif, &dip); rif 2111 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!mlxsw_sp->router->rifs[rif]) { rif 2117 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c dev = mlxsw_sp->router->rifs[rif]->dev; rif 2135 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c u16 rif; rif 2137 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_reg_rauhtd_ent_ipv6_unpack(rauhtd_pl, rec_index, &rif, rif 2140 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!mlxsw_sp->router->rifs[rif]) { rif 2145 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c dev = mlxsw_sp->router->rifs[rif]->dev; rif 2367 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_reg_rauht_pack4(rauht_pl, op, neigh_entry->rif, neigh_entry->ha, rif 2384 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_reg_rauht_pack6(rauht_pl, op, neigh_entry->rif, neigh_entry->ha, rif 2656 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif) rif 2660 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_for_each_entry_safe(neigh_entry, tmp, &rif->neigh_list, rif 2690 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 2721 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c #define nh_rif nexthops[0].rif rif 2814 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return nh->rif; rif 3100 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c adj_index, neigh_entry->rif); rif 3473 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c n = neigh_lookup(nh->nh_grp->neigh_tbl, &nh->gw_addr, nh->rif->dev); rif 3476 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c nh->rif->dev); rif 3541 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif) rif 3543 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (nh->rif) rif 3546 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c nh->rif = rif; rif 3547 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_add(&nh->rif_list_node, &rif->nexthop_list); rif 3552 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!nh->rif) rif 3556 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c nh->rif = NULL; rif 3575 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c n = neigh_lookup(nh->nh_grp->neigh_tbl, &nh->gw_addr, nh->rif->dev); rif 3578 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c nh->rif->dev); rif 3707 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 3722 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, dev); rif 3723 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!rif) rif 3726 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_nexthop_rif_init(nh, rif); rif 3823 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif) rif 3828 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_for_each_entry(nh, &rif->nexthop_list, rif_list_node) { rif 3834 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c removing = !mlxsw_sp_ipip_netdev_ul_up(rif->dev); rif 3854 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c nh->rif = new_rif; rif 3859 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif) rif 3863 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_for_each_entry_safe(nh, tmp, &rif->nexthop_list, rif_list_node) { rif 4016 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (nh->rif && nh->rif->dev == rt->fib6_nh->fib_nh_dev && rif 4214 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif = fib_entry->nh_group->nh_rif; rif 4222 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif_index = rif->rif_index; rif 5056 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 5071 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, dev); rif 5072 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!rif) rif 5074 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_nexthop_rif_init(nh, rif); rif 5756 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 5767 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, ven_info->dev); rif 5770 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c ven_info->vif_flags, rif); rif 6337 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static int mlxsw_sp_router_rif_disable(struct mlxsw_sp *mlxsw_sp, u16 rif) rif 6342 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_reg_ritr_rif_pack(ritr_pl, rif); rif 6352 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif) rif 6354 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_router_rif_disable(mlxsw_sp, rif->rif_index); rif 6355 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_nexthop_rif_gone_sync(mlxsw_sp, rif); rif 6356 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_neigh_rif_gone_sync(mlxsw_sp, rif); rif 6360 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_should_config(struct mlxsw_sp_rif *rif, struct net_device *dev, rif 6369 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return rif == NULL; rif 6386 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (rif && addr_list_empty && rif 6387 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c !netif_is_l3_slave(rif->dev)) rif 6439 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 6441 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = kzalloc(rif_size, GFP_KERNEL); rif 6442 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!rif) rif 6445 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c INIT_LIST_HEAD(&rif->nexthop_list); rif 6446 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c INIT_LIST_HEAD(&rif->neigh_list); rif 6448 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c ether_addr_copy(rif->addr, l3_dev->dev_addr); rif 6449 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif->mtu = l3_dev->mtu; rif 6450 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif->dev = l3_dev; rif 6452 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif->vr_id = vr_id; rif 6453 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif->rif_index = rif_index; rif 6455 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return rif; rif 6464 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c u16 mlxsw_sp_rif_index(const struct mlxsw_sp_rif *rif) rif 6466 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return rif->rif_index; rif 6491 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c int mlxsw_sp_rif_dev_ifindex(const struct mlxsw_sp_rif *rif) rif 6493 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return rif->dev->ifindex; rif 6496 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c const struct net_device *mlxsw_sp_rif_dev(const struct mlxsw_sp_rif *rif) rif 6498 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return rif->dev; rif 6501 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fid *mlxsw_sp_rif_fid(const struct mlxsw_sp_rif *rif) rif 6503 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return rif->fid; rif 6515 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 6534 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_alloc(ops->rif_size, rif_index, vr->id, params->dev); rif 6535 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!rif) { rif 6539 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c dev_hold(rif->dev); rif 6540 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp->router->rifs[rif_index] = rif; rif 6541 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif->mlxsw_sp = mlxsw_sp; rif 6542 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif->ops = ops; rif 6545 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fid = ops->fid_get(rif, extack); rif 6550 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif->fid = fid; rif 6554 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c ops->setup(rif, params); rif 6556 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = ops->configure(rif); rif 6561 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_mr_rif_add(vr->mr_table[i], rif); rif 6566 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_counters_alloc(rif); rif 6568 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return rif; rif 6572 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_mr_rif_del(vr->mr_table[i], rif); rif 6573 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c ops->deconfigure(rif); rif 6579 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c dev_put(rif->dev); rif 6580 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c kfree(rif); rif 6588 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static void mlxsw_sp_rif_destroy(struct mlxsw_sp_rif *rif) rif 6590 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c const struct mlxsw_sp_rif_ops *ops = rif->ops; rif 6591 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp *mlxsw_sp = rif->mlxsw_sp; rif 6592 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fid *fid = rif->fid; rif 6596 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_router_rif_gone_sync(mlxsw_sp, rif); rif 6597 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c vr = &mlxsw_sp->router->vrs[rif->vr_id]; rif 6599 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_counters_free(rif); rif 6601 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_mr_rif_del(vr->mr_table[i], rif); rif 6602 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c ops->deconfigure(rif); rif 6606 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp->router->rifs[rif->rif_index] = NULL; rif 6607 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c dev_put(rif->dev); rif 6608 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c kfree(rif); rif 6616 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 6618 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, dev); rif 6619 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!rif) rif 6621 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_destroy(rif); rif 6639 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_subport_rif(const struct mlxsw_sp_rif *rif) rif 6641 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return container_of(rif, struct mlxsw_sp_rif_subport, common); rif 6650 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 6652 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, params->dev); rif 6653 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!rif) rif 6656 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif_subport = mlxsw_sp_rif_subport_rif(rif); rif 6658 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return rif; rif 6661 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static void mlxsw_sp_rif_subport_put(struct mlxsw_sp_rif *rif) rif 6665 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif_subport = mlxsw_sp_rif_subport_rif(rif); rif 6669 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_destroy(rif); rif 6683 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 6688 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_subport_get(mlxsw_sp, ¶ms, extack); rif 6689 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (IS_ERR(rif)) rif 6690 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return PTR_ERR(rif); rif 6693 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fid = rif->ops->fid_get(rif, extack); rif 6717 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_subport_put(rif); rif 6726 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif = mlxsw_sp_fid_rif(fid); rif 6737 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_subport_put(rif); rif 6819 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 6823 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_create(mlxsw_sp, ¶ms, extack); rif 6824 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (IS_ERR(rif)) rif 6825 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return PTR_ERR(rif); rif 6828 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, l3_dev); rif 6829 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_destroy(rif); rif 6905 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 6908 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, vlan->lowerdev); rif 6909 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!rif) { rif 6915 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_index(rif->fid), true); rif 6919 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_rif_vrrp_op(mlxsw_sp, rif->rif_index, rif 6927 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (rif->ops->fdb_del) rif 6928 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif->ops->fdb_del(rif, macvlan_dev->dev_addr); rif 6934 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_index(rif->fid), false); rif 6942 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 6944 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, vlan->lowerdev); rif 6948 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!rif) rif 6950 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_vrrp_op(mlxsw_sp, rif->rif_index, macvlan_dev->dev_addr, rif 6953 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_index(rif->fid), false); rif 6977 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 6987 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp->router->rifs[i]; rif 6988 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (rif && rif->ops && rif 6989 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif->ops->type == MLXSW_SP_RIF_TYPE_IPIP_LB) rif 6991 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (rif && rif->dev && rif->dev != dev && rif 6992 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c !ether_addr_equal_masked(rif->dev->dev_addr, dev_addr, rif 7030 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 7038 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_find_by_dev(router->mlxsw_sp, dev); rif 7039 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!mlxsw_sp_rif_should_config(rif, dev, event)) rif 7053 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 7060 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, dev); rif 7061 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!mlxsw_sp_rif_should_config(rif, dev, event)) rif 7088 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 7092 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, dev); rif 7093 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!mlxsw_sp_rif_should_config(rif, dev, event)) rif 7137 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 7144 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, dev); rif 7145 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!mlxsw_sp_rif_should_config(rif, dev, event)) rif 7177 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif) rif 7179 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct net_device *dev = rif->dev; rif 7183 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fid_index = mlxsw_sp_fid_index(rif->fid); rif 7185 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_rif_fdb_op(mlxsw_sp, rif->addr, fid_index, false); rif 7189 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_rif_edit(mlxsw_sp, rif->rif_index, dev->dev_addr, rif 7198 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (rif->mtu != dev->mtu) { rif 7206 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c vr = &mlxsw_sp->router->vrs[rif->vr_id]; rif 7209 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif, dev->mtu); rif 7212 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c ether_addr_copy(rif->addr, dev->dev_addr); rif 7213 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif->mtu = dev->mtu; rif 7215 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c netdev_dbg(dev, "Updated RIF=%d\n", rif->rif_index); rif 7220 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_edit(mlxsw_sp, rif->rif_index, rif->addr, rif->mtu); rif 7222 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_fdb_op(mlxsw_sp, rif->addr, fid_index, true); rif 7226 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static int mlxsw_sp_router_port_pre_changeaddr_event(struct mlxsw_sp_rif *rif, rif 7232 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return mlxsw_sp_router_port_check_rif_addr(rif->mlxsw_sp, rif->dev, rif 7240 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 7246 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, dev); rif 7247 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!rif) rif 7253 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return mlxsw_sp_router_port_change_event(mlxsw_sp, rif); rif 7255 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return mlxsw_sp_router_port_pre_changeaddr_event(rif, ptr); rif 7265 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 7270 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, l3_dev); rif 7271 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (rif) rif 7281 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif; rif 7283 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, l3_dev); rif 7284 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!rif) rif 7321 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif *rif = data; rif 7326 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return mlxsw_sp_rif_fdb_op(rif->mlxsw_sp, dev->dev_addr, rif 7327 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_index(rif->fid), false); rif 7330 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static int mlxsw_sp_rif_macvlan_flush(struct mlxsw_sp_rif *rif) rif 7332 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!netif_is_macvlan_port(rif->dev)) rif 7335 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c netdev_warn(rif->dev, "Router interface is deleted. Upper macvlans will not work\n"); rif 7336 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return netdev_walk_all_upper_dev_rcu(rif->dev, rif 7337 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c __mlxsw_sp_rif_macvlan_flush, rif); rif 7340 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static void mlxsw_sp_rif_subport_setup(struct mlxsw_sp_rif *rif, rif 7345 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif_subport = mlxsw_sp_rif_subport_rif(rif); rif 7355 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static int mlxsw_sp_rif_subport_op(struct mlxsw_sp_rif *rif, bool enable) rif 7357 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp *mlxsw_sp = rif->mlxsw_sp; rif 7361 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif_subport = mlxsw_sp_rif_subport_rif(rif); rif 7363 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif->rif_index, rif->vr_id, rif->dev->mtu); rif 7364 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_reg_ritr_mac_pack(ritr_pl, rif->dev->dev_addr); rif 7373 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static int mlxsw_sp_rif_subport_configure(struct mlxsw_sp_rif *rif) rif 7377 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_rif_subport_op(rif, true); rif 7381 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_rif_fdb_op(rif->mlxsw_sp, rif->dev->dev_addr, rif 7382 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_index(rif->fid), true); rif 7386 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_rif_set(rif->fid, rif); rif 7390 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_subport_op(rif, false); rif 7394 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static void mlxsw_sp_rif_subport_deconfigure(struct mlxsw_sp_rif *rif) rif 7396 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fid *fid = rif->fid; rif 7399 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_fdb_op(rif->mlxsw_sp, rif->dev->dev_addr, rif 7401 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_macvlan_flush(rif); rif 7402 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_subport_op(rif, false); rif 7406 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_subport_fid_get(struct mlxsw_sp_rif *rif, rif 7409 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return mlxsw_sp_fid_rfid_get(rif->mlxsw_sp, rif->rif_index); rif 7421 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static int mlxsw_sp_rif_vlan_fid_op(struct mlxsw_sp_rif *rif, rif 7425 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp *mlxsw_sp = rif->mlxsw_sp; rif 7428 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_reg_ritr_pack(ritr_pl, enable, type, rif->rif_index, rif->vr_id, rif 7429 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif->dev->mtu); rif 7430 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_reg_ritr_mac_pack(ritr_pl, rif->dev->dev_addr); rif 7441 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static int mlxsw_sp_rif_vlan_configure(struct mlxsw_sp_rif *rif) rif 7443 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp *mlxsw_sp = rif->mlxsw_sp; rif 7444 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c u16 vid = mlxsw_sp_fid_8021q_vid(rif->fid); rif 7447 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_rif_vlan_fid_op(rif, MLXSW_REG_RITR_VLAN_IF, vid, true); rif 7451 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_fid_flood_set(rif->fid, MLXSW_SP_FLOOD_TYPE_MC, rif 7456 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_fid_flood_set(rif->fid, MLXSW_SP_FLOOD_TYPE_BC, rif 7461 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_rif_fdb_op(rif->mlxsw_sp, rif->dev->dev_addr, rif 7462 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_index(rif->fid), true); rif 7466 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_rif_set(rif->fid, rif); rif 7470 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_flood_set(rif->fid, MLXSW_SP_FLOOD_TYPE_BC, rif 7473 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_flood_set(rif->fid, MLXSW_SP_FLOOD_TYPE_MC, rif 7476 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_vlan_fid_op(rif, MLXSW_REG_RITR_VLAN_IF, vid, false); rif 7480 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static void mlxsw_sp_rif_vlan_deconfigure(struct mlxsw_sp_rif *rif) rif 7482 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c u16 vid = mlxsw_sp_fid_8021q_vid(rif->fid); rif 7483 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp *mlxsw_sp = rif->mlxsw_sp; rif 7484 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fid *fid = rif->fid; rif 7487 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_fdb_op(rif->mlxsw_sp, rif->dev->dev_addr, rif 7489 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_macvlan_flush(rif); rif 7490 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_flood_set(rif->fid, MLXSW_SP_FLOOD_TYPE_BC, rif 7492 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_flood_set(rif->fid, MLXSW_SP_FLOOD_TYPE_MC, rif 7494 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_vlan_fid_op(rif, MLXSW_REG_RITR_VLAN_IF, vid, false); rif 7498 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_vlan_fid_get(struct mlxsw_sp_rif *rif, rif 7501 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct net_device *br_dev = rif->dev; rif 7505 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (is_vlan_dev(rif->dev)) { rif 7506 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c vid = vlan_dev_vlan_id(rif->dev); rif 7507 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c br_dev = vlan_dev_real_dev(rif->dev); rif 7511 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = br_vlan_get_pvid(rif->dev, &vid); rif 7518 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return mlxsw_sp_bridge_fid_get(rif->mlxsw_sp, br_dev, vid, extack); rif 7521 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static void mlxsw_sp_rif_vlan_fdb_del(struct mlxsw_sp_rif *rif, const char *mac) rif 7523 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c u16 vid = mlxsw_sp_fid_8021q_vid(rif->fid); rif 7528 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c br_dev = is_vlan_dev(rif->dev) ? vlan_dev_real_dev(rif->dev) : rif->dev; rif 7548 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static int mlxsw_sp_rif_fid_configure(struct mlxsw_sp_rif *rif) rif 7550 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp *mlxsw_sp = rif->mlxsw_sp; rif 7551 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c u16 fid_index = mlxsw_sp_fid_index(rif->fid); rif 7554 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_rif_vlan_fid_op(rif, MLXSW_REG_RITR_FID_IF, fid_index, rif 7559 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_fid_flood_set(rif->fid, MLXSW_SP_FLOOD_TYPE_MC, rif 7564 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_fid_flood_set(rif->fid, MLXSW_SP_FLOOD_TYPE_BC, rif 7569 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_rif_fdb_op(rif->mlxsw_sp, rif->dev->dev_addr, rif 7570 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_index(rif->fid), true); rif 7574 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_rif_set(rif->fid, rif); rif 7578 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_flood_set(rif->fid, MLXSW_SP_FLOOD_TYPE_BC, rif 7581 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_flood_set(rif->fid, MLXSW_SP_FLOOD_TYPE_MC, rif 7584 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_vlan_fid_op(rif, MLXSW_REG_RITR_FID_IF, fid_index, false); rif 7588 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static void mlxsw_sp_rif_fid_deconfigure(struct mlxsw_sp_rif *rif) rif 7590 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c u16 fid_index = mlxsw_sp_fid_index(rif->fid); rif 7591 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp *mlxsw_sp = rif->mlxsw_sp; rif 7592 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fid *fid = rif->fid; rif 7595 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_fdb_op(rif->mlxsw_sp, rif->dev->dev_addr, rif 7597 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_macvlan_flush(rif); rif 7598 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_flood_set(rif->fid, MLXSW_SP_FLOOD_TYPE_BC, rif 7600 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_flood_set(rif->fid, MLXSW_SP_FLOOD_TYPE_MC, rif 7602 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_vlan_fid_op(rif, MLXSW_REG_RITR_FID_IF, fid_index, false); rif 7606 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_fid_fid_get(struct mlxsw_sp_rif *rif, rif 7609 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return mlxsw_sp_bridge_fid_get(rif->mlxsw_sp, rif->dev, 0, extack); rif 7612 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static void mlxsw_sp_rif_fid_fdb_del(struct mlxsw_sp_rif *rif, const char *mac) rif 7617 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c dev = br_fdb_find_port(rif->dev, mac, 0); rif 7646 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_ipip_lb_rif(struct mlxsw_sp_rif *rif) rif 7648 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return container_of(rif, struct mlxsw_sp_rif_ipip_lb, common); rif 7652 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_rif_ipip_lb_setup(struct mlxsw_sp_rif *rif, rif 7660 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rif_lb = mlxsw_sp_rif_ipip_lb_rif(rif); rif 7665 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp1_rif_ipip_lb_configure(struct mlxsw_sp_rif *rif) rif 7667 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif_ipip_lb *lb_rif = mlxsw_sp_rif_ipip_lb_rif(rif); rif 7668 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c u32 ul_tb_id = mlxsw_sp_ipip_dev_ul_tb_id(rif->dev); rif 7669 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp *mlxsw_sp = rif->mlxsw_sp; rif 7691 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static void mlxsw_sp1_rif_ipip_lb_deconfigure(struct mlxsw_sp_rif *rif) rif 7693 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif_ipip_lb *lb_rif = mlxsw_sp_rif_ipip_lb_rif(rif); rif 7694 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp *mlxsw_sp = rif->mlxsw_sp; rif 7848 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp2_rif_ipip_lb_configure(struct mlxsw_sp_rif *rif) rif 7850 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif_ipip_lb *lb_rif = mlxsw_sp_rif_ipip_lb_rif(rif); rif 7851 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c u32 ul_tb_id = mlxsw_sp_ipip_dev_ul_tb_id(rif->dev); rif 7852 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp *mlxsw_sp = rif->mlxsw_sp; rif 7874 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static void mlxsw_sp2_rif_ipip_lb_deconfigure(struct mlxsw_sp_rif *rif) rif 7876 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_rif_ipip_lb *lb_rif = mlxsw_sp_rif_ipip_lb_rif(rif); rif 7877 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp *mlxsw_sp = rif->mlxsw_sp; rif 29 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h u16 mlxsw_sp_rif_index(const struct mlxsw_sp_rif *rif); rif 30 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h u16 mlxsw_sp_ipip_lb_rif_index(const struct mlxsw_sp_rif_ipip_lb *rif); rif 31 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h u16 mlxsw_sp_ipip_lb_ul_vr_id(const struct mlxsw_sp_rif_ipip_lb *rif); rif 34 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h int mlxsw_sp_rif_dev_ifindex(const struct mlxsw_sp_rif *rif); rif 35 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h const struct net_device *mlxsw_sp_rif_dev(const struct mlxsw_sp_rif *rif); rif 37 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h struct mlxsw_sp_rif *rif, rif 41 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h struct mlxsw_sp_rif *rif, rif 44 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h struct mlxsw_sp_rif *rif, rif 47 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h mlxsw_sp_rif_neigh_next(struct mlxsw_sp_rif *rif, rif 56 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h #define mlxsw_sp_rif_neigh_for_each(neigh_entry, rif) \ rif 57 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h for (neigh_entry = mlxsw_sp_rif_neigh_next(rif, NULL); neigh_entry; \ rif 58 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h neigh_entry = mlxsw_sp_rif_neigh_next(rif, neigh_entry)) rif 1110 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_rif *rif; rif 1115 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, br_dev); rif 1116 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c if (!rif) rif 1118 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c fid = mlxsw_sp_rif_fid(rif); rif 147 include/uapi/linux/atm.h unsigned int rif : 4; /* Rate Increment Factor (4-bit) */