Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2957imu; Wed, 21 Nov 2018 14:17:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/WUSgZcxLH1Dq6l61QftZ9qRkqCjNyx/qdhrv8O8JTrdfVoS1pH4cK+F6RUqB9CUmYTDEw+ X-Received: by 2002:a17:902:b78b:: with SMTP id e11mr8664883pls.90.1542838633747; Wed, 21 Nov 2018 14:17:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542838633; cv=none; d=google.com; s=arc-20160816; b=rj9UC70SF689VW17UYI8Hkv53dMTzPzSsEYZuUb/RXOwdx7xo6cy1cFLAfCxALNcCe c+l8MqoHTBMKM9+ianNjr5eGakK7iY04UayOmO1RJiEBhX1XuRKKxUV3hmCCwsMdjno8 wP7om3VZa8y+B0zACxae7Ty/ksPxiRb+9JoVG533NdBTZ1GMXcJXVqC31CrL5CEMn9ch /z6yjN7StYI369TZ4Gu6sau/f6H+kggaiIWogu/C2qgPL+3zH56iVFUHpL50ztlvtD2V qZttheXhkeLPTb7plYriS/UQEHVdhjap86zOELVB40EQJtRsPbUcA1uMmmOe5yKGXi/V oE/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=y7WYUScHnxRqvtz32J9XLdSp2gyYsVOMxp/pmVp9F5c=; b=ln0PuEklHdTmNld+4ByVSplyPKTVytcFWZGIDSwKAKbB7KpeC0YwN+M4s34K42q+ny rSZsOxAI1laJ0xrM6nl1KxK2NoPXuc/GOrZQiUPmbfMviXK5q/jSFma9khOsBFIBwSgi 90SD5RFxUukXwtA7QxyGTwE8+8yvZ68Hvdji3m5HnAnBF8iy/tXLUtZifwjGvxNhdhTE Kq5njq2xeEwhN8VIs7sDCu1zYr0oUyHhOhIz/1ImouwrJmZ0WhSmb5TyXTGqU/UOyVEq vjaX1JVvxaMF+hD5B2RLvzFV9HgIsWAMlrlKDZ9dUYo+mVx57BlDzbutv+p2GIC8pS7y mwCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ndo5lPNZ; 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 b14si48739471pgj.20.2018.11.21.14.16.55; Wed, 21 Nov 2018 14:17:13 -0800 (PST) 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=ndo5lPNZ; 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 S2387858AbeKVFnA (ORCPT + 99 others); Thu, 22 Nov 2018 00:43:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:37636 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387767AbeKVFm7 (ORCPT ); Thu, 22 Nov 2018 00:42:59 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 5F839214DB; Wed, 21 Nov 2018 19:07:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542827246; bh=XY5pO3WxsYYCJ8aEQolvisyRmceiPAlzgXWfUW1r3To=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ndo5lPNZsMHaFKhRlNFJ1r1X4QgG5H0i0RZnQZAYSqX56lTcW5bh1BEhmKVj7cnA1 JtyK7pGsUy2EVT0yyS3URFSGPx6VqN9iftl0OAdYx2Jb2p3wavZbYJ61pEqhDH2+1v DxHx1K4jOxK1XpQGwINgGDPdsF+kkveGY0T0nkbA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Denis Drozdov , Saeed Mahameed Subject: [PATCH 4.19 29/42] net/mlx5e: IPoIB, Reset QP after channels are closed Date: Wed, 21 Nov 2018 20:06:05 +0100 Message-Id: <20181121183149.244338208@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181121183147.869199006@linuxfoundation.org> References: <20181121183147.869199006@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Denis Drozdov [ Upstream commit acf3766b36d8e59ecbc307894c6d05703ee48014 ] The mlx5e channels should be closed before mlx5i_uninit_underlay_qp puts the QP into RST (reset) state during mlx5i_close. Currently QP state incorrectly set to RST before channels got deactivated and closed, since mlx5_post_send request expects QP in RTS (Ready To Send) state. The fix is to keep QP in RTS state until mlx5e channels get closed and to reset QP afterwards. Also this fix is simply correct in order to keep the open/close flow symmetric, i.e mlx5i_init_underlay_qp() is called first thing at open, the correct thing to do is to call mlx5i_uninit_underlay_qp() last thing at close, which is exactly what this patch is doing. Fixes: dae37456c8ac ("net/mlx5: Support for attaching multiple underlay QPs to root flow table") Signed-off-by: Denis Drozdov Signed-off-by: Saeed Mahameed Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c @@ -502,9 +502,9 @@ static int mlx5i_close(struct net_device netif_carrier_off(epriv->netdev); mlx5_fs_remove_rx_underlay_qpn(mdev, ipriv->qp.qpn); - mlx5i_uninit_underlay_qp(epriv); mlx5e_deactivate_priv_channels(epriv); mlx5e_close_channels(&epriv->channels); + mlx5i_uninit_underlay_qp(epriv); unlock: mutex_unlock(&epriv->state_lock); return 0;