summaryrefslogtreecommitdiff
path: root/drivers/net/netdevsim
diff options
context:
space:
mode:
authorAmit Cohen <amcohen@nvidia.com>2021-02-01 22:47:54 +0300
committerJakub Kicinski <kuba@kernel.org>2021-02-03 04:45:59 +0300
commitefc42879ec9ea85d5d17019536f2f8c5da455498 (patch)
tree7d813fde7ad46d5fe360c246b779267f07174a81 /drivers/net/netdevsim
parentfbaca8f895a6855b0b442227bc21da2d4cf77a01 (diff)
downloadlinux-efc42879ec9ea85d5d17019536f2f8c5da455498.tar.xz
net: Do not call fib6_info_hw_flags_set() when IPv6 is disabled
With the next patch mlxsw and netdevsim will fail in compilation if CONFIG_IPV6 is disabled. Do not call fib6_info_hw_flags_set() when IPv6 is disabled. Signed-off-by: Amit Cohen <amcohen@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/netdevsim')
-rw-r--r--drivers/net/netdevsim/fib.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/netdevsim/fib.c b/drivers/net/netdevsim/fib.c
index cb68f0cc6740..1779146926a5 100644
--- a/drivers/net/netdevsim/fib.c
+++ b/drivers/net/netdevsim/fib.c
@@ -585,6 +585,7 @@ err_fib6_rt_nh_del:
return err;
}
+#if IS_ENABLED(CONFIG_IPV6)
static void nsim_fib6_rt_hw_flags_set(struct nsim_fib_data *data,
const struct nsim_fib6_rt *fib6_rt,
bool trap)
@@ -595,6 +596,13 @@ static void nsim_fib6_rt_hw_flags_set(struct nsim_fib_data *data,
list_for_each_entry(fib6_rt_nh, &fib6_rt->nh_list, list)
fib6_info_hw_flags_set(net, fib6_rt_nh->rt, false, trap);
}
+#else
+static void nsim_fib6_rt_hw_flags_set(struct nsim_fib_data *data,
+ const struct nsim_fib6_rt *fib6_rt,
+ bool trap)
+{
+}
+#endif
static int nsim_fib6_rt_add(struct nsim_fib_data *data,
struct nsim_fib6_rt *fib6_rt)