From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]:44380 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727519AbeK1W2M (ORCPT ); Wed, 28 Nov 2018 17:28:12 -0500 Date: Wed, 28 Nov 2018 13:26:48 +0200 From: Leon Romanovsky To: Greg KH Cc: stable@vger.kernel.org, linux-rdma@vger.kernel.org, Parav Pandit , Jack Morgenstein , Jason Gunthorpe Subject: Re: [PATCH] IB/core: Perform modify QP on real one Message-ID: <20181128112648.GH4559@mtr-leonro.mtl.com> References: <20181029151223.15114-1-leon@kernel.org> <20181128105820.GC1822@kroah.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="B4IIlcmfBL/1gGOG" Content-Disposition: inline In-Reply-To: <20181128105820.GC1822@kroah.com> Sender: stable-owner@vger.kernel.org List-ID: --B4IIlcmfBL/1gGOG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 28, 2018 at 11:58:20AM +0100, Greg KH wrote: > On Mon, Oct 29, 2018 at 05:12:23PM +0200, Leon Romanovsky wrote: > > From: Parav Pandit > > > > commit b2bedfb39541a7e14798d066b6f8685d84c8fcf5 upstream > > > > Currently qp->port stores the port number whenever IB_QP_PORT > > QP attribute mask is set (during QP state transition to INIT state). > > This port number should be stored for the real QP when XRC target QP > > is used. > > > > Follow the ib_modify_qp() implementation and hide the access to ->real_= qp. > > > > This commit is required for proper operation of commit 65be9cbe1224 > > ("RDMA/uverbs: Expand primary and alt AV port checks") which was added > > to 4.14.61. > > > > Without this commit, XRC qp's do not work. > > > > Fixes: a512c2fbef9c ("IB/core: Introduce modify QP operation with udata= ") > > Signed-off-by: Jack Morgenstein > > Signed-off-by: Parav Pandit > > Reviewed-by: Daniel Jurgens > > Signed-off-by: Leon Romanovsky > > Signed-off-by: Jason Gunthorpe > > --- > > drivers/infiniband/core/verbs.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > Does not apply to the 4.14.y tree :( Can you please try this file patch? I tested it now on 4201a586f1fa (tag: v4.14.84, stable/linux-4.14.y) Linux 4.14.8. Thanks =46rom d63abe9b61d2a6789d1fa236f8e3b19df17eb3cb Mon Sep 17 00:00:00 2001 =46rom: Parav Pandit Date: Mon, 29 Oct 2018 17:12:23 +0200 Subject: [PATCH] IB/core: Perform modify QP on real one commit b2bedfb39541a7e14798d066b6f8685d84c8fcf5 upstream Currently qp->port stores the port number whenever IB_QP_PORT QP attribute mask is set (during QP state transition to INIT state). This port number should be stored for the real QP when XRC target QP is used. Follow the ib_modify_qp() implementation and hide the access to ->real_qp. This commit is required for proper operation of commit 65be9cbe1224 ("RDMA/uverbs: Expand primary and alt AV port checks") which was added to 4.14.61. Without this commit, XRC qp's do not work. Fixes: a512c2fbef9c ("IB/core: Introduce modify QP operation with udata") Signed-off-by: Jack Morgenstein Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- drivers/infiniband/core/verbs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verb= s.c index feb80dbb5948..6d59af07d338 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -1285,7 +1285,7 @@ EXPORT_SYMBOL(ib_resolve_eth_dmac); /** * ib_modify_qp_with_udata - Modifies the attributes for the specified QP. - * @qp: The QP to modify. + * @ib_qp: The QP to modify. * @attr: On input, specifies the QP attributes to modify. On output, * the current values of selected QP attributes are returned. * @attr_mask: A bit-mask used to specify which attributes of the QP @@ -1294,9 +1294,10 @@ EXPORT_SYMBOL(ib_resolve_eth_dmac); * are being modified. * It returns 0 on success and returns appropriate error code on error. */ -int ib_modify_qp_with_udata(struct ib_qp *qp, struct ib_qp_attr *attr, +int ib_modify_qp_with_udata(struct ib_qp *ib_qp, struct ib_qp_attr *attr, int attr_mask, struct ib_udata *udata) { + struct ib_qp *qp =3D ib_qp->real_qp; int ret; if (attr_mask & IB_QP_AV) { -- 2.19.1 --B4IIlcmfBL/1gGOG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJb/nt4AAoJEORje4g2clinaiIP/35ChkOhpZiWIzdC6tv34jZz +Xk0Xu4tVRy0gj0bfwGiEr4NXk5Hp0CEdFIH+LrBPqxOAjf+mnyQtcXjC2GXXwmN pFEaSJvbWFJxWN+TxEIaCzwa9fIww8AptBoN3tHuMam28KxVDK6mbmhrY4+9knno jdTTMwIDcRSRuMn4SDTYUuJcvpzJKNQL/PzeXekb8u2M0ZQrZOQgaCiJzsiZcmud KEo8oEO1fH4xrzL4RvKlkHBPJ/A8gbfApWgkCU81sZOIIhoP0ik+5UQIiocaCPgx 5uzU2zl2KM/CRehvNPNxsrXcnJDM9rVBqGiotMAM27jBuwTHxV4kRP72ml4AO0XA he9QXUJYXAnIk6XySlLreMKXfqEAKPzu74us5zuWWsv64TsVXgODsKnD/DkHHD7j fTbJ2itnw4U+rMpEOdLhlHhBkJTVRBuhLOMTBmHrgbH7wYwKKTF/VLirE45t55t5 M1yVObXynlWRO/R46tZfZy8UqzFDjuftFX5fJGrbRQPJ8Z4xTUSW6fYl0BUoi4bP 0utac7vEjGRySLcdAsVRIW5QIFHCVAa4tXQtx3zwRNDFqMWsPNIfT71gJGAze+Fo VaBoazH+hGjLTR3bvddk9l02GRD1XygfIgsv9ufvgOTa57h8wRWEa05FenqznD+x fhxmt3aT84WEGhRAknxc =zUC8 -----END PGP SIGNATURE----- --B4IIlcmfBL/1gGOG--