All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] IB/core: Perform modify QP on real one
@ 2018-10-29 15:12 ` Leon Romanovsky
  0 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2018-10-29 15:12 UTC (permalink / raw)
  To: stable; +Cc: linux-rdma, Parav Pandit, Jack Morgenstein, Jason Gunthorpe

From: Parav Pandit <parav@mellanox.com>

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 <jackm@dev.mellanox.co.il>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 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/verbs.c
index feb80db..6d59af0 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -1285,7 +1285,7 @@ int ib_resolve_eth_dmac(struct ib_device *device,

 /**
  * 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 @@ int ib_resolve_eth_dmac(struct ib_device *device,
  *   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 = ib_qp->real_qp;
 	int ret;

 	if (attr_mask & IB_QP_AV) {

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] IB/core: Perform modify QP on real one
@ 2018-10-29 15:12 ` Leon Romanovsky
  0 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2018-10-29 15:12 UTC (permalink / raw)
  To: stable; +Cc: linux-rdma, Parav Pandit, Jack Morgenstein, Jason Gunthorpe

From: Parav Pandit <parav@mellanox.com>

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 <jackm@dev.mellanox.co.il>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 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/verbs.c
index feb80db..6d59af0 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -1285,7 +1285,7 @@ int ib_resolve_eth_dmac(struct ib_device *device,

 /**
  * 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 @@ int ib_resolve_eth_dmac(struct ib_device *device,
  *   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 = ib_qp->real_qp;
 	int ret;

 	if (attr_mask & IB_QP_AV) {
--
1.8.1.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] IB/core: Perform modify QP on real one
  2018-10-29 15:12 ` Leon Romanovsky
  (?)
@ 2018-11-28 10:58 ` Greg KH
  2018-11-28 11:26     ` Leon Romanovsky
  -1 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2018-11-28 10:58 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: stable, linux-rdma, Parav Pandit, Jack Morgenstein, Jason Gunthorpe

On Mon, Oct 29, 2018 at 05:12:23PM +0200, Leon Romanovsky wrote:
> From: Parav Pandit <parav@mellanox.com>
> 
> 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 <jackm@dev.mellanox.co.il>
> Signed-off-by: Parav Pandit <parav@mellanox.com>
> Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
> Signed-off-by: Leon Romanovsky <leon@kernel.org>
> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
> ---
>  drivers/infiniband/core/verbs.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Does not apply to the 4.14.y tree :(

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] IB/core: Perform modify QP on real one
  2018-11-28 10:58 ` Greg KH
@ 2018-11-28 11:26     ` Leon Romanovsky
  0 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2018-11-28 11:26 UTC (permalink / raw)
  To: Greg KH
  Cc: stable, linux-rdma, Parav Pandit, Jack Morgenstein, Jason Gunthorpe

[-- Attachment #1: Type: text/plain, Size: 3703 bytes --]

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 <parav@mellanox.com>
> >
> > 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 <jackm@dev.mellanox.co.il>
> > Signed-off-by: Parav Pandit <parav@mellanox.com>
> > Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
> > Signed-off-by: Leon Romanovsky <leon@kernel.org>
> > Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
> > ---
> >  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

From d63abe9b61d2a6789d1fa236f8e3b19df17eb3cb Mon Sep 17 00:00:00 2001
From: Parav Pandit <parav@mellanox.com>
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 <jackm@dev.mellanox.co.il>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 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/verbs.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 = ib_qp->real_qp;
 	int ret;

 	if (attr_mask & IB_QP_AV) {

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] IB/core: Perform modify QP on real one
@ 2018-11-28 11:26     ` Leon Romanovsky
  0 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2018-11-28 11:26 UTC (permalink / raw)
  To: Greg KH
  Cc: stable, linux-rdma, Parav Pandit, Jack Morgenstein, Jason Gunthorpe

[-- Attachment #1: Type: text/plain, Size: 3719 bytes --]

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 <parav@mellanox.com>
> >
> > 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 <jackm@dev.mellanox.co.il>
> > Signed-off-by: Parav Pandit <parav@mellanox.com>
> > Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
> > Signed-off-by: Leon Romanovsky <leon@kernel.org>
> > Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
> > ---
> >  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

From d63abe9b61d2a6789d1fa236f8e3b19df17eb3cb Mon Sep 17 00:00:00 2001
From: Parav Pandit <parav@mellanox.com>
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 <jackm@dev.mellanox.co.il>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 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/verbs.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 = ib_qp->real_qp;
 	int ret;

 	if (attr_mask & IB_QP_AV) {
--
2.19.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] IB/core: Perform modify QP on real one
  2018-11-28 11:26     ` Leon Romanovsky
  (?)
@ 2018-11-28 13:08     ` Greg KH
  -1 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2018-11-28 13:08 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: stable, linux-rdma, Parav Pandit, Jack Morgenstein, Jason Gunthorpe

On Wed, Nov 28, 2018 at 01:26:48PM +0200, Leon Romanovsky wrote:
> 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 <parav@mellanox.com>
> > >
> > > 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 <jackm@dev.mellanox.co.il>
> > > Signed-off-by: Parav Pandit <parav@mellanox.com>
> > > Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
> > > Signed-off-by: Leon Romanovsky <leon@kernel.org>
> > > Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
> > > ---
> > >  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.

That worked, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-28 22:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-29 15:12 [PATCH] IB/core: Perform modify QP on real one Leon Romanovsky
2018-10-29 15:12 ` Leon Romanovsky
2018-11-28 10:58 ` Greg KH
2018-11-28 11:26   ` Leon Romanovsky
2018-11-28 11:26     ` Leon Romanovsky
2018-11-28 13:08     ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.