linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Denis Drozdov <denisd@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>
Subject: [PATCH 4.19 29/42] net/mlx5e: IPoIB, Reset QP after channels are closed
Date: Wed, 21 Nov 2018 20:06:05 +0100	[thread overview]
Message-ID: <20181121183149.244338208@linuxfoundation.org> (raw)
In-Reply-To: <20181121183147.869199006@linuxfoundation.org>

4.19-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Denis Drozdov <denisd@mellanox.com>

[ 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 <denisd@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 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;



  parent reply	other threads:[~2018-11-21 19:07 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21 19:05 [PATCH 4.19 00/42] 4.19.4-stable review Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 01/42] flow_dissector: do not dissect l4 ports for fragments Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 02/42] ibmvnic: fix accelerated VLAN handling Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 03/42] ip_tunnel: dont force DF when MTU is locked Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 04/42] ipv6: fix a dst leak when removing its exception Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 05/42] ipv6: Fix PMTU updates for UDP/raw sockets in presence of VRF Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 06/42] net: bcmgenet: protect stop from timeout Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 07/42] net-gro: reset skb->pkt_type in napi_reuse_skb() Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 08/42] sctp: not allow to set asoc prsctp_enable by sockopt Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 09/42] tcp: Fix SOF_TIMESTAMPING_RX_HARDWARE to use the latest timestamp during TCP coalescing Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 10/42] tg3: Add PHY reset for 5717/5719/5720 in change ring and flow control paths Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 11/42] tipc: dont assume linear buffer when reading ancillary data Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 12/42] tipc: fix lockdep warning when reinitilaizing sockets Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 13/42] tuntap: fix multiqueue rx Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 14/42] net: systemport: Protect stop from timeout Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 15/42] net/sched: act_pedit: fix memory leak when IDR allocation fails Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 16/42] net: sched: cls_flower: validate nested enc_opts_policy to avoid warning Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 17/42] tipc: fix link re-establish failure Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 18/42] net/mlx5e: Dont match on vlan non-existence if ethertype is wildcarded Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 19/42] net/mlx5e: Claim TC hw offloads support only under a proper build config Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 20/42] net/mlx5e: Adjust to max number of channles when re-attaching Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 21/42] net/mlx5e: RX, verify received packet size in Linear Striding RQ Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 22/42] Revert "sctp: remove sctp_transport_pmtu_check" Greg Kroah-Hartman
2018-11-21 19:05 ` [PATCH 4.19 23/42] net/mlx5e: Always use the match level enum when parsing TC rule match Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 24/42] net/mlx5e: Fix selftest for small MTUs Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 25/42] net/mlx5e: Removed unnecessary warnings in FEC caps query Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 26/42] inet: frags: better deal with smp races Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 27/42] l2tp: fix a sock refcnt leak in l2tp_tunnel_register Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 28/42] net/mlx5: IPSec, Fix the SA context hash key Greg Kroah-Hartman
2018-11-21 19:06 ` Greg Kroah-Hartman [this message]
2018-11-21 19:06 ` [PATCH 4.19 30/42] net: dsa: mv88e6xxx: Fix clearing of stats counters Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 31/42] net: phy: realtek: fix RTL8201F sysfs name Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 32/42] sctp: define SCTP_SS_DEFAULT for Stream schedulers Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 33/42] net: qualcomm: rmnet: Fix incorrect assignment of real_dev Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 34/42] net: dsa: microchip: initialize mutex before use Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 35/42] sctp: fix strchange_flags name for Stream Change Event Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 36/42] net: phy: mdio-gpio: Fix working over slow can_sleep GPIOs Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 37/42] sctp: not increase streams incnt before sending addstrm_in request Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 38/42] mlxsw: spectrum: Fix IP2ME CPU policer configuration Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 39/42] net: smsc95xx: Fix MTU range Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 40/42] rxrpc: Fix lockup due to no error backoff after ack transmit error Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 41/42] usbnet: smsc95xx: disable carrier check while suspending Greg Kroah-Hartman
2018-11-21 19:06 ` [PATCH 4.19 42/42] Revert "x86/speculation: Enable cross-hyperthread spectre v2 STIBP mitigation" Greg Kroah-Hartman
2018-11-22  5:26 ` [PATCH 4.19 00/42] 4.19.4-stable review kernelci.org bot
2018-11-22  7:15 ` Harsh Shandilya
2018-11-22  8:24   ` Greg Kroah-Hartman
2018-11-22 16:36 ` Guenter Roeck
2018-11-23  7:16   ` Greg Kroah-Hartman
2018-11-22 20:53 ` Thomas Voegtle
2018-11-22 22:01   ` Thomas Voegtle
2018-11-22 22:30     ` Guenter Roeck
2018-11-23  6:52       ` Greg Kroah-Hartman
2018-11-23  7:45       ` Greg Kroah-Hartman
2018-11-23 12:06         ` Guenter Roeck
2018-11-23  6:51   ` Greg Kroah-Hartman
2018-11-23 15:40     ` Thomas Voegtle
2018-11-23 15:44       ` David Laight
2018-11-23  8:13 ` Naresh Kamboju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181121183149.244338208@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=denisd@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).