Skip to content

Commit b2bedfb

Browse files
paravmellanoxjgunthorpe
authored andcommitted
IB/core: Perform modify QP on real one
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. Fixes: a512c2f ("IB/core: Introduce modify QP operation with udata") Signed-off-by: Parav Pandit <[email protected]> Reviewed-by: Daniel Jurgens <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 4f9a301 commit b2bedfb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/infiniband/core/verbs.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@ static int ib_resolve_eth_dmac(struct ib_device *device,
13241324

13251325
/**
13261326
* ib_modify_qp_with_udata - Modifies the attributes for the specified QP.
1327-
* @qp: The QP to modify.
1327+
* @ib_qp: The QP to modify.
13281328
* @attr: On input, specifies the QP attributes to modify. On output,
13291329
* the current values of selected QP attributes are returned.
13301330
* @attr_mask: A bit-mask used to specify which attributes of the QP
@@ -1333,9 +1333,10 @@ static int ib_resolve_eth_dmac(struct ib_device *device,
13331333
* are being modified.
13341334
* It returns 0 on success and returns appropriate error code on error.
13351335
*/
1336-
int ib_modify_qp_with_udata(struct ib_qp *qp, struct ib_qp_attr *attr,
1336+
int ib_modify_qp_with_udata(struct ib_qp *ib_qp, struct ib_qp_attr *attr,
13371337
int attr_mask, struct ib_udata *udata)
13381338
{
1339+
struct ib_qp *qp = ib_qp->real_qp;
13391340
u8 port = attr_mask & IB_QP_PORT ? attr->port_num : qp->port;
13401341
int ret;
13411342

0 commit comments

Comments
 (0)