]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mlx5: fix psample_sample_packet link error
authorArnd Bergmann <arnd@arndb.de>
Mon, 8 Nov 2021 11:10:32 +0000 (12:10 +0100)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 3 Dec 2021 00:53:07 +0000 (16:53 -0800)
When PSAMPLE is a loadable module, built-in drivers cannot use it:

aarch64-linux-ld: drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.o: in function `mlx5e_tc_sample_skb':
sample.c:(.text+0xd68): undefined reference to `psample_sample_packet'

Add the same dependency here that is used for MLXSW

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/Kconfig

index 92056452a9e3dbffeafb1fa447611cf25c49e8be..4ba1a78c651514aba12212d5ada38c1b73ef1486 100644 (file)
@@ -115,6 +115,7 @@ config MLX5_TC_CT
 config MLX5_TC_SAMPLE
        bool "MLX5 TC sample offload support"
        depends on MLX5_CLS_ACT
+       depends on PSAMPLE=y || PSAMPLE=n || MLX5_CORE=m
        default y
        help
          Say Y here if you want to support offloading sample rules via tc