Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fbc4a69b authored by Maor Gottlieb's avatar Maor Gottlieb Committed by David S. Miller
Browse files

net/mlx5e: Fix aRFS compilation dependency



en_arfs.o should be compiled only if both CONFIG_MLX5_CORE_EN
and CONFIG_RFS_ACCEL are enabled. en_arfs calls to rps_may_expire_flow
which is compiled only if CONFIG_RFS_ACCEL is defined.

Move en_arfs.o compilation dependency to be under CONFIG_MLX5_CORE_EN
and wrap the en_arfs.c content with ifdef of CONFIG_RFS_ACCEL.

Fixes: 1cabe6b0 ('net/mlx5e: Create aRFS flow tables')
Signed-off-by: default avatarMaor Gottlieb <maorg@mellanox.com>
Reported-by: default avatarAlexei Starovoitov <alexei.starovoitov@gmail.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 27540247
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@ mlx5_core-y := main.o cmd.o debugfs.o fw.o eq.o uar.o pagealloc.o \

mlx5_core-$(CONFIG_MLX5_CORE_EN) += wq.o eswitch.o \
		en_main.o en_fs.o en_ethtool.o en_tx.o en_rx.o \
		en_txrx.o en_clock.o vxlan.o en_tc.o
		en_txrx.o en_clock.o vxlan.o en_tc.o en_arfs.o

mlx5_core-$(CONFIG_MLX5_CORE_EN_DCB) +=  en_dcbnl.o
mlx5_core-$(CONFIG_RFS_ACCEL) +=  en_arfs.o
+3 −0
Original line number Diff line number Diff line
@@ -30,6 +30,8 @@
 * SOFTWARE.
 */

#ifdef CONFIG_RFS_ACCEL

#include <linux/hash.h>
#include <linux/mlx5/fs.h>
#include <linux/ip.h>
@@ -747,3 +749,4 @@ int mlx5e_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
	spin_unlock_bh(&arfs->arfs_lock);
	return arfs_rule->filter_id;
}
#endif