On Tue, Jun 26, 2018 at 1:17 AM Vijay Immanuel <vijayi@xxxxxxxxxxxxxxxxx> wrote: > > On Sun, Jun 24, 2018 at 05:40:13PM +0300, Moni Shoua wrote: > > > @@ -726,6 +726,10 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask, > > > > > > case IB_QPS_RTR: > > > pr_debug("qp#%d state -> RTR\n", qp_num(qp)); > > > + qp->src_port = RXE_ROCE_V2_SPORT + > > > + (hash_64_generic > > > + (((u64)qp->attr.dest_qp_num << 24) + > > > + (u64)qp_num(qp), 14) & 0x3fff); > > Works for RC/UC but not for UD. At this point (mask & IB_QP_DEST_QPN) > > is false for UD transport. > > I think that you need to do similar work in rxe_requester() before > > sending a packet to UD QP. > Hi Moni, > That would put the logic in the main xmit path for UD and would require a per-pkt > src_port field (there's no space in rxe_pkt_info). > Stepping back a bit, I'm wondering whether the dest QPN needs to be included > in the hash. It only helps in the case where you have a source QP talking to > multpile dest QPs on the same dest IP. If UD traffic is spread across multiple > dest IPs you get scaling due to the IP address. Do we really need the extra > logic for UD, or make this simpler and use just the source QPN? > -- I'm willing to live with a fix only for RC/UC. Just make sure that it's clear in the commit message. However, src_port is not initialized for UD QP at all so all UD traffic will go from port 0 (zero) Maybe you can initialize it when you create a UD QP -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html