Lines Matching refs:fib_entry

1072 			      struct mlxsw_sp_fib_entry *fib_entry,  in mlxsw_sp_fib_entry_decap_init()  argument
1083 ipip_entry->decap_fib_entry = fib_entry; in mlxsw_sp_fib_entry_decap_init()
1084 fib_entry->decap.ipip_entry = ipip_entry; in mlxsw_sp_fib_entry_decap_init()
1085 fib_entry->decap.tunnel_index = tunnel_index; in mlxsw_sp_fib_entry_decap_init()
1090 struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_fib_entry_decap_fini() argument
1093 fib_entry->decap.ipip_entry->decap_fib_entry = NULL; in mlxsw_sp_fib_entry_decap_fini()
1094 fib_entry->decap.ipip_entry = NULL; in mlxsw_sp_fib_entry_decap_fini()
1096 1, fib_entry->decap.tunnel_index); in mlxsw_sp_fib_entry_decap_fini()
1103 struct mlxsw_sp_fib_entry *fib_entry);
1109 struct mlxsw_sp_fib_entry *fib_entry = ipip_entry->decap_fib_entry; in mlxsw_sp_ipip_entry_demote_decap() local
1111 mlxsw_sp_fib_entry_decap_fini(mlxsw_sp, fib_entry); in mlxsw_sp_ipip_entry_demote_decap()
1112 fib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_TRAP; in mlxsw_sp_ipip_entry_demote_decap()
1114 mlxsw_sp_fib_entry_update(mlxsw_sp, fib_entry); in mlxsw_sp_ipip_entry_demote_decap()
1138 struct mlxsw_sp_fib_entry *fib_entry; in mlxsw_sp_ipip_entry_find_decap() local
1176 fib_entry = list_first_entry(&fib_node->entry_list, in mlxsw_sp_ipip_entry_find_decap()
1178 if (fib_entry->type != MLXSW_SP_FIB_ENTRY_TYPE_TRAP) in mlxsw_sp_ipip_entry_find_decap()
1181 return fib_entry; in mlxsw_sp_ipip_entry_find_decap()
2959 struct mlxsw_sp_fib_entry *fib_entry; in mlxsw_sp_adj_index_mass_update() local
2963 list_for_each_entry(fib_entry, &nh_grp->fib_list, nexthop_group_node) { in mlxsw_sp_adj_index_mass_update()
2964 if (fib == fib_entry->fib_node->fib) in mlxsw_sp_adj_index_mass_update()
2966 fib = fib_entry->fib_node->fib; in mlxsw_sp_adj_index_mass_update()
3081 const struct mlxsw_sp_fib_entry *fib_entry);
3087 struct mlxsw_sp_fib_entry *fib_entry; in mlxsw_sp_nexthop_fib_entries_update() local
3090 list_for_each_entry(fib_entry, &nh_grp->fib_list, nexthop_group_node) { in mlxsw_sp_nexthop_fib_entries_update()
3091 if (!mlxsw_sp_fib_node_entry_is_first(fib_entry->fib_node, in mlxsw_sp_nexthop_fib_entries_update()
3092 fib_entry)) in mlxsw_sp_nexthop_fib_entries_update()
3094 err = mlxsw_sp_fib_entry_update(mlxsw_sp, fib_entry); in mlxsw_sp_nexthop_fib_entries_update()
3102 mlxsw_sp_fib_entry_offload_refresh(struct mlxsw_sp_fib_entry *fib_entry,
3109 struct mlxsw_sp_fib_entry *fib_entry; in mlxsw_sp_nexthop_fib_entries_refresh() local
3111 list_for_each_entry(fib_entry, &nh_grp->fib_list, nexthop_group_node) { in mlxsw_sp_nexthop_fib_entries_refresh()
3112 if (!mlxsw_sp_fib_node_entry_is_first(fib_entry->fib_node, in mlxsw_sp_nexthop_fib_entries_refresh()
3113 fib_entry)) in mlxsw_sp_nexthop_fib_entries_refresh()
3115 mlxsw_sp_fib_entry_offload_refresh(fib_entry, op, 0); in mlxsw_sp_nexthop_fib_entries_refresh()
3761 struct mlxsw_sp_fib_entry *fib_entry, in mlxsw_sp_nexthop4_group_get() argument
3772 list_add_tail(&fib_entry->nexthop_group_node, &nh_grp->fib_list); in mlxsw_sp_nexthop4_group_get()
3773 fib_entry->nh_group = nh_grp; in mlxsw_sp_nexthop4_group_get()
3778 struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_nexthop4_group_put() argument
3780 struct mlxsw_sp_nexthop_group *nh_grp = fib_entry->nh_group; in mlxsw_sp_nexthop4_group_put()
3782 list_del(&fib_entry->nexthop_group_node); in mlxsw_sp_nexthop4_group_put()
3789 mlxsw_sp_fib4_entry_should_offload(const struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_fib4_entry_should_offload() argument
3793 fib4_entry = container_of(fib_entry, struct mlxsw_sp_fib4_entry, in mlxsw_sp_fib4_entry_should_offload()
3799 mlxsw_sp_fib_entry_should_offload(const struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_fib_entry_should_offload() argument
3801 struct mlxsw_sp_nexthop_group *nh_group = fib_entry->nh_group; in mlxsw_sp_fib_entry_should_offload()
3803 switch (fib_entry->fib_node->fib->proto) { in mlxsw_sp_fib_entry_should_offload()
3805 if (!mlxsw_sp_fib4_entry_should_offload(fib_entry)) in mlxsw_sp_fib_entry_should_offload()
3812 switch (fib_entry->type) { in mlxsw_sp_fib_entry_should_offload()
3845 mlxsw_sp_fib4_entry_offload_set(struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_fib4_entry_offload_set() argument
3847 struct mlxsw_sp_nexthop_group *nh_grp = fib_entry->nh_group; in mlxsw_sp_fib4_entry_offload_set()
3850 if (fib_entry->type == MLXSW_SP_FIB_ENTRY_TYPE_LOCAL || in mlxsw_sp_fib4_entry_offload_set()
3851 fib_entry->type == MLXSW_SP_FIB_ENTRY_TYPE_IPIP_DECAP) { in mlxsw_sp_fib4_entry_offload_set()
3867 mlxsw_sp_fib4_entry_offload_unset(struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_fib4_entry_offload_unset() argument
3869 struct mlxsw_sp_nexthop_group *nh_grp = fib_entry->nh_group; in mlxsw_sp_fib4_entry_offload_unset()
3883 mlxsw_sp_fib6_entry_offload_set(struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_fib6_entry_offload_set() argument
3888 fib6_entry = container_of(fib_entry, struct mlxsw_sp_fib6_entry, in mlxsw_sp_fib6_entry_offload_set()
3891 if (fib_entry->type == MLXSW_SP_FIB_ENTRY_TYPE_LOCAL) { in mlxsw_sp_fib6_entry_offload_set()
3898 struct mlxsw_sp_nexthop_group *nh_grp = fib_entry->nh_group; in mlxsw_sp_fib6_entry_offload_set()
3910 mlxsw_sp_fib6_entry_offload_unset(struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_fib6_entry_offload_unset() argument
3915 fib6_entry = container_of(fib_entry, struct mlxsw_sp_fib6_entry, in mlxsw_sp_fib6_entry_offload_unset()
3924 static void mlxsw_sp_fib_entry_offload_set(struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_fib_entry_offload_set() argument
3926 switch (fib_entry->fib_node->fib->proto) { in mlxsw_sp_fib_entry_offload_set()
3928 mlxsw_sp_fib4_entry_offload_set(fib_entry); in mlxsw_sp_fib_entry_offload_set()
3931 mlxsw_sp_fib6_entry_offload_set(fib_entry); in mlxsw_sp_fib_entry_offload_set()
3937 mlxsw_sp_fib_entry_offload_unset(struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_fib_entry_offload_unset() argument
3939 switch (fib_entry->fib_node->fib->proto) { in mlxsw_sp_fib_entry_offload_unset()
3941 mlxsw_sp_fib4_entry_offload_unset(fib_entry); in mlxsw_sp_fib_entry_offload_unset()
3944 mlxsw_sp_fib6_entry_offload_unset(fib_entry); in mlxsw_sp_fib_entry_offload_unset()
3950 mlxsw_sp_fib_entry_offload_refresh(struct mlxsw_sp_fib_entry *fib_entry, in mlxsw_sp_fib_entry_offload_refresh() argument
3955 return mlxsw_sp_fib_entry_offload_unset(fib_entry); in mlxsw_sp_fib_entry_offload_refresh()
3959 if (mlxsw_sp_fib_entry_should_offload(fib_entry)) in mlxsw_sp_fib_entry_offload_refresh()
3960 mlxsw_sp_fib_entry_offload_set(fib_entry); in mlxsw_sp_fib_entry_offload_refresh()
3962 mlxsw_sp_fib_entry_offload_unset(fib_entry); in mlxsw_sp_fib_entry_offload_refresh()
3971 const struct mlxsw_sp_fib_entry *fib_entry, in mlxsw_sp_fib_entry_ralue_pack() argument
3974 struct mlxsw_sp_fib *fib = fib_entry->fib_node->fib; in mlxsw_sp_fib_entry_ralue_pack()
3982 p_dip = (u32 *) fib_entry->fib_node->key.addr; in mlxsw_sp_fib_entry_ralue_pack()
3984 fib_entry->fib_node->key.prefix_len, in mlxsw_sp_fib_entry_ralue_pack()
3989 fib_entry->fib_node->key.prefix_len, in mlxsw_sp_fib_entry_ralue_pack()
3990 fib_entry->fib_node->key.addr); in mlxsw_sp_fib_entry_ralue_pack()
3996 struct mlxsw_sp_fib_entry *fib_entry, in mlxsw_sp_fib_entry_op_remote() argument
4009 if (mlxsw_sp_fib_entry_should_offload(fib_entry)) { in mlxsw_sp_fib_entry_op_remote()
4011 adjacency_index = fib_entry->nh_group->adj_index; in mlxsw_sp_fib_entry_op_remote()
4012 ecmp_size = fib_entry->nh_group->ecmp_size; in mlxsw_sp_fib_entry_op_remote()
4018 mlxsw_sp_fib_entry_ralue_pack(ralue_pl, fib_entry, op); in mlxsw_sp_fib_entry_op_remote()
4025 struct mlxsw_sp_fib_entry *fib_entry, in mlxsw_sp_fib_entry_op_local() argument
4028 struct mlxsw_sp_rif *rif = fib_entry->nh_group->nh_rif; in mlxsw_sp_fib_entry_op_local()
4034 if (mlxsw_sp_fib_entry_should_offload(fib_entry)) { in mlxsw_sp_fib_entry_op_local()
4042 mlxsw_sp_fib_entry_ralue_pack(ralue_pl, fib_entry, op); in mlxsw_sp_fib_entry_op_local()
4049 struct mlxsw_sp_fib_entry *fib_entry, in mlxsw_sp_fib_entry_op_trap() argument
4054 mlxsw_sp_fib_entry_ralue_pack(ralue_pl, fib_entry, op); in mlxsw_sp_fib_entry_op_trap()
4061 struct mlxsw_sp_fib_entry *fib_entry, in mlxsw_sp_fib_entry_op_ipip_decap() argument
4064 struct mlxsw_sp_ipip_entry *ipip_entry = fib_entry->decap.ipip_entry; in mlxsw_sp_fib_entry_op_ipip_decap()
4072 fib_entry->decap.tunnel_index); in mlxsw_sp_fib_entry_op_ipip_decap()
4076 struct mlxsw_sp_fib_entry *fib_entry, in __mlxsw_sp_fib_entry_op() argument
4079 switch (fib_entry->type) { in __mlxsw_sp_fib_entry_op()
4081 return mlxsw_sp_fib_entry_op_remote(mlxsw_sp, fib_entry, op); in __mlxsw_sp_fib_entry_op()
4083 return mlxsw_sp_fib_entry_op_local(mlxsw_sp, fib_entry, op); in __mlxsw_sp_fib_entry_op()
4085 return mlxsw_sp_fib_entry_op_trap(mlxsw_sp, fib_entry, op); in __mlxsw_sp_fib_entry_op()
4088 fib_entry, op); in __mlxsw_sp_fib_entry_op()
4094 struct mlxsw_sp_fib_entry *fib_entry, in mlxsw_sp_fib_entry_op() argument
4097 int err = __mlxsw_sp_fib_entry_op(mlxsw_sp, fib_entry, op); in mlxsw_sp_fib_entry_op()
4099 mlxsw_sp_fib_entry_offload_refresh(fib_entry, op, err); in mlxsw_sp_fib_entry_op()
4105 struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_fib_entry_update() argument
4107 return mlxsw_sp_fib_entry_op(mlxsw_sp, fib_entry, in mlxsw_sp_fib_entry_update()
4112 struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_fib_entry_del() argument
4114 return mlxsw_sp_fib_entry_op(mlxsw_sp, fib_entry, in mlxsw_sp_fib_entry_del()
4121 struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_fib4_entry_type_set() argument
4133 fib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_IPIP_DECAP; in mlxsw_sp_fib4_entry_type_set()
4135 fib_entry, in mlxsw_sp_fib4_entry_type_set()
4140 fib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_TRAP; in mlxsw_sp_fib4_entry_type_set()
4149 fib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_LOCAL; in mlxsw_sp_fib4_entry_type_set()
4153 fib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_REMOTE; in mlxsw_sp_fib4_entry_type_set()
4155 fib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_LOCAL; in mlxsw_sp_fib4_entry_type_set()
4168 struct mlxsw_sp_fib_entry *fib_entry; in mlxsw_sp_fib4_entry_create() local
4174 fib_entry = &fib4_entry->common; in mlxsw_sp_fib4_entry_create()
4176 err = mlxsw_sp_fib4_entry_type_set(mlxsw_sp, fen_info, fib_entry); in mlxsw_sp_fib4_entry_create()
4180 err = mlxsw_sp_nexthop4_group_get(mlxsw_sp, fib_entry, fen_info->fi); in mlxsw_sp_fib4_entry_create()
4189 fib_entry->fib_node = fib_node; in mlxsw_sp_fib4_entry_create()
4299 const struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_fib_node_entry_is_first() argument
4302 struct mlxsw_sp_fib_entry, list) == fib_entry; in mlxsw_sp_fib_node_entry_is_first()
4541 struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_fib_node_entry_add() argument
4543 struct mlxsw_sp_fib_node *fib_node = fib_entry->fib_node; in mlxsw_sp_fib_node_entry_add()
4545 if (!mlxsw_sp_fib_node_entry_is_first(fib_node, fib_entry)) in mlxsw_sp_fib_node_entry_add()
4553 struct mlxsw_sp_fib_entry *n = list_next_entry(fib_entry, list); in mlxsw_sp_fib_node_entry_add()
4558 return mlxsw_sp_fib_entry_update(mlxsw_sp, fib_entry); in mlxsw_sp_fib_node_entry_add()
4562 struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_fib_node_entry_del() argument
4564 struct mlxsw_sp_fib_node *fib_node = fib_entry->fib_node; in mlxsw_sp_fib_node_entry_del()
4566 if (!mlxsw_sp_fib_node_entry_is_first(fib_node, fib_entry)) in mlxsw_sp_fib_node_entry_del()
4571 struct mlxsw_sp_fib_entry *n = list_next_entry(fib_entry, list); in mlxsw_sp_fib_node_entry_del()
4575 mlxsw_sp_fib_entry_offload_refresh(fib_entry, op, 0); in mlxsw_sp_fib_node_entry_del()
4579 mlxsw_sp_fib_entry_del(mlxsw_sp, fib_entry); in mlxsw_sp_fib_node_entry_del()
4989 struct mlxsw_sp_fib_entry *fib_entry) in mlxsw_sp_nexthop6_group_put() argument
4991 struct mlxsw_sp_nexthop_group *nh_grp = fib_entry->nh_group; in mlxsw_sp_nexthop6_group_put()
4993 list_del(&fib_entry->nexthop_group_node); in mlxsw_sp_nexthop6_group_put()
5081 struct mlxsw_sp_fib_entry *fib_entry, in mlxsw_sp_fib6_entry_type_set() argument
5091 fib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_TRAP; in mlxsw_sp_fib6_entry_type_set()
5093 fib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_LOCAL; in mlxsw_sp_fib6_entry_type_set()
5095 fib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_REMOTE; in mlxsw_sp_fib6_entry_type_set()
5097 fib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_LOCAL; in mlxsw_sp_fib6_entry_type_set()
5119 struct mlxsw_sp_fib_entry *fib_entry; in mlxsw_sp_fib6_entry_create() local
5126 fib_entry = &fib6_entry->common; in mlxsw_sp_fib6_entry_create()
5134 mlxsw_sp_fib6_entry_type_set(mlxsw_sp, fib_entry, mlxsw_sp_rt6->rt); in mlxsw_sp_fib6_entry_create()
5143 fib_entry->fib_node = fib_node; in mlxsw_sp_fib6_entry_create()