• Petr Machata's avatar
    mlxsw: spectrum: Don't depend on ip_gre and ip6_gre · 99db5229
    Petr Machata authored
    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: default avatarPetr Machata <petrm@mellanox.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    99db5229
Kconfig 3.2 KB