Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2314157imm; Mon, 28 May 2018 05:56:48 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpSAuRNIguNJgIYSA8DBHFy2m4uP5dwFEb964Cv8MVAxgXTYA3xw5KHQFrM70XjDdMLDpAw X-Received: by 2002:a17:902:268:: with SMTP id 95-v6mr13688406plc.386.1527512208750; Mon, 28 May 2018 05:56:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527512208; cv=none; d=google.com; s=arc-20160816; b=TCFMjJ0or5x8e2WTmvFziSa7Ccx/YmlQobgY7k94cC05uxyAXN7qbLip5s8GkzLL6A Arv++2DBZj4D/u0hMr8dz665obP1wz6qkh8nJ768/R3ipWjCCF236qti+xoxw9UvqItg WNh9udEPo5fHJCuVQIGM36641ydZeuyBPY8tGTpmitgTVEByoRSKg9aW2h7EJnwDw90m yMqataIkFJlycOK6FpaCvEks8BJGSO95mM0CUIjghwO55g1PdgY2TdYiq3QA0fMKrUdH 2mS562En93xtYU+aR2TCfQ9a1yake0QQ1+ouf9YYCVt66nNZC2qRaOQUwQMscF3g7VbM aaJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=E9o267NEve0dYzS0Y7LDbZQQwwXUoMcHE5HxLzuoT8I=; b=Rb/k4K+Ty6TVsslA2HLWX+/ZkSjThMZZQRZIA9wxG6iI2uoJQkdGd8hCwLw6WOAEHa 996doOcJlvlO4xIJA8DCBVjyxzqfaOsqdXTFNZC9zftZ1xapEBRRQi8wAcPnpTdlNVdf 7btXsYTxQrJ8El8CRxZ/6MVNkuDELm2zTOrVyXEn456ipGYGL8rnDUaFQDBAooMo63qz kNuaTZ/U0419cKibaFU735xklezj/sTWlWc30UkTSa0qVdfM8ru14V9AHf2X35rPwAbZ /Gc3Ycg62GEDH7m9NlLKRRtX28RmCYnCT2LUqK/iRXgpvVSV80p/CPCRBrbjnbv3AMuJ EeLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mSMimO8j; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s88-v6si29664255pfa.339.2018.05.28.05.56.33; Mon, 28 May 2018 05:56:48 -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; dkim=pass header.i=@kernel.org header.s=default header.b=mSMimO8j; 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 S1164335AbeE1KzF (ORCPT + 99 others); Mon, 28 May 2018 06:55:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:43660 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163941AbeE1Ky6 (ORCPT ); Mon, 28 May 2018 06:54:58 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 51D9520845; Mon, 28 May 2018 10:54:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504898; bh=j/OZVV45qnbM07Ua0Rin8cM/pryvp42oA0N72ACg3Ok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mSMimO8jX5qCVAqiCcqJGtuwW8HEc4HhypDXku9BTKW6YHMAVr6zEs+lvU11LjDYi Z8pKi3Wtu/ecyX16z9CuyBm9lTz7DBJ/F1JynKTbAWHU+VSoyvODwawMU5F7ouqVa6 iCez2rSrThKzgfL5T+mrQLwYLh15YjVMu4EIIAlA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Or Gerlitz , Mark Bloch , Saeed Mahameed , Sasha Levin Subject: [PATCH 4.14 302/496] net/mlx5: Make eswitch support to depend on switchdev Date: Mon, 28 May 2018 12:01:27 +0200 Message-Id: <20180528100332.544437782@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Or Gerlitz [ Upstream commit f125376b06bcc57dfb0216ac8d6ec6d5dcf81025 ] Add dependancy for switchdev to be congfigured as any user-space control plane SW is expected to use the HW switchdev ID to locate the representors related to VFs of a certain PF and apply SW/offloaded switching on them. Fixes: e80541ecabd5 ('net/mlx5: Add CONFIG_MLX5_ESWITCH Kconfig') Signed-off-by: Or Gerlitz Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) --- a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig +++ b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig @@ -46,7 +46,7 @@ config MLX5_MPFS config MLX5_ESWITCH bool "Mellanox Technologies MLX5 SRIOV E-Switch support" - depends on MLX5_CORE_EN + depends on MLX5_CORE_EN && NET_SWITCHDEV default y ---help--- Mellanox Technologies Ethernet SRIOV E-Switch support in ConnectX NIC. --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -4022,7 +4022,7 @@ static void mlx5e_set_netdev_dev_addr(st } } -#if IS_ENABLED(CONFIG_NET_SWITCHDEV) && IS_ENABLED(CONFIG_MLX5_ESWITCH) +#if IS_ENABLED(CONFIG_MLX5_ESWITCH) static const struct switchdev_ops mlx5e_switchdev_ops = { .switchdev_port_attr_get = mlx5e_attr_get, }; @@ -4126,7 +4126,7 @@ static void mlx5e_build_nic_netdev(struc mlx5e_set_netdev_dev_addr(netdev); -#if IS_ENABLED(CONFIG_NET_SWITCHDEV) && IS_ENABLED(CONFIG_MLX5_ESWITCH) +#if IS_ENABLED(CONFIG_MLX5_ESWITCH) if (MLX5_VPORT_MANAGER(mdev)) netdev->switchdev_ops = &mlx5e_switchdev_ops; #endif --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c @@ -825,9 +825,7 @@ static void mlx5e_build_rep_netdev(struc netdev->ethtool_ops = &mlx5e_rep_ethtool_ops; -#ifdef CONFIG_NET_SWITCHDEV netdev->switchdev_ops = &mlx5e_rep_switchdev_ops; -#endif netdev->features |= NETIF_F_VLAN_CHALLENGED | NETIF_F_HW_TC | NETIF_F_NETNS_LOCAL; netdev->hw_features |= NETIF_F_HW_TC;