• YueHaibing's avatar
    net/mlx5e: Fix build error without IPV6 · 5f9fc332
    YueHaibing authored
    If IPV6 is not set and CONFIG_MLX5_ESWITCH is y,
    building fails:
    
    drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c:322:5: error: redefinition of mlx5e_tc_tun_create_header_ipv6
     int mlx5e_tc_tun_create_header_ipv6(struct mlx5e_priv *priv,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c:7:0:
    drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h:67:1: note: previous definition of mlx5e_tc_tun_create_header_ipv6 was here
     mlx5e_tc_tun_create_header_ipv6(struct mlx5e_priv *priv,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Use #ifdef to guard this, also move mlx5e_route_lookup_ipv6
    to cleanup unused warning.
    Reported-by: default avatarHulk Robot <hulkci@huawei.com>
    Fixes: e689e998 ("net/mlx5e: TC, Stub out ipv6 tun create header function")
    Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
    Acked-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5f9fc332
tc_tun.c 14.1 KB