Skip to content

Commit fbc4a69

Browse files
Maor Gottliebdavem330
authored andcommitted
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: 1cabe6b ('net/mlx5e: Create aRFS flow tables') Signed-off-by: Maor Gottlieb <maorg@mellanox.com> Reported-by: Alexei Starovoitov <alexei.starovoitov@gmail.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 2754024 commit fbc4a69

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎drivers/net/ethernet/mellanox/mlx5/core/Makefile‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ mlx5_core-y := main.o cmd.o debugfs.o fw.o eq.o uar.o pagealloc.o \
66

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

1111
mlx5_core-$(CONFIG_MLX5_CORE_EN_DCB) += en_dcbnl.o
12-
mlx5_core-$(CONFIG_RFS_ACCEL) += en_arfs.o

‎drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
* SOFTWARE.
3131
*/
3232

33+
#ifdef CONFIG_RFS_ACCEL
34+
3335
#include <linux/hash.h>
3436
#include <linux/mlx5/fs.h>
3537
#include <linux/ip.h>
@@ -747,3 +749,4 @@ int mlx5e_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
747749
spin_unlock_bh(&arfs->arfs_lock);
748750
return arfs_rule->filter_id;
749751
}
752+
#endif

0 commit comments

Comments
 (0)