Skip to content

Commit 69e609b

Browse files
zhuyjjgunthorpe
authored andcommitted
RDMA/irdma: Make the source udp port vary
Get the source udp port number for a QP based on the grh.flow_label or lqpn/rqrpn. This provides a better spread of traffic across NIC RX queues. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Zhu Yanjun <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Acked-by: Shiraz Saleem <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 93f8df5 commit 69e609b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/infiniband/hw/irdma/verbs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,10 @@ int irdma_modify_qp_roce(struct ib_qp *ibqp, struct ib_qp_attr *attr,
11711171
udp_info->ttl = attr->ah_attr.grh.hop_limit;
11721172
udp_info->flow_label = attr->ah_attr.grh.flow_label;
11731173
udp_info->tos = attr->ah_attr.grh.traffic_class;
1174+
udp_info->src_port =
1175+
rdma_get_udp_sport(udp_info->flow_label,
1176+
ibqp->qp_num,
1177+
roce_info->dest_qp);
11741178
irdma_qp_rem_qos(&iwqp->sc_qp);
11751179
dev->ws_remove(iwqp->sc_qp.vsi, ctx_info->user_pri);
11761180
ctx_info->user_pri = rt_tos2priority(udp_info->tos);

0 commit comments

Comments
 (0)