Received: by 10.192.165.156 with SMTP id m28csp31856imm; Tue, 10 Apr 2018 15:47:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx48co3OyUEZMoLxFj+/afMvEjM0oPRJRt2BzkCe2cCpRD3uhy11RAOIUnoaCCXd0v4IGdpqV X-Received: by 2002:a17:902:206:: with SMTP id 6-v6mr2332139plc.376.1523400424823; Tue, 10 Apr 2018 15:47:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523400424; cv=none; d=google.com; s=arc-20160816; b=ndtgHEvMEoi0Rjz9I/eWDXjg2vOU9Lt8zvaXhXMkqhKPxXzKKxjU5SZbHIfPsRVW4M 4FsjffLNtM0avx8IYPZNyV/d+nn1M3z2V3TyF6Ho4hcu35wHkphVdJNPoOVSBteInti5 6z18C0jhIpyr9bNL/npE8i1HPHCqMN4zJmirwHckqDewOgF5ZLBK7vtl7bWSp8Qc6To1 qX7ENSuDnG/VdXmVuN10td51vpmCf8hZjC72Bc1SXDPc9qN1Oj622sGHzM36N4bwZhAf h+LPVHh9WOJ8dX8t/rPYUF89T+DfWy21O8w6iGa5bqCahNayhOfpNA6KH5bQrw84Zwog wZUQ== 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 :arc-authentication-results; bh=0Af6dNiSefOdZ0ywD3OxKR8/Z1W3uTsm8BMbqU9dfX4=; b=xYXAaZHwPFwq+lkTa4R4AgpOce1yC/h+XNvHI0hKEIZtluqCxXhJsLgxpVDzP2dAO7 EHZ8tbOZPShHx+LFEe2muJAhLUgkGZNqLuJc+BTwsTREkwputi9WmSJSbmJfnPrkoZj8 6xuIl+b5HX4I8rsIS+VLr4RaSkQ0o9iSqiOGz2mpm9NLNR66sQVdUwgLqYBiOTlDSL/h /IzMyMFWK19awE/JyRSvUqiVgyPxfJUIJgFBzxBRZLVjQ4vYM98PVKmpPaiEhjljL+tC Zr+h4SkZyH+2xI37Lo3EWRPFQfEtNQ7kYdUWM4EtMCvG2KpeJN5t2e8ISZKA59a+Fwld tKvw== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a61-v6si3588197pla.400.2018.04.10.15.46.28; Tue, 10 Apr 2018 15:47:04 -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 S1755608AbeDJWmc (ORCPT + 99 others); Tue, 10 Apr 2018 18:42:32 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46184 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932669AbeDJWj5 (ORCPT ); Tue, 10 Apr 2018 18:39:57 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B6C44D31; Tue, 10 Apr 2018 22:39:55 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shahar Klein , Roi Dayan , Saeed Mahameed Subject: [PATCH 4.14 128/138] net/mlx5e: Sync netdev vxlan ports at open Date: Wed, 11 Apr 2018 00:25:18 +0200 Message-Id: <20180410212917.078085639@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212902.121524696@linuxfoundation.org> References: <20180410212902.121524696@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: Shahar Klein [ Upstream commit a117f73dc2430443f23e18367fa545981129c1a6 ] When mlx5_core is loaded it is expected to sync ports with all vxlan devices so it can support vxlan encap/decap. This is done via udp_tunnel_get_rx_info(). Currently this call is set in mlx5e_nic_enable() and if the netdev is not in NETREG_REGISTERED state it will not be called. Normally on load the netdev state is not NETREG_REGISTERED so udp_tunnel_get_rx_info() will not be called. Moving udp_tunnel_get_rx_info() to mlx5e_open() so it will be called on netdev UP event and allow encap/decap. Fixes: 610e89e05c3f ("net/mlx5e: Don't sync netdev state when not registered") Signed-off-by: Shahar Klein Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -2718,6 +2718,9 @@ int mlx5e_open(struct net_device *netdev mlx5_set_port_admin_status(priv->mdev, MLX5_PORT_UP); mutex_unlock(&priv->state_lock); + if (mlx5e_vxlan_allowed(priv->mdev)) + udp_tunnel_get_rx_info(netdev); + return err; } @@ -4276,13 +4279,6 @@ static void mlx5e_nic_enable(struct mlx5 if (netdev->reg_state != NETREG_REGISTERED) return; - /* Device already registered: sync netdev system state */ - if (mlx5e_vxlan_allowed(mdev)) { - rtnl_lock(); - udp_tunnel_get_rx_info(netdev); - rtnl_unlock(); - } - queue_work(priv->wq, &priv->set_rx_mode_work); rtnl_lock();