Skip to content

Commit

Permalink
RDMA/rxe: Use the standard method to produce udp source port
Browse files Browse the repository at this point in the history
Use the standard method to produce udp source port.

Link: https://lore.kernel.org/r/20220106180359.2915060-5-yanjun.zhu@linux.dev
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
  • Loading branch information
Zhu Yanjun authored and Jason Gunthorpe committed Jan 7, 2022
1 parent 69e609b commit 104f062
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/infiniband/sw/rxe/rxe_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,11 @@ static int rxe_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
if (err)
goto err1;

if ((mask & IB_QP_AV) && (attr->ah_attr.ah_flags & IB_AH_GRH))
qp->src_port = rdma_get_udp_sport(attr->ah_attr.grh.flow_label,
qp->ibqp.qp_num,
qp->attr.dest_qp_num);

return 0;

err1:
Expand Down

0 comments on commit 104f062

Please sign in to comment.