Skip to content

Commit ae95b11

Browse files
paravmellanoxjfvogel
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]> (cherry picked from commit b2bedfb) Orabug: 28673621 Signed-off-by: Gerd Rausch <[email protected]> Reviewed-by: Sudhakar Dindukurti <[email protected]>
1 parent 02c81c2 commit ae95b11

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
@@ -1311,7 +1311,7 @@ static int ib_resolve_eth_dmac(struct ib_device *device,
13111311

13121312
/**
13131313
* ib_modify_qp_with_udata - Modifies the attributes for the specified QP.
1314-
* @qp: The QP to modify.
1314+
* @ib_qp: The QP to modify.
13151315
* @attr: On input, specifies the QP attributes to modify. On output,
13161316
* the current values of selected QP attributes are returned.
13171317
* @attr_mask: A bit-mask used to specify which attributes of the QP
@@ -1320,9 +1320,10 @@ static int ib_resolve_eth_dmac(struct ib_device *device,
13201320
* are being modified.
13211321
* It returns 0 on success and returns appropriate error code on error.
13221322
*/
1323-
int ib_modify_qp_with_udata(struct ib_qp *qp, struct ib_qp_attr *attr,
1323+
int ib_modify_qp_with_udata(struct ib_qp *ib_qp, struct ib_qp_attr *attr,
13241324
int attr_mask, struct ib_udata *udata)
13251325
{
1326+
struct ib_qp *qp = ib_qp->real_qp;
13261327
u8 port = attr_mask & IB_QP_PORT ? attr->port_num : qp->port;
13271328
int ret;
13281329

0 commit comments

Comments
 (0)