Lines Matching refs:mlxsw_sp_rt6

498 struct mlxsw_sp_rt6 {  struct
3497 struct mlxsw_sp_rt6 *mlxsw_sp_rt6; in mlxsw_sp_nexthop6_group_cmp() local
3502 list_for_each_entry(mlxsw_sp_rt6, &fib6_entry->rt6_list, list) { in mlxsw_sp_nexthop6_group_cmp()
3503 struct fib6_nh *fib6_nh = mlxsw_sp_rt6->rt->fib6_nh; in mlxsw_sp_nexthop6_group_cmp()
3573 struct mlxsw_sp_rt6 *mlxsw_sp_rt6; in mlxsw_sp_nexthop6_group_hash() local
3575 list_for_each_entry(mlxsw_sp_rt6, &fib6_entry->rt6_list, list) { in mlxsw_sp_nexthop6_group_hash()
3576 struct fib6_nh *fib6_nh = mlxsw_sp_rt6->rt->fib6_nh; in mlxsw_sp_nexthop6_group_hash()
4038 const struct mlxsw_sp_rt6 *mlxsw_sp_rt6);
4060 struct mlxsw_sp_rt6 *mlxsw_sp_rt6; in __mlxsw_sp_nexthop6_group_offload_refresh() local
4062 list_for_each_entry(mlxsw_sp_rt6, &fib6_entry->rt6_list, list) { in __mlxsw_sp_nexthop6_group_offload_refresh()
4063 struct fib6_nh *fib6_nh = mlxsw_sp_rt6->rt->fib6_nh; in __mlxsw_sp_nexthop6_group_offload_refresh()
4066 nh = mlxsw_sp_rt6_nexthop(nh_grp, mlxsw_sp_rt6); in __mlxsw_sp_nexthop6_group_offload_refresh()
5972 const struct mlxsw_sp_rt6 *mlxsw_sp_rt6) in mlxsw_sp_rt6_nexthop() argument
5979 struct fib6_info *rt = mlxsw_sp_rt6->rt; in mlxsw_sp_rt6_nexthop()
6087 struct mlxsw_sp_rt6 *mlxsw_sp_rt6; in mlxsw_sp_fib6_entry_hw_flags_set() local
6097 list_for_each_entry(mlxsw_sp_rt6, &fib6_entry->rt6_list, list) in mlxsw_sp_fib6_entry_hw_flags_set()
6098 fib6_info_hw_flags_set(mlxsw_sp_net(mlxsw_sp), mlxsw_sp_rt6->rt, in mlxsw_sp_fib6_entry_hw_flags_set()
6115 struct mlxsw_sp_rt6 *mlxsw_sp_rt6; in mlxsw_sp_fib6_entry_hw_flags_clear() local
6119 list_for_each_entry(mlxsw_sp_rt6, &fib6_entry->rt6_list, list) in mlxsw_sp_fib6_entry_hw_flags_clear()
6120 fib6_info_hw_flags_set(mlxsw_sp_net(mlxsw_sp), mlxsw_sp_rt6->rt, in mlxsw_sp_fib6_entry_hw_flags_clear()
6901 static struct mlxsw_sp_rt6 *mlxsw_sp_rt6_create(struct fib6_info *rt) in mlxsw_sp_rt6_create()
6903 struct mlxsw_sp_rt6 *mlxsw_sp_rt6; in mlxsw_sp_rt6_create() local
6905 mlxsw_sp_rt6 = kzalloc(sizeof(*mlxsw_sp_rt6), GFP_KERNEL); in mlxsw_sp_rt6_create()
6906 if (!mlxsw_sp_rt6) in mlxsw_sp_rt6_create()
6913 mlxsw_sp_rt6->rt = rt; in mlxsw_sp_rt6_create()
6916 return mlxsw_sp_rt6; in mlxsw_sp_rt6_create()
6930 static void mlxsw_sp_rt6_destroy(struct mlxsw_sp_rt6 *mlxsw_sp_rt6) in mlxsw_sp_rt6_destroy() argument
6932 struct fib6_nh *fib6_nh = mlxsw_sp_rt6->rt->fib6_nh; in mlxsw_sp_rt6_destroy()
6934 if (!mlxsw_sp_rt6->rt->nh) in mlxsw_sp_rt6_destroy()
6936 mlxsw_sp_rt6_release(mlxsw_sp_rt6->rt); in mlxsw_sp_rt6_destroy()
6937 kfree(mlxsw_sp_rt6); in mlxsw_sp_rt6_destroy()
6943 return list_first_entry(&fib6_entry->rt6_list, struct mlxsw_sp_rt6, in mlxsw_sp_fib6_entry_rt()
6947 static struct mlxsw_sp_rt6 *
6951 struct mlxsw_sp_rt6 *mlxsw_sp_rt6; in mlxsw_sp_fib6_entry_rt_find() local
6953 list_for_each_entry(mlxsw_sp_rt6, &fib6_entry->rt6_list, list) { in mlxsw_sp_fib6_entry_rt_find()
6954 if (mlxsw_sp_rt6->rt == rt) in mlxsw_sp_fib6_entry_rt_find()
6955 return mlxsw_sp_rt6; in mlxsw_sp_fib6_entry_rt_find()
7027 struct mlxsw_sp_rt6 *mlxsw_sp_rt6; in mlxsw_sp_nexthop6_group_info_init() local
7037 mlxsw_sp_rt6 = list_first_entry(&fib6_entry->rt6_list, in mlxsw_sp_nexthop6_group_info_init()
7038 struct mlxsw_sp_rt6, list); in mlxsw_sp_nexthop6_group_info_init()
7039 nhgi->gateway = mlxsw_sp_rt6_is_gateway(mlxsw_sp, mlxsw_sp_rt6->rt); in mlxsw_sp_nexthop6_group_info_init()
7042 struct fib6_info *rt = mlxsw_sp_rt6->rt; in mlxsw_sp_nexthop6_group_info_init()
7048 mlxsw_sp_rt6 = list_next_entry(mlxsw_sp_rt6, list); in mlxsw_sp_nexthop6_group_info_init()
7246 struct mlxsw_sp_rt6 *mlxsw_sp_rt6; in mlxsw_sp_fib6_entry_nexthop_add() local
7250 mlxsw_sp_rt6 = mlxsw_sp_rt6_create(rt_arr[i]); in mlxsw_sp_fib6_entry_nexthop_add()
7251 if (IS_ERR(mlxsw_sp_rt6)) { in mlxsw_sp_fib6_entry_nexthop_add()
7252 err = PTR_ERR(mlxsw_sp_rt6); in mlxsw_sp_fib6_entry_nexthop_add()
7256 list_add_tail(&mlxsw_sp_rt6->list, &fib6_entry->rt6_list); in mlxsw_sp_fib6_entry_nexthop_add()
7269 mlxsw_sp_rt6 = list_last_entry(&fib6_entry->rt6_list, in mlxsw_sp_fib6_entry_nexthop_add()
7270 struct mlxsw_sp_rt6, list); in mlxsw_sp_fib6_entry_nexthop_add()
7271 list_del(&mlxsw_sp_rt6->list); in mlxsw_sp_fib6_entry_nexthop_add()
7272 mlxsw_sp_rt6_destroy(mlxsw_sp_rt6); in mlxsw_sp_fib6_entry_nexthop_add()
7282 struct mlxsw_sp_rt6 *mlxsw_sp_rt6; in mlxsw_sp_fib6_entry_nexthop_del() local
7286 mlxsw_sp_rt6 = mlxsw_sp_fib6_entry_rt_find(fib6_entry, in mlxsw_sp_fib6_entry_nexthop_del()
7288 if (WARN_ON_ONCE(!mlxsw_sp_rt6)) in mlxsw_sp_fib6_entry_nexthop_del()
7292 list_del(&mlxsw_sp_rt6->list); in mlxsw_sp_fib6_entry_nexthop_del()
7293 mlxsw_sp_rt6_destroy(mlxsw_sp_rt6); in mlxsw_sp_fib6_entry_nexthop_del()
7357 struct mlxsw_sp_rt6 *mlxsw_sp_rt6, *tmp; in mlxsw_sp_fib6_entry_rt_destroy_all() local
7359 list_for_each_entry_safe(mlxsw_sp_rt6, tmp, &fib6_entry->rt6_list, in mlxsw_sp_fib6_entry_rt_destroy_all()
7362 list_del(&mlxsw_sp_rt6->list); in mlxsw_sp_fib6_entry_rt_destroy_all()
7363 mlxsw_sp_rt6_destroy(mlxsw_sp_rt6); in mlxsw_sp_fib6_entry_rt_destroy_all()
7374 struct mlxsw_sp_rt6 *mlxsw_sp_rt6; in mlxsw_sp_fib6_entry_create() local
7385 mlxsw_sp_rt6 = mlxsw_sp_rt6_create(rt_arr[i]); in mlxsw_sp_fib6_entry_create()
7386 if (IS_ERR(mlxsw_sp_rt6)) { in mlxsw_sp_fib6_entry_create()
7387 err = PTR_ERR(mlxsw_sp_rt6); in mlxsw_sp_fib6_entry_create()
7390 list_add_tail(&mlxsw_sp_rt6->list, &fib6_entry->rt6_list); in mlxsw_sp_fib6_entry_create()
7418 mlxsw_sp_rt6 = list_last_entry(&fib6_entry->rt6_list, in mlxsw_sp_fib6_entry_create()
7419 struct mlxsw_sp_rt6, list); in mlxsw_sp_fib6_entry_create()
7420 list_del(&mlxsw_sp_rt6->list); in mlxsw_sp_fib6_entry_create()
7421 mlxsw_sp_rt6_destroy(mlxsw_sp_rt6); in mlxsw_sp_fib6_entry_create()