Skip to content

Commit 104f062

Browse files
zhuyjjgunthorpe
authored andcommitted
RDMA/rxe: Use the standard method to produce udp source port
Use the standard method to produce udp source port. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Zhu Yanjun <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 69e609b commit 104f062

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/infiniband/sw/rxe/rxe_verbs.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,11 @@ static int rxe_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
468468
if (err)
469469
goto err1;
470470

471+
if ((mask & IB_QP_AV) && (attr->ah_attr.ah_flags & IB_AH_GRH))
472+
qp->src_port = rdma_get_udp_sport(attr->ah_attr.grh.flow_label,
473+
qp->ibqp.qp_num,
474+
qp->attr.dest_qp_num);
475+
471476
return 0;
472477

473478
err1:

0 commit comments

Comments
 (0)