Skip to contentSkip to conversation

IB/core: Perform modify QP on real one

PATCH In review Leon Romanovsky 2 participants 4 messages Oct 29, 2018 – Nov 28, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IB/core: Perform modify QP on real one

From: Parav Pandit <[email protected]>

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")
---
 drivers/infiniband/core/verbs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/infiniband/core/verbs.c +3 -2
index feb80db..6d59af0 100644
@@ -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) {
maintainer
#1 lore raw
Quoted 23 lines · Leon Romanovsky

From: Parav Pandit <[email protected]>

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")
Quoted 3 lines
---
 drivers/infiniband/core/verbs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Does not apply to the 4.14.y tree :(

author Reviewed-by Daniel Jurgens
#2 lore raw
Quoted 28 lines · Greg KH
Quoted 23 lines · Leon Romanovsky

From: Parav Pandit <[email protected]>

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")
Quoted 3 lines
---
 drivers/infiniband/core/verbs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Quoted 1 line

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 <[email protected]>
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")
---
 drivers/infiniband/core/verbs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/infiniband/core/verbs.c +3 -2
index feb80dbb5948..6d59af07d338 100644
@@ -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) {
maintainer
#3 lore raw
Quoted 29 lines · Leon Romanovsky
Quoted 28 lines · Greg KH
Quoted 26 lines · Leon Romanovsky

From: Parav Pandit <[email protected]>

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")
---
 drivers/infiniband/core/verbs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Quoted 4 lines
Quoted 1 line

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