> Subject: [PATCH 3/4] RDMA/irdma: Make the source udp port vary > > From: Zhu Yanjun <yanjun.zhu@xxxxxxxxx> > > 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. > > Signed-off-by: Zhu Yanjun <yanjun.zhu@xxxxxxxxx> > --- > drivers/infiniband/hw/irdma/verbs.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c > index 8cd5f9261692..09dba7ed5ab9 100644 > --- a/drivers/infiniband/hw/irdma/verbs.c > +++ b/drivers/infiniband/hw/irdma/verbs.c > @@ -1167,6 +1167,11 @@ int irdma_modify_qp_roce(struct ib_qp *ibqp, struct > ib_qp_attr *attr, > > memset(&iwqp->roce_ah, 0, sizeof(iwqp->roce_ah)); > if (attr->ah_attr.ah_flags & IB_AH_GRH) { > + u32 fl = attr->ah_attr.grh.flow_label; > + u32 lqp = ibqp->qp_num; > + u32 rqp = roce_info->dest_qp; > + > + Do you really need these locals? udp_info->src_port = rdma_get_udp_sport(fl, lqp, rqp); > udp_info->ttl = attr->ah_attr.grh.hop_limit; > udp_info->flow_label = attr->ah_attr.grh.flow_label; > udp_info->tos = attr->ah_attr.grh.traffic_class; > -- > 2.27.0