|
|
d8f823 |
From bbbbc3a6f49588fbf5e36c22542b2701921a467f Mon Sep 17 00:00:00 2001
|
|
|
d8f823 |
From: Alaa Hleihel <ahleihel@redhat.com>
|
|
|
d8f823 |
Date: Sun, 10 May 2020 15:04:35 -0400
|
|
|
d8f823 |
Subject: [PATCH 111/312] [netdrv] net/mlx5e: TC, Stub out ipv6 tun create
|
|
|
d8f823 |
header function
|
|
|
d8f823 |
|
|
|
d8f823 |
Message-id: <20200510150452.10307-71-ahleihel@redhat.com>
|
|
|
d8f823 |
Patchwork-id: 306694
|
|
|
d8f823 |
Patchwork-instance: patchwork
|
|
|
d8f823 |
O-Subject: [RHEL8.3 BZ 1789380 v2 70/87] net/mlx5e: TC, Stub out ipv6 tun create header function
|
|
|
d8f823 |
Bugzilla: 1789380
|
|
|
d8f823 |
RH-Acked-by: Kamal Heib <kheib@redhat.com>
|
|
|
d8f823 |
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
|
|
|
d8f823 |
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
|
|
|
d8f823 |
RH-Acked-by: Jonathan Toppins <jtoppins@redhat.com>
|
|
|
d8f823 |
|
|
|
d8f823 |
Bugzilla: http://bugzilla.redhat.com/1789380
|
|
|
d8f823 |
Upstream: v5.5-rc1
|
|
|
d8f823 |
|
|
|
d8f823 |
commit e689e998e102100bdf7991763d4c244704846f2d
|
|
|
d8f823 |
Author: Saeed Mahameed <saeedm@mellanox.com>
|
|
|
d8f823 |
Date: Fri Nov 1 15:38:30 2019 -0700
|
|
|
d8f823 |
|
|
|
d8f823 |
net/mlx5e: TC, Stub out ipv6 tun create header function
|
|
|
d8f823 |
|
|
|
d8f823 |
Improve mlx5e_route_lookup_ipv6 function structure by avoiding #ifdef then
|
|
|
d8f823 |
return -EOPNOTSUPP in the middle of the function code.
|
|
|
d8f823 |
|
|
|
d8f823 |
To do so, we stub out mlx5e_tc_tun_create_header_ipv6 which is the only
|
|
|
d8f823 |
caller of this helper function to avoid calling it altogether
|
|
|
d8f823 |
when ipv6 is compiled out, which should also cleanup some compiler
|
|
|
d8f823 |
warnings of unused variables.
|
|
|
d8f823 |
|
|
|
d8f823 |
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
|
|
|
d8f823 |
Reviewed-by: Eli Cohen <eli@mellanox.com>
|
|
|
d8f823 |
Reviewed-by: Roi Dayan <roid@mellanox.com>
|
|
|
d8f823 |
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
|
|
|
d8f823 |
|
|
|
d8f823 |
Signed-off-by: Alaa Hleihel <ahleihel@redhat.com>
|
|
|
d8f823 |
Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
|
|
|
d8f823 |
---
|
|
|
d8f823 |
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 4 ----
|
|
|
d8f823 |
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h | 7 +++++++
|
|
|
d8f823 |
2 files changed, 7 insertions(+), 4 deletions(-)
|
|
|
d8f823 |
|
|
|
d8f823 |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
|
|
|
d8f823 |
index 92559a758d07..8a9791473f57 100644
|
|
|
d8f823 |
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
|
|
|
d8f823 |
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
|
|
|
d8f823 |
@@ -141,7 +141,6 @@ static int mlx5e_route_lookup_ipv6(struct mlx5e_priv *priv,
|
|
|
d8f823 |
struct dst_entry *dst;
|
|
|
d8f823 |
struct neighbour *n;
|
|
|
d8f823 |
|
|
|
d8f823 |
-#if IS_ENABLED(CONFIG_INET) && IS_ENABLED(CONFIG_IPV6)
|
|
|
d8f823 |
int ret;
|
|
|
d8f823 |
|
|
|
d8f823 |
dst = ipv6_stub->ipv6_dst_lookup_flow(dev_net(mirred_dev), NULL, fl6,
|
|
|
d8f823 |
@@ -157,9 +156,6 @@ static int mlx5e_route_lookup_ipv6(struct mlx5e_priv *priv,
|
|
|
d8f823 |
dst_release(dst);
|
|
|
d8f823 |
return ret;
|
|
|
d8f823 |
}
|
|
|
d8f823 |
-#else
|
|
|
d8f823 |
- return -EOPNOTSUPP;
|
|
|
d8f823 |
-#endif
|
|
|
d8f823 |
|
|
|
d8f823 |
n = dst_neigh_lookup(dst, &fl6->daddr);
|
|
|
d8f823 |
dst_release(dst);
|
|
|
d8f823 |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h
|
|
|
d8f823 |
index c362b9225dc2..6f9a78c85ffd 100644
|
|
|
d8f823 |
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h
|
|
|
d8f823 |
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h
|
|
|
d8f823 |
@@ -58,9 +58,16 @@ int mlx5e_tc_tun_create_header_ipv4(struct mlx5e_priv *priv,
|
|
|
d8f823 |
struct net_device *mirred_dev,
|
|
|
d8f823 |
struct mlx5e_encap_entry *e);
|
|
|
d8f823 |
|
|
|
d8f823 |
+#if IS_ENABLED(CONFIG_INET) && IS_ENABLED(CONFIG_IPV6)
|
|
|
d8f823 |
int mlx5e_tc_tun_create_header_ipv6(struct mlx5e_priv *priv,
|
|
|
d8f823 |
struct net_device *mirred_dev,
|
|
|
d8f823 |
struct mlx5e_encap_entry *e);
|
|
|
d8f823 |
+#else
|
|
|
d8f823 |
+static inline int
|
|
|
d8f823 |
+mlx5e_tc_tun_create_header_ipv6(struct mlx5e_priv *priv,
|
|
|
d8f823 |
+ struct net_device *mirred_dev,
|
|
|
d8f823 |
+ struct mlx5e_encap_entry *e) { return -EOPNOTSUPP; }
|
|
|
d8f823 |
+#endif
|
|
|
d8f823 |
|
|
|
d8f823 |
bool mlx5e_tc_tun_device_to_offload(struct mlx5e_priv *priv,
|
|
|
d8f823 |
struct net_device *netdev);
|
|
|
d8f823 |
--
|
|
|
d8f823 |
2.13.6
|
|
|
d8f823 |
|