@@ -1295,6 +1295,25 @@ mlxsw_sp_ipip_entry_find_by_decap(struct mlxsw_sp *mlxsw_sp,
1295
1295
return NULL ;
1296
1296
}
1297
1297
1298
+ static bool mlxsw_sp_netdev_ipip_type (const struct mlxsw_sp * mlxsw_sp ,
1299
+ const struct net_device * dev ,
1300
+ enum mlxsw_sp_ipip_type * p_type )
1301
+ {
1302
+ struct mlxsw_sp_router * router = mlxsw_sp -> router ;
1303
+ const struct mlxsw_sp_ipip_ops * ipip_ops ;
1304
+ enum mlxsw_sp_ipip_type ipipt ;
1305
+
1306
+ for (ipipt = 0 ; ipipt < MLXSW_SP_IPIP_TYPE_MAX ; ++ ipipt ) {
1307
+ ipip_ops = router -> ipip_ops_arr [ipipt ];
1308
+ if (dev -> type == ipip_ops -> dev_type ) {
1309
+ if (p_type )
1310
+ * p_type = ipipt ;
1311
+ return true;
1312
+ }
1313
+ }
1314
+ return false;
1315
+ }
1316
+
1298
1317
struct mlxsw_sp_neigh_key {
1299
1318
struct neighbour * n ;
1300
1319
};
@@ -2785,25 +2804,6 @@ static void mlxsw_sp_nexthop_neigh_fini(struct mlxsw_sp *mlxsw_sp,
2785
2804
neigh_release (n );
2786
2805
}
2787
2806
2788
- static bool mlxsw_sp_netdev_ipip_type (const struct mlxsw_sp * mlxsw_sp ,
2789
- const struct net_device * dev ,
2790
- enum mlxsw_sp_ipip_type * p_type )
2791
- {
2792
- struct mlxsw_sp_router * router = mlxsw_sp -> router ;
2793
- const struct mlxsw_sp_ipip_ops * ipip_ops ;
2794
- enum mlxsw_sp_ipip_type ipipt ;
2795
-
2796
- for (ipipt = 0 ; ipipt < MLXSW_SP_IPIP_TYPE_MAX ; ++ ipipt ) {
2797
- ipip_ops = router -> ipip_ops_arr [ipipt ];
2798
- if (dev -> type == ipip_ops -> dev_type ) {
2799
- if (p_type )
2800
- * p_type = ipipt ;
2801
- return true;
2802
- }
2803
- }
2804
- return false;
2805
- }
2806
-
2807
2807
static int mlxsw_sp_nexthop_ipip_init (struct mlxsw_sp * mlxsw_sp ,
2808
2808
enum mlxsw_sp_ipip_type ipipt ,
2809
2809
struct mlxsw_sp_nexthop * nh ,
0 commit comments