summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2020-11-13 19:05:54 +0300
committerJakub Kicinski <kuba@kernel.org>2020-11-15 03:55:04 +0300
commit4dd38da54aa979f41e928ab10656896115697910 (patch)
treed30ac8b7b07e5341ef5422c31a7c6cfcdfd8592a /drivers/net
parent7ba7bc55cf2dfbf5d53cf8ad9cb8bddfa3ebfc13 (diff)
downloadlinux-4dd38da54aa979f41e928ab10656896115697910.tar.xz
mlxsw: spectrum_router: Pass nexthop netdev to mlxsw_sp_nexthop6_type_init()
Instead of passing the route and resolving the nexthop netdev from it, pass the nexthop netdev directly. This will later allow us to consolidate code paths between IPv4 and IPv6 code. Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index 7c7caea59d57..3bb93865f7b0 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -5355,11 +5355,10 @@ static bool mlxsw_sp_nexthop6_ipip_type(const struct mlxsw_sp *mlxsw_sp,
static int mlxsw_sp_nexthop6_type_init(struct mlxsw_sp *mlxsw_sp,
struct mlxsw_sp_nexthop_group *nh_grp,
struct mlxsw_sp_nexthop *nh,
- const struct fib6_info *rt)
+ const struct net_device *dev)
{
const struct mlxsw_sp_ipip_ops *ipip_ops;
struct mlxsw_sp_ipip_entry *ipip_entry;
- struct net_device *dev = rt->fib6_nh->fib_nh_dev;
struct mlxsw_sp_rif *rif;
int err;
@@ -5417,7 +5416,7 @@ static int mlxsw_sp_nexthop6_init(struct mlxsw_sp *mlxsw_sp,
return 0;
nh->ifindex = dev->ifindex;
- return mlxsw_sp_nexthop6_type_init(mlxsw_sp, nh_grp, nh, rt);
+ return mlxsw_sp_nexthop6_type_init(mlxsw_sp, nh_grp, nh, dev);
}
static void mlxsw_sp_nexthop6_fini(struct mlxsw_sp *mlxsw_sp,