Lines Matching refs:rif_index
80 u16 rif_index; member
214 static int mlxsw_sp_rif_counter_edit(struct mlxsw_sp *mlxsw_sp, u16 rif_index, in mlxsw_sp_rif_counter_edit() argument
224 mlxsw_reg_ritr_rif_pack(ritr_pl, rif_index); in mlxsw_sp_rif_counter_edit()
350 err = mlxsw_sp_rif_counter_edit(mlxsw_sp, rif->rif_index, in mlxsw_sp_rif_counter_alloc()
376 mlxsw_sp_rif_counter_edit(mlxsw_sp, rif->rif_index, in mlxsw_sp_rif_counter_free()
1659 rif->rif_index, rif->vr_id, dev->mtu); in mlxsw_sp_rif_ipip_lb_op()
1669 rif->rif_index, rif->vr_id, dev->mtu); in mlxsw_sp_rif_ipip_lb_op()
2356 neigh_entry = mlxsw_sp_neigh_entry_alloc(mlxsw_sp, n, rif->rif_index); in mlxsw_sp_neigh_entry_create()
3745 u16 rif_index; in __mlxsw_sp_nexthop_eth_update() local
3747 rif_index = rif ? rif->rif_index : in __mlxsw_sp_nexthop_eth_update()
3748 mlxsw_sp->router->lb_crif->rif->rif_index; in __mlxsw_sp_nexthop_eth_update()
3752 adj_index, rif_index); in __mlxsw_sp_nexthop_eth_update()
4773 mlxsw_sp->router->lb_crif->rif->rif_index); in mlxsw_sp_adj_trap_entry_init()
6246 u16 rif_index = 0; in mlxsw_sp_fib_entry_op_local() local
6250 rif_index = rif->rif_index; in mlxsw_sp_fib_entry_op_local()
6258 rif_index); in mlxsw_sp_fib_entry_op_local()
8262 mlxsw_sp_router_rif_disable(mlxsw_sp, rif->rif_index); in mlxsw_sp_router_rif_gone_sync()
8362 static void mlxsw_sp_rif_index_free(struct mlxsw_sp *mlxsw_sp, u16 rif_index, in mlxsw_sp_rif_index_free() argument
8366 MLXSW_SP_ROUTER_GENALLOC_OFFSET + rif_index, rif_entries); in mlxsw_sp_rif_index_free()
8369 static struct mlxsw_sp_rif *mlxsw_sp_rif_alloc(size_t rif_size, u16 rif_index, in mlxsw_sp_rif_alloc() argument
8386 rif->rif_index = rif_index; in mlxsw_sp_rif_alloc()
8405 u16 rif_index) in mlxsw_sp_rif_by_index() argument
8407 return mlxsw_sp->router->rifs[rif_index]; in mlxsw_sp_rif_by_index()
8412 return rif->rif_index; in mlxsw_sp_rif_index()
8417 return lb_rif->common.rif_index; in mlxsw_sp_ipip_lb_rif_index()
8638 u16 rif_index; in mlxsw_sp_rif_create() local
8649 err = mlxsw_sp_rif_index_alloc(mlxsw_sp, &rif_index, rif_entries); in mlxsw_sp_rif_create()
8661 rif = mlxsw_sp_rif_alloc(ops->rif_size, rif_index, vr->id, crif); in mlxsw_sp_rif_create()
8667 mlxsw_sp->router->rifs[rif_index] = rif; in mlxsw_sp_rif_create()
8722 mlxsw_sp->router->rifs[rif_index] = NULL; in mlxsw_sp_rif_create()
8727 mlxsw_sp_rif_index_free(mlxsw_sp, rif_index, rif_entries); in mlxsw_sp_rif_create()
8742 u16 rif_index = rif->rif_index; in mlxsw_sp_rif_destroy() local
8764 mlxsw_sp->router->rifs[rif->rif_index] = NULL; in mlxsw_sp_rif_destroy()
8767 mlxsw_sp_rif_index_free(mlxsw_sp, rif_index, rif_entries); in mlxsw_sp_rif_destroy()
9419 static int mlxsw_sp_rif_vrrp_op(struct mlxsw_sp *mlxsw_sp, u16 rif_index, in mlxsw_sp_rif_vrrp_op() argument
9430 mlxsw_reg_ritr_rif_pack(ritr_pl, rif_index); in mlxsw_sp_rif_vrrp_op()
9460 err = mlxsw_sp_rif_vrrp_op(mlxsw_sp, rif->rif_index, in mlxsw_sp_rif_macvlan_add()
9491 mlxsw_sp_rif_vrrp_op(mlxsw_sp, rif->rif_index, macvlan_dev->dev_addr, in __mlxsw_sp_rif_macvlan_del()
9681 static int mlxsw_sp_rif_edit(struct mlxsw_sp *mlxsw_sp, u16 rif_index, in mlxsw_sp_rif_edit() argument
9687 mlxsw_reg_ritr_rif_pack(ritr_pl, rif_index); in mlxsw_sp_rif_edit()
9721 err = mlxsw_sp_rif_edit(mlxsw_sp, rif->rif_index, dev->dev_addr, in mlxsw_sp_router_port_change_event()
9747 netdev_dbg(dev, "Updated RIF=%d\n", rif->rif_index); in mlxsw_sp_router_port_change_event()
9752 mlxsw_sp_rif_edit(mlxsw_sp, rif->rif_index, rif->addr, rif->mtu, in mlxsw_sp_router_port_change_event()
10410 rif->rif_index, rif->vr_id, dev->mtu); in mlxsw_sp_rif_subport_op()
10483 return mlxsw_sp_fid_rfid_get(rif->mlxsw_sp, rif->rif_index); in mlxsw_sp_rif_subport_fid_get()
10502 mlxsw_reg_ritr_pack(ritr_pl, enable, type, rif->rif_index, rif->vr_id, in mlxsw_sp_rif_fid_op()
10677 mlxsw_reg_ritr_vlan_if_pack(ritr_pl, enable, rif->rif_index, rif->vr_id, in mlxsw_sp_rif_vlan_op()
10879 ul_rif->rif_index, ul_rif->vr_id, IP_MAX_MTU); in mlxsw_sp_rif_ipip_lb_ul_rif_op()
10893 u16 rif_index; in mlxsw_sp_ul_rif_create() local
10896 err = mlxsw_sp_rif_index_alloc(mlxsw_sp, &rif_index, rif_entries); in mlxsw_sp_ul_rif_create()
10902 ul_rif = mlxsw_sp_rif_alloc(sizeof(*ul_rif), rif_index, vr->id, in mlxsw_sp_ul_rif_create()
10909 mlxsw_sp->router->rifs[rif_index] = ul_rif; in mlxsw_sp_ul_rif_create()
10920 mlxsw_sp->router->rifs[rif_index] = NULL; in mlxsw_sp_ul_rif_create()
10923 mlxsw_sp_rif_index_free(mlxsw_sp, rif_index, rif_entries); in mlxsw_sp_ul_rif_create()
10931 u16 rif_index = ul_rif->rif_index; in mlxsw_sp_ul_rif_destroy() local
10935 mlxsw_sp->router->rifs[ul_rif->rif_index] = NULL; in mlxsw_sp_ul_rif_destroy()
10937 mlxsw_sp_rif_index_free(mlxsw_sp, rif_index, rif_entries); in mlxsw_sp_ul_rif_destroy()
10998 *ul_rif_index = ul_rif->rif_index; in mlxsw_sp_router_ul_rif_get()
11033 err = mlxsw_sp_rif_ipip_lb_op(lb_rif, 0, ul_rif->rif_index, true); in mlxsw_sp2_rif_ipip_lb_configure()
11038 lb_rif->ul_rif_id = ul_rif->rif_index; in mlxsw_sp2_rif_ipip_lb_configure()