@@ -442,7 +442,7 @@ struct mlxsw_sp_fib6_entry {
442
442
443
443
struct mlxsw_sp_rt6 {
444
444
struct list_head list ;
445
- struct rt6_info * rt ;
445
+ struct fib6_info * rt ;
446
446
};
447
447
448
448
struct mlxsw_sp_lpm_tree {
@@ -3834,7 +3834,7 @@ mlxsw_sp_rt6_nexthop(struct mlxsw_sp_nexthop_group *nh_grp,
3834
3834
3835
3835
for (i = 0 ; i < nh_grp -> count ; i ++ ) {
3836
3836
struct mlxsw_sp_nexthop * nh = & nh_grp -> nexthops [i ];
3837
- struct rt6_info * rt = mlxsw_sp_rt6 -> rt ;
3837
+ struct fib6_info * rt = mlxsw_sp_rt6 -> rt ;
3838
3838
3839
3839
if (nh -> rif && nh -> rif -> dev == rt -> fib6_nh .nh_dev &&
3840
3840
ipv6_addr_equal ((const struct in6_addr * ) & nh -> gw_addr ,
@@ -3920,7 +3920,7 @@ mlxsw_sp_fib6_entry_offload_unset(struct mlxsw_sp_fib_entry *fib_entry)
3920
3920
fib6_entry = container_of (fib_entry , struct mlxsw_sp_fib6_entry ,
3921
3921
common );
3922
3922
list_for_each_entry (mlxsw_sp_rt6 , & fib6_entry -> rt6_list , list ) {
3923
- struct rt6_info * rt = mlxsw_sp_rt6 -> rt ;
3923
+ struct fib6_info * rt = mlxsw_sp_rt6 -> rt ;
3924
3924
3925
3925
rt -> fib6_nh .nh_flags &= ~RTNH_F_OFFLOAD ;
3926
3926
}
@@ -4699,7 +4699,7 @@ static void mlxsw_sp_router_fib4_del(struct mlxsw_sp *mlxsw_sp,
4699
4699
mlxsw_sp_fib_node_put (mlxsw_sp , fib_node );
4700
4700
}
4701
4701
4702
- static bool mlxsw_sp_fib6_rt_should_ignore (const struct rt6_info * rt )
4702
+ static bool mlxsw_sp_fib6_rt_should_ignore (const struct fib6_info * rt )
4703
4703
{
4704
4704
/* Packets with link-local destination IP arriving to the router
4705
4705
* are trapped to the CPU, so no need to program specific routes
@@ -4721,7 +4721,7 @@ static bool mlxsw_sp_fib6_rt_should_ignore(const struct rt6_info *rt)
4721
4721
return false;
4722
4722
}
4723
4723
4724
- static struct mlxsw_sp_rt6 * mlxsw_sp_rt6_create (struct rt6_info * rt )
4724
+ static struct mlxsw_sp_rt6 * mlxsw_sp_rt6_create (struct fib6_info * rt )
4725
4725
{
4726
4726
struct mlxsw_sp_rt6 * mlxsw_sp_rt6 ;
4727
4727
@@ -4734,18 +4734,18 @@ static struct mlxsw_sp_rt6 *mlxsw_sp_rt6_create(struct rt6_info *rt)
4734
4734
* memory.
4735
4735
*/
4736
4736
mlxsw_sp_rt6 -> rt = rt ;
4737
- rt6_hold (rt );
4737
+ fib6_info_hold (rt );
4738
4738
4739
4739
return mlxsw_sp_rt6 ;
4740
4740
}
4741
4741
4742
4742
#if IS_ENABLED (CONFIG_IPV6 )
4743
- static void mlxsw_sp_rt6_release (struct rt6_info * rt )
4743
+ static void mlxsw_sp_rt6_release (struct fib6_info * rt )
4744
4744
{
4745
- rt6_release (rt );
4745
+ fib6_info_release (rt );
4746
4746
}
4747
4747
#else
4748
- static void mlxsw_sp_rt6_release (struct rt6_info * rt )
4748
+ static void mlxsw_sp_rt6_release (struct fib6_info * rt )
4749
4749
{
4750
4750
}
4751
4751
#endif
@@ -4756,13 +4756,13 @@ static void mlxsw_sp_rt6_destroy(struct mlxsw_sp_rt6 *mlxsw_sp_rt6)
4756
4756
kfree (mlxsw_sp_rt6 );
4757
4757
}
4758
4758
4759
- static bool mlxsw_sp_fib6_rt_can_mp (const struct rt6_info * rt )
4759
+ static bool mlxsw_sp_fib6_rt_can_mp (const struct fib6_info * rt )
4760
4760
{
4761
4761
/* RTF_CACHE routes are ignored */
4762
4762
return (rt -> rt6i_flags & (RTF_GATEWAY | RTF_ADDRCONF )) == RTF_GATEWAY ;
4763
4763
}
4764
4764
4765
- static struct rt6_info *
4765
+ static struct fib6_info *
4766
4766
mlxsw_sp_fib6_entry_rt (const struct mlxsw_sp_fib6_entry * fib6_entry )
4767
4767
{
4768
4768
return list_first_entry (& fib6_entry -> rt6_list , struct mlxsw_sp_rt6 ,
@@ -4771,15 +4771,15 @@ mlxsw_sp_fib6_entry_rt(const struct mlxsw_sp_fib6_entry *fib6_entry)
4771
4771
4772
4772
static struct mlxsw_sp_fib6_entry *
4773
4773
mlxsw_sp_fib6_node_mp_entry_find (const struct mlxsw_sp_fib_node * fib_node ,
4774
- const struct rt6_info * nrt , bool replace )
4774
+ const struct fib6_info * nrt , bool replace )
4775
4775
{
4776
4776
struct mlxsw_sp_fib6_entry * fib6_entry ;
4777
4777
4778
4778
if (!mlxsw_sp_fib6_rt_can_mp (nrt ) || replace )
4779
4779
return NULL ;
4780
4780
4781
4781
list_for_each_entry (fib6_entry , & fib_node -> entry_list , common .list ) {
4782
- struct rt6_info * rt = mlxsw_sp_fib6_entry_rt (fib6_entry );
4782
+ struct fib6_info * rt = mlxsw_sp_fib6_entry_rt (fib6_entry );
4783
4783
4784
4784
/* RT6_TABLE_LOCAL and RT6_TABLE_MAIN share the same
4785
4785
* virtual router.
@@ -4802,7 +4802,7 @@ mlxsw_sp_fib6_node_mp_entry_find(const struct mlxsw_sp_fib_node *fib_node,
4802
4802
4803
4803
static struct mlxsw_sp_rt6 *
4804
4804
mlxsw_sp_fib6_entry_rt_find (const struct mlxsw_sp_fib6_entry * fib6_entry ,
4805
- const struct rt6_info * rt )
4805
+ const struct fib6_info * rt )
4806
4806
{
4807
4807
struct mlxsw_sp_rt6 * mlxsw_sp_rt6 ;
4808
4808
@@ -4815,7 +4815,7 @@ mlxsw_sp_fib6_entry_rt_find(const struct mlxsw_sp_fib6_entry *fib6_entry,
4815
4815
}
4816
4816
4817
4817
static bool mlxsw_sp_nexthop6_ipip_type (const struct mlxsw_sp * mlxsw_sp ,
4818
- const struct rt6_info * rt ,
4818
+ const struct fib6_info * rt ,
4819
4819
enum mlxsw_sp_ipip_type * ret )
4820
4820
{
4821
4821
return rt -> fib6_nh .nh_dev &&
@@ -4825,7 +4825,7 @@ static bool mlxsw_sp_nexthop6_ipip_type(const struct mlxsw_sp *mlxsw_sp,
4825
4825
static int mlxsw_sp_nexthop6_type_init (struct mlxsw_sp * mlxsw_sp ,
4826
4826
struct mlxsw_sp_nexthop_group * nh_grp ,
4827
4827
struct mlxsw_sp_nexthop * nh ,
4828
- const struct rt6_info * rt )
4828
+ const struct fib6_info * rt )
4829
4829
{
4830
4830
const struct mlxsw_sp_ipip_ops * ipip_ops ;
4831
4831
struct mlxsw_sp_ipip_entry * ipip_entry ;
@@ -4870,7 +4870,7 @@ static void mlxsw_sp_nexthop6_type_fini(struct mlxsw_sp *mlxsw_sp,
4870
4870
static int mlxsw_sp_nexthop6_init (struct mlxsw_sp * mlxsw_sp ,
4871
4871
struct mlxsw_sp_nexthop_group * nh_grp ,
4872
4872
struct mlxsw_sp_nexthop * nh ,
4873
- const struct rt6_info * rt )
4873
+ const struct fib6_info * rt )
4874
4874
{
4875
4875
struct net_device * dev = rt -> fib6_nh .nh_dev ;
4876
4876
@@ -4897,7 +4897,7 @@ static void mlxsw_sp_nexthop6_fini(struct mlxsw_sp *mlxsw_sp,
4897
4897
}
4898
4898
4899
4899
static bool mlxsw_sp_rt6_is_gateway (const struct mlxsw_sp * mlxsw_sp ,
4900
- const struct rt6_info * rt )
4900
+ const struct fib6_info * rt )
4901
4901
{
4902
4902
return rt -> rt6i_flags & RTF_GATEWAY ||
4903
4903
mlxsw_sp_nexthop6_ipip_type (mlxsw_sp , rt , NULL );
@@ -4928,7 +4928,7 @@ mlxsw_sp_nexthop6_group_create(struct mlxsw_sp *mlxsw_sp,
4928
4928
nh_grp -> gateway = mlxsw_sp_rt6_is_gateway (mlxsw_sp , mlxsw_sp_rt6 -> rt );
4929
4929
nh_grp -> count = fib6_entry -> nrt6 ;
4930
4930
for (i = 0 ; i < nh_grp -> count ; i ++ ) {
4931
- struct rt6_info * rt = mlxsw_sp_rt6 -> rt ;
4931
+ struct fib6_info * rt = mlxsw_sp_rt6 -> rt ;
4932
4932
4933
4933
nh = & nh_grp -> nexthops [i ];
4934
4934
err = mlxsw_sp_nexthop6_init (mlxsw_sp , nh_grp , nh , rt );
@@ -5040,7 +5040,7 @@ mlxsw_sp_nexthop6_group_update(struct mlxsw_sp *mlxsw_sp,
5040
5040
static int
5041
5041
mlxsw_sp_fib6_entry_nexthop_add (struct mlxsw_sp * mlxsw_sp ,
5042
5042
struct mlxsw_sp_fib6_entry * fib6_entry ,
5043
- struct rt6_info * rt )
5043
+ struct fib6_info * rt )
5044
5044
{
5045
5045
struct mlxsw_sp_rt6 * mlxsw_sp_rt6 ;
5046
5046
int err ;
@@ -5068,7 +5068,7 @@ mlxsw_sp_fib6_entry_nexthop_add(struct mlxsw_sp *mlxsw_sp,
5068
5068
static void
5069
5069
mlxsw_sp_fib6_entry_nexthop_del (struct mlxsw_sp * mlxsw_sp ,
5070
5070
struct mlxsw_sp_fib6_entry * fib6_entry ,
5071
- struct rt6_info * rt )
5071
+ struct fib6_info * rt )
5072
5072
{
5073
5073
struct mlxsw_sp_rt6 * mlxsw_sp_rt6 ;
5074
5074
@@ -5084,7 +5084,7 @@ mlxsw_sp_fib6_entry_nexthop_del(struct mlxsw_sp *mlxsw_sp,
5084
5084
5085
5085
static void mlxsw_sp_fib6_entry_type_set (struct mlxsw_sp * mlxsw_sp ,
5086
5086
struct mlxsw_sp_fib_entry * fib_entry ,
5087
- const struct rt6_info * rt )
5087
+ const struct fib6_info * rt )
5088
5088
{
5089
5089
/* Packets hitting RTF_REJECT routes need to be discarded by the
5090
5090
* stack. We can rely on their destination device not having a
@@ -5118,7 +5118,7 @@ mlxsw_sp_fib6_entry_rt_destroy_all(struct mlxsw_sp_fib6_entry *fib6_entry)
5118
5118
static struct mlxsw_sp_fib6_entry *
5119
5119
mlxsw_sp_fib6_entry_create (struct mlxsw_sp * mlxsw_sp ,
5120
5120
struct mlxsw_sp_fib_node * fib_node ,
5121
- struct rt6_info * rt )
5121
+ struct fib6_info * rt )
5122
5122
{
5123
5123
struct mlxsw_sp_fib6_entry * fib6_entry ;
5124
5124
struct mlxsw_sp_fib_entry * fib_entry ;
@@ -5168,12 +5168,12 @@ static void mlxsw_sp_fib6_entry_destroy(struct mlxsw_sp *mlxsw_sp,
5168
5168
5169
5169
static struct mlxsw_sp_fib6_entry *
5170
5170
mlxsw_sp_fib6_node_entry_find (const struct mlxsw_sp_fib_node * fib_node ,
5171
- const struct rt6_info * nrt , bool replace )
5171
+ const struct fib6_info * nrt , bool replace )
5172
5172
{
5173
5173
struct mlxsw_sp_fib6_entry * fib6_entry , * fallback = NULL ;
5174
5174
5175
5175
list_for_each_entry (fib6_entry , & fib_node -> entry_list , common .list ) {
5176
- struct rt6_info * rt = mlxsw_sp_fib6_entry_rt (fib6_entry );
5176
+ struct fib6_info * rt = mlxsw_sp_fib6_entry_rt (fib6_entry );
5177
5177
5178
5178
if (rt -> rt6i_table -> tb6_id > nrt -> rt6i_table -> tb6_id )
5179
5179
continue ;
@@ -5198,7 +5198,7 @@ mlxsw_sp_fib6_node_list_insert(struct mlxsw_sp_fib6_entry *new6_entry,
5198
5198
bool replace )
5199
5199
{
5200
5200
struct mlxsw_sp_fib_node * fib_node = new6_entry -> common .fib_node ;
5201
- struct rt6_info * nrt = mlxsw_sp_fib6_entry_rt (new6_entry );
5201
+ struct fib6_info * nrt = mlxsw_sp_fib6_entry_rt (new6_entry );
5202
5202
struct mlxsw_sp_fib6_entry * fib6_entry ;
5203
5203
5204
5204
fib6_entry = mlxsw_sp_fib6_node_entry_find (fib_node , nrt , replace );
@@ -5213,7 +5213,7 @@ mlxsw_sp_fib6_node_list_insert(struct mlxsw_sp_fib6_entry *new6_entry,
5213
5213
struct mlxsw_sp_fib6_entry * last ;
5214
5214
5215
5215
list_for_each_entry (last , & fib_node -> entry_list , common .list ) {
5216
- struct rt6_info * rt = mlxsw_sp_fib6_entry_rt (last );
5216
+ struct fib6_info * rt = mlxsw_sp_fib6_entry_rt (last );
5217
5217
5218
5218
if (nrt -> rt6i_table -> tb6_id > rt -> rt6i_table -> tb6_id )
5219
5219
break ;
@@ -5268,7 +5268,7 @@ mlxsw_sp_fib6_node_entry_unlink(struct mlxsw_sp *mlxsw_sp,
5268
5268
5269
5269
static struct mlxsw_sp_fib6_entry *
5270
5270
mlxsw_sp_fib6_entry_lookup (struct mlxsw_sp * mlxsw_sp ,
5271
- const struct rt6_info * rt )
5271
+ const struct fib6_info * rt )
5272
5272
{
5273
5273
struct mlxsw_sp_fib6_entry * fib6_entry ;
5274
5274
struct mlxsw_sp_fib_node * fib_node ;
@@ -5287,7 +5287,7 @@ mlxsw_sp_fib6_entry_lookup(struct mlxsw_sp *mlxsw_sp,
5287
5287
return NULL ;
5288
5288
5289
5289
list_for_each_entry (fib6_entry , & fib_node -> entry_list , common .list ) {
5290
- struct rt6_info * iter_rt = mlxsw_sp_fib6_entry_rt (fib6_entry );
5290
+ struct fib6_info * iter_rt = mlxsw_sp_fib6_entry_rt (fib6_entry );
5291
5291
5292
5292
if (rt -> rt6i_table -> tb6_id == iter_rt -> rt6i_table -> tb6_id &&
5293
5293
rt -> rt6i_metric == iter_rt -> rt6i_metric &&
@@ -5316,7 +5316,7 @@ static void mlxsw_sp_fib6_entry_replace(struct mlxsw_sp *mlxsw_sp,
5316
5316
}
5317
5317
5318
5318
static int mlxsw_sp_router_fib6_add (struct mlxsw_sp * mlxsw_sp ,
5319
- struct rt6_info * rt , bool replace )
5319
+ struct fib6_info * rt , bool replace )
5320
5320
{
5321
5321
struct mlxsw_sp_fib6_entry * fib6_entry ;
5322
5322
struct mlxsw_sp_fib_node * fib_node ;
@@ -5373,7 +5373,7 @@ static int mlxsw_sp_router_fib6_add(struct mlxsw_sp *mlxsw_sp,
5373
5373
}
5374
5374
5375
5375
static void mlxsw_sp_router_fib6_del (struct mlxsw_sp * mlxsw_sp ,
5376
- struct rt6_info * rt )
5376
+ struct fib6_info * rt )
5377
5377
{
5378
5378
struct mlxsw_sp_fib6_entry * fib6_entry ;
5379
5379
struct mlxsw_sp_fib_node * fib_node ;
@@ -5836,7 +5836,7 @@ static void mlxsw_sp_router_fib6_event(struct mlxsw_sp_fib_event_work *fib_work,
5836
5836
fen6_info = container_of (info , struct fib6_entry_notifier_info ,
5837
5837
info );
5838
5838
fib_work -> fen6_info = * fen6_info ;
5839
- rt6_hold (fib_work -> fen6_info .rt );
5839
+ fib6_info_hold (fib_work -> fen6_info .rt );
5840
5840
break ;
5841
5841
}
5842
5842
}
0 commit comments