summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
diff options
context:
space:
mode:
authorSaeed Mahameed <saeedm@mellanox.com>2019-11-01 15:38:30 -0700
committerSaeed Mahameed <saeedm@mellanox.com>2019-11-22 13:18:20 -0800
commite689e998e102100bdf7991763d4c244704846f2d (patch)
treeb7166c2ae912bc4abdbcc3c04cf2a7507fcd8794 /drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
parentb6d12238459d2f3c1140689c8fbb1bf1e0fe1927 (diff)
net/mlx5e: TC, Stub out ipv6 tun create header function
Improve mlx5e_route_lookup_ipv6 function structure by avoiding #ifdef then return -EOPNOTSUPP in the middle of the function code. To do so, we stub out mlx5e_tc_tun_create_header_ipv6 which is the only caller of this helper function to avoid calling it altogether when ipv6 is compiled out, which should also cleanup some compiler warnings of unused variables. Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Reviewed-by: Eli Cohen <eli@mellanox.com> Reviewed-by: Roi Dayan <roid@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
index 5316cedd78bf..fe227713fe94 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
@@ -141,7 +141,6 @@ static int mlx5e_route_lookup_ipv6(struct mlx5e_priv *priv,
struct dst_entry *dst;
struct neighbour *n;
-#if IS_ENABLED(CONFIG_INET) && IS_ENABLED(CONFIG_IPV6)
int ret;
ret = ipv6_stub->ipv6_dst_lookup(dev_net(mirred_dev), NULL, &dst,
@@ -157,9 +156,6 @@ static int mlx5e_route_lookup_ipv6(struct mlx5e_priv *priv,
dst_release(dst);
return ret;
}
-#else
- return -EOPNOTSUPP;
-#endif
n = dst_neigh_lookup(dst, &fl6->daddr);
dst_release(dst);