summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/Kconfig
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2018-03-11 09:45:49 +0200
committerDavid S. Miller <davem@davemloft.net>2018-03-12 11:07:16 -0400
commit99db5229db81e2b12d213ff7533fcaee1206e2f0 (patch)
tree95be9faea15cdcca31fcfe99da7cfa5d1973c345 /drivers/net/ethernet/mellanox/mlxsw/Kconfig
parent36a1c3bd4a1503ee5561d7c2714b6f0fce049089 (diff)
downloadlinux-99db5229db81e2b12d213ff7533fcaee1206e2f0.tar.bz2
mlxsw: spectrum: Don't depend on ip_gre and ip6_gre
mlxsw_spectrum supports offloading of a tc action mirred egress mirror to a gretap or an ip6gretap netdevice, which necessitates calls to functions defined in ip_gre, ip6_gre and ip6_tunnel modules. Previously this was enabled by introducing a hard dependency of MLXSW_SPECTRUM on NET_IPGRE and IPV6_GRE. However the rest of mlxsw is careful about picking which modules are absolutely required, and therefore the better approach is to make mlxsw_spectrum tolerant of absence of one or both of the GRE flavors. Hence rework the NET_IPGRE and IPV6_GRE dependencies to just guard matching modularity, and hide the corresponding code in spectrum_span.c in an #if IS_ENABLED. Mark mlxsw_sp_span_entry_tunnel_parms_common as maybe unused, to muffle warnings if neither GRE flavor is selected, which seems cleaner than introducing a composite #if. Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/Kconfig')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/Kconfig6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/Kconfig b/drivers/net/ethernet/mellanox/mlxsw/Kconfig
index 93d97b4676eb..f4d9c9975ac3 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/Kconfig
+++ b/drivers/net/ethernet/mellanox/mlxsw/Kconfig
@@ -76,12 +76,10 @@ config MLXSW_SPECTRUM
depends on PSAMPLE || PSAMPLE=n
depends on BRIDGE || BRIDGE=n
depends on IPV6 || IPV6=n
+ depends on NET_IPGRE || NET_IPGRE=n
+ depends on IPV6_GRE || IPV6_GRE=n
select PARMAN
select MLXFW
- depends on NET_IPGRE
- depends on !(MLXSW_CORE=y && NET_IPGRE=m)
- depends on IPV6_GRE
- depends on !(MLXSW_CORE=y && IPV6_GRE=m)
default m
---help---
This driver supports Mellanox Technologies Spectrum Ethernet