From patchwork Wed May 4 12:26:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102383 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp151831qge; Wed, 4 May 2016 05:26:56 -0700 (PDT) X-Received: by 10.98.70.144 with SMTP id o16mr11702648pfi.26.1462364815892; Wed, 04 May 2016 05:26:55 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c188si4649716pfb.47.2016.05.04.05.26.55; Wed, 04 May 2016 05:26:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752837AbcEDM0s (ORCPT + 29 others); Wed, 4 May 2016 08:26:48 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:64032 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750862AbcEDM0p (ORCPT ); Wed, 4 May 2016 08:26:45 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0MSmoL-1b7SVl33ED-00RtS0; Wed, 04 May 2016 14:26:36 +0200 From: Arnd Bergmann To: Matan Barak , Leon Romanovsky , Saeed Mahameed Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, davem@davemloft.net, Matthew Finlay , Richard Cochran , Amir Vadai , Haggai Abramonvsky Subject: [PATCH 1/3] Revert "net/mlx5: Kconfig: Fix MLX5_EN/VXLAN build issue" Date: Wed, 4 May 2016 14:26:08 +0200 Message-Id: <1462364774-3792510-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1462364774-3792510-1-git-send-email-arnd@arndb.de> References: <1462364774-3792510-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:pPwwRkRZLamo7yPOCgttHXWlpLAWoj5O/BGPlO26/zpKLPbWdsw 5oa2NqenA/JnuHAmg6gQ0YDdwMupA2D/E9dcPNFKxGuOP06ZqHpOO37DEYMO0c8qaNLcKwm Ckekb99waic1HIfFkl8wG6LtxNfy5cu9NLmF+EfozQGKO+tE0EqI+2t4gggQonBW8ayjsK3 fy+m/Uj+K6zNdKw4vxNpA== X-UI-Out-Filterresults: notjunk:1; V01:K0:266MasPR+uc=:z+kYhRbIhXx8arH/6yAXPG fMHF+SkmyInlAmx1dXD3xx/LJ+eVBJSmjbtTp3hGg4IPPIxElsPXlVWwB9oNw9kOK25VwMV3Z KYAjaIimJZQHnJeQUzpUR38E1GYZ5UG9qEiVYuRwRbUxbQNu9SpF+CrHmRkMgSSawnMk3Qy89 jwKWjwN2nSoBxGZXWBfGvZsXrn3kGWFgmLOmen3eAp5wJKCxsvFW4ytRmOPX5HoVBeB+RiAqE 52Go6GshmIFJecOaiIW2J/3N9wBvevyxEuXtVPYE7LX3BZ26DY2YSk7wtGASBWFoIJ9CP1haC H93WcVJ5Q/aYK6igiQpgNQSL5lAvf7h8kVuxZMpivTWTfyVJs6Z/r3SswCZ7Kvs1ic5bEUe+h QVr2tow/5E6Sn+Vv1gr8fBYmY0Fr7ww9YeXNWv8SLdLTatGI48HwE6WIDkRD7Cc+azvXSUQsz nfMnioSIG08Rg3dTA+ywHYemwFW/mNnZXqGP+zPsJv8p6Ws1TgwHamtQWFL+dgw+tqS1BEN38 /E9n24TKKi1Yokx7k9wUKKxfL+setDwi4Z245OXtLqYpG8zvQlwFQGNDVDzji159kDyawr+Oo 0dcF9kel99ThbFC3UTVE24PFG0uLOdHlm4h8T6d862s5327KjgVVqXwaoRtxGrtDQBHt+EYrw UjJ7dTGXktHsm2oFpftJsrSPhEkL7hJhCDd8JxAMJOWGyRQF20W6BZiMFazhpwrbrVB4= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 69976fb1045850a742deb9790ea49cbc6f497531. We cannot select VXLAN when IPv4 support is disabled, that just gives us additional build errors, including: warning: (MLX5_CORE_EN) selects VXLAN which has unmet direct dependencies (NETDEVICES && NET_CORE && INET) In file included from ../drivers/net/vxlan.c:36:0: include/net/udp_tunnel.h: In function 'udp_tunnel_handle_offloads': include/net/udp_tunnel.h:112:9: error: implicit declaration of function 'iptunnel_handle_offloads' [-Werror=implicit-function-declaration] return iptunnel_handle_offloads(skb, type); ^~~~~~~~~~~~~~~~~~~~~~~~ I'm sending a proper fix for the original bug in a separate patch. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 1 - 1 file changed, 1 deletion(-) -- 2.7.0 diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig index 559d11a443bc..1cf722eba607 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig +++ b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig @@ -14,7 +14,6 @@ config MLX5_CORE_EN bool "Mellanox Technologies ConnectX-4 Ethernet support" depends on NETDEVICES && ETHERNET && PCI && MLX5_CORE select PTP_1588_CLOCK - select VXLAN if MLX5_CORE=y default n ---help--- Ethernet support in Mellanox Technologies ConnectX-4 NIC. From patchwork Wed May 4 12:31:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102382 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp154321qge; Wed, 4 May 2016 05:32:15 -0700 (PDT) X-Received: by 10.98.41.70 with SMTP id p67mr11657100pfp.93.1462365135366; Wed, 04 May 2016 05:32:15 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rw1si4814071pab.58.2016.05.04.05.32.15; Wed, 04 May 2016 05:32:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751655AbcEDMcN (ORCPT + 29 others); Wed, 4 May 2016 08:32:13 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:59640 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750910AbcEDMcL (ORCPT ); Wed, 4 May 2016 08:32:11 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0Lu5Go-1bhLGR24vO-011VPb; Wed, 04 May 2016 14:32:01 +0200 From: Arnd Bergmann To: Matan Barak , Leon Romanovsky , Saeed Mahameed Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, davem@davemloft.net, Matthew Finlay , Richard Cochran , Amir Vadai , Haggai Abramonvsky , Maor Gottlieb , Or Gerlitz , Majd Dibbiny , Achiad Shochat , Tariq Toukan , Gal Pressman Subject: [PATCH 2/3] net/mlx5e: make VXLAN support conditional Date: Wed, 4 May 2016 14:31:14 +0200 Message-Id: <1462365116-3856622-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1462364774-3792510-1-git-send-email-arnd@arndb.de> References: <1462364774-3792510-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:skAXLvxpdMqB0XX9Ybd3/tieljd7t1IMjCxq0Hx/Jxe45nwZy0W x6ZHf6rwbP2cXWoavIDadhy5LY4P/W6eZbFXqulcRSoAfu6Dx5VATQS3Z9TgOhJKDLL8AtH RN5XlBcGcwIdhwdy9649/bn16O0x77m1kEvFrozihwDA5z5LK2+Dhxm1L+cHra63uIH6yeH dyW6mPbn67MWkB96bq1bQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:YTn3btVvNaM=:SoSmn5BWQ3cThWqDi/Oj7V kB3YuQtrhRQpDkESB0VT2OBxsMg1l7FHsOqAHK58n6/NVn9MkgCIKs4Xn5sdNVhUsJ9r76m8e eGEN++dbMUSJ17pBAcntXRprq9mdMJ2xeqXKG2CLmwkIM855RGeKikl4nWLfkQT6sdKvtQew/ AY2+3+XU5LcY10Ba6c/6679s9dKOEI35vFPKVxvQ035ubZ0FUNPUV99WqKyGKpejC55vuxYGx Cy3dzoqvEchkUCRl9HAfd3VQl2TqouxACdYd1ot+RfMUGUV+lsDb+XOV01elVx0Ke95/PKE0y ckCLLYRtOCoTP4dw+MKgIAaHO1IF/5x5fK8Y3YYpl0n9ZmTQFSpF+zEUUlQMKq4RHmP6jGdJ7 k2XH4Y6f8ucgG+oj15VU7p0Ix97UUv8q49RlYtXXPpdEj2Uw1lvHFH22/2zvIvYinj6ZgQ0N4 WAtx+cSsYzEsSGbxPf5ThYxGjqTKApfBIZLwiGXlSuyyX5NASbD7dkS/kdyXXpfqhSbtR2Bik kKFuCPC30IU8ahYypYVpz0la3aqnEh8stAiTyiSFTFLahb1MVhR+DRajiXo4gQtYtj+59cxg2 icZFJgkRWyvQjv8VUeUncYuW7eXwmZByKRGmf3T+opJFOsXRXYfvicd0DMpHfl7uhrvEvKhGD oaYXRuToXflItZUc/ouzRjPDeXZzAbAq9k0UHGk9LpA/tAOgf85RIWma5zwhPzN1FokY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VXLAN can be disabled at compile-time or it can be a loadable module while mlx5 is built-in, which leads to a link error: drivers/net/built-in.o: In function `mlx5e_create_netdev': ntb_netdev.c:(.text+0x106de4): undefined reference to `vxlan_get_rx_port' This avoids the link error and makes the vxlan code optional, like the other ethernet drivers do as well. Signed-off-by: Arnd Bergmann Link: https://patchwork.ozlabs.org/patch/589296/ Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling") --- I sent it originally on Feb 26 2016, but misread Saeed Mahameed's reply as saying that he'd fix it up himself. The new version should address the original comment. --- drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 7 +++++++ drivers/net/ethernet/mellanox/mlx5/core/Makefile | 4 +++- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++++ drivers/net/ethernet/mellanox/mlx5/core/vxlan.h | 11 +++++++++-- 5 files changed, 25 insertions(+), 3 deletions(-) -- 2.7.0 diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig index 1cf722eba607..f5c3b9465d8d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig +++ b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig @@ -31,3 +31,10 @@ config MLX5_CORE_EN_DCB This flag is depended on the kernel's DCB support. If unsure, set to Y + +config MLX5_CORE_EN_VXLAN + bool "VXLAN offloads Support" + default y + depends on MLX5_CORE_EN && VXLAN && !(MLX5_CORE=y && VXLAN=m) + ---help--- + Say Y here if you want to use VXLAN offloads in the driver. diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Makefile b/drivers/net/ethernet/mellanox/mlx5/core/Makefile index 679e18ffb3a6..6b8da0b36acd 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/Makefile +++ b/drivers/net/ethernet/mellanox/mlx5/core/Makefile @@ -6,7 +6,9 @@ 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 en_tc.o + +mlx5_core-$(CONFIG_MLX5_CORE_EN_VXLAN) += vxlan.o mlx5_core-$(CONFIG_MLX5_CORE_EN_DCB) += en_dcbnl.o mlx5_core-$(CONFIG_RFS_ACCEL) += en_arfs.o diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index bfa5daaaf5aa..19b1b021af2d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -522,7 +522,9 @@ struct mlx5e_priv { struct mlx5e_direct_tir direct_tir[MLX5E_MAX_NUM_CHANNELS]; struct mlx5e_flow_steering fs; +#ifdef CONFIG_MLX5_CORE_EN_VXLAN struct mlx5e_vxlan_db vxlan; +#endif struct mlx5e_params params; struct workqueue_struct *wq; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 7dfb73aa8e41..5e710315c5a9 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -2494,6 +2494,7 @@ static int mlx5e_get_vf_stats(struct net_device *dev, vf_stats); } +#if IS_ENABLED(CONFIG_MLX5_CORE_EN_VXLAN) static void mlx5e_add_vxlan_port(struct net_device *netdev, sa_family_t sa_family, __be16 port) { @@ -2565,6 +2566,7 @@ static netdev_features_t mlx5e_features_check(struct sk_buff *skb, return features; } +#endif static const struct net_device_ops mlx5e_netdev_ops_basic = { .ndo_open = mlx5e_open, @@ -2599,9 +2601,11 @@ static const struct net_device_ops mlx5e_netdev_ops_sriov = { .ndo_set_features = mlx5e_set_features, .ndo_change_mtu = mlx5e_change_mtu, .ndo_do_ioctl = mlx5e_ioctl, +#ifdef CONFIG_MLX5_CORE_EN_VXLAN .ndo_add_vxlan_port = mlx5e_add_vxlan_port, .ndo_del_vxlan_port = mlx5e_del_vxlan_port, .ndo_features_check = mlx5e_features_check, +#endif #ifdef CONFIG_RFS_ACCEL .ndo_rx_flow_steer = mlx5e_rx_flow_steer, #endif diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.h b/drivers/net/ethernet/mellanox/mlx5/core/vxlan.h index 129f3527aa14..217ac530a514 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/vxlan.h @@ -48,14 +48,21 @@ struct mlx5e_vxlan_work { static inline bool mlx5e_vxlan_allowed(struct mlx5_core_dev *mdev) { - return (MLX5_CAP_ETH(mdev, tunnel_stateless_vxlan) && + return IS_ENABLED(CONFIG_MLX5_CORE_EN_VXLAN) && + (MLX5_CAP_ETH(mdev, tunnel_stateless_vxlan) && mlx5_core_is_pf(mdev)); } +#ifdef CONFIG_MLX5_CORE_EN_VXLAN void mlx5e_vxlan_init(struct mlx5e_priv *priv); +void mlx5e_vxlan_cleanup(struct mlx5e_priv *priv); +#else +static inline void mlx5e_vxlan_init(struct mlx5e_priv *priv) {} +static inline void mlx5e_vxlan_cleanup(struct mlx5e_priv *priv) {} +#endif + void mlx5e_vxlan_queue_work(struct mlx5e_priv *priv, sa_family_t sa_family, u16 port, int add); struct mlx5e_vxlan *mlx5e_vxlan_lookup_port(struct mlx5e_priv *priv, u16 port); -void mlx5e_vxlan_cleanup(struct mlx5e_priv *priv); #endif /* __MLX5_VXLAN_H__ */ From patchwork Wed May 4 12:32:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102381 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp154652qge; Wed, 4 May 2016 05:32:58 -0700 (PDT) X-Received: by 10.98.35.212 with SMTP id q81mr11806964pfj.108.1462365177293; Wed, 04 May 2016 05:32:57 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id lx17si4816339pab.66.2016.05.04.05.32.57; Wed, 04 May 2016 05:32:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752793AbcEDMcy (ORCPT + 29 others); Wed, 4 May 2016 08:32:54 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:59553 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752529AbcEDMcw (ORCPT ); Wed, 4 May 2016 08:32:52 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue004) with ESMTPA (Nemesis) id 0MFfhh-1auLTM1g2P-00Ebom; Wed, 04 May 2016 14:32:37 +0200 From: Arnd Bergmann To: Matan Barak , Leon Romanovsky , Saeed Mahameed Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, davem@davemloft.net, Matthew Finlay , Richard Cochran , Amir Vadai , Haggai Abramonvsky , Maor Gottlieb , Or Gerlitz , Majd Dibbiny Subject: [PATCH 3/3] net/mlx5e: don't build RFS without ethernet Date: Wed, 4 May 2016 14:32:24 +0200 Message-Id: <1462365155-3861405-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1462364774-3792510-1-git-send-email-arnd@arndb.de> References: <1462364774-3792510-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:Q9YP7nZOBQc9kWyV5GewCI/ji0lEsvSW/1qtRdh/yxejrsSHZT0 TNHbIkhkigQuP7MY2wDH1I8U4au8oc+lhcOiakXkpOEZgSuf4Qj6XvmxevPPw9BtxonQrha UixTTvJauhhss6OtCbvda4yaY/Pso4zCHVjVZwF0+IB8t/qvZ0G8pAaaMm2wd0utYSKzhDn 5Hpw8iv94xeZJFcdlMQ9w== X-UI-Out-Filterresults: notjunk:1; V01:K0:VnUe18vWVdU=:Qae85uzmutzBgCozX7Ppg8 qDaI59MtX2u9sX/mQzNJtU8dMMHU9vpxSyaXlpyMYNswIVpn/2GSX7CfsMQtmbtFxTaysmucY TQFw3Qwm/5SOFyKfQjqVL/y4mSUxmI6OHTz/9GUhCk2uh+Mr4YhNGcg+0ZJ1RU6j5H2odlLoF ir9jMeF+kojxlxV/oWAR1zkBWQGfACAOHEV3Lei24Qf2Wu6IgZ466Z09i51OfCOyiJi/E0DSr s5YvB0WDHlfiDETIT27UmJ04a+0lOhLWq3xgZfHtHsJqck3WRcMvKNB1eyptSez2aksBUi2VW 6+kwUfT7lMMx82ZGY/YZ/R+rA7vKWLDzBRBXMM3VnrdO89NBD96Ux8zmvnjgoRyTNtVrDlq7X DNPQhTH9ijV9y8kHBQLv1NDFtw/iPwKk/ooVyN9FeICsyq36+N8yvzkL6Kk/VaJTM1IXlIHBk RwS82fHTLvMG+5ZvCFv7ITM8Dp5Tr2Msyks++k0Zob0oZF0LFBHTE7P4VzEqgYjGDHaPt50fe zAdCvMItxzVnMXXOJdv1CXZ+utZtVnOtrPDvPwf1YgFHA6qoXwWxPXWYIfeNiwKt5k3/QUFmm mzUI4ItmpsOpEECX/C5sFHND91oyBc+5WZttsjyqT2RMdK3vwGaAC8fqIDQet4ZCS3EnqJj9Y prtWm/sqwMOo5bVSA7jxXWTWw1IvGprYCloYSFned/6bgGeBBKyaOp17J7zBwE8qFQf4= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The RFS acceleration support in mlx5 is enabled whenever CONFIG_RFS_ACCEL is in use. However, this fails if a user turns off CONFIG_MLX5_CORE_EN, because the rfs code now calls into the ethernet portion of the driver: ERROR: "mlx5e_destroy_flow_table" [drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko] undefined! This patch adds another Kconfig symbol to control the compilation of the RFS code, to ensure it is only built if both the ethernet support and the core RFS support are enabled. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 4 ++++ drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) -- 2.7.0 diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig index f5c3b9465d8d..5efba14a1453 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig +++ b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig @@ -38,3 +38,7 @@ config MLX5_CORE_EN_VXLAN depends on MLX5_CORE_EN && VXLAN && !(MLX5_CORE=y && VXLAN=m) ---help--- Say Y here if you want to use VXLAN offloads in the driver. + +config MLX5_CORE_EN_RFS + def_bool y + depends on MLX5_CORE_EN && RFS_ACCEL diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Makefile b/drivers/net/ethernet/mellanox/mlx5/core/Makefile index 6b8da0b36acd..29118c1debb7 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/Makefile +++ b/drivers/net/ethernet/mellanox/mlx5/core/Makefile @@ -11,4 +11,4 @@ mlx5_core-$(CONFIG_MLX5_CORE_EN) += wq.o eswitch.o \ mlx5_core-$(CONFIG_MLX5_CORE_EN_VXLAN) += vxlan.o mlx5_core-$(CONFIG_MLX5_CORE_EN_DCB) += en_dcbnl.o -mlx5_core-$(CONFIG_RFS_ACCEL) += en_arfs.o +mlx5_core-$(CONFIG_MLX5_CORE_EN_RFS) += en_arfs.o