linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: yanjun.zhu@linux.dev
To: liangwenpeng@huawei.com, jgg@ziepe.ca, mustafa.ismail@intel.com,
	shiraz.saleem@intel.com, zyjzyj2000@gmail.com,
	linux-rdma@vger.kernel.org, yanjun.zhu@linux.dev
Subject: [PATCH 3/5] RDMA/irdma: Make the source udp port vary
Date: Wed,  5 Jan 2022 17:12:35 -0500	[thread overview]
Message-ID: <20220105221237.2659462-4-yanjun.zhu@linux.dev> (raw)
In-Reply-To: <20220105221237.2659462-1-yanjun.zhu@linux.dev>

From: Zhu Yanjun <yanjun.zhu@linux.dev>

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@linux.dev>
---
 drivers/infiniband/hw/irdma/verbs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
index 8cd5f9261692..8234a101e752 100644
--- a/drivers/infiniband/hw/irdma/verbs.c
+++ b/drivers/infiniband/hw/irdma/verbs.c
@@ -1170,6 +1170,10 @@ int irdma_modify_qp_roce(struct ib_qp *ibqp, struct ib_qp_attr *attr,
 			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;
+			udp_info->src_port = rdma_get_udp_sport(
+						udp_info->flow_label,
+						ibqp->qp_num,
+						roce_info->dest_qp);
 			irdma_qp_rem_qos(&iwqp->sc_qp);
 			dev->ws_remove(iwqp->sc_qp.vsi, ctx_info->user_pri);
 			ctx_info->user_pri = rt_tos2priority(udp_info->tos);
-- 
2.27.0


  parent reply	other threads:[~2022-01-05  5:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 22:12 [PATCHv2 0/5] Generate UDP src port with flow label or lqpn/rqpn yanjun.zhu
2022-01-05 22:12 ` [PATCH 1/5] RDMA/core: Calculate UDP source port based on " yanjun.zhu
2022-01-05  7:49   ` Leon Romanovsky
2022-01-05 22:12 ` [PATCH 2/5] RDMA/hns: Replace get_udp_sport with rdma_get_udp_sport yanjun.zhu
2022-01-05  7:49   ` Leon Romanovsky
2022-01-05 22:12 ` yanjun.zhu [this message]
2022-01-05  7:50   ` [PATCH 3/5] RDMA/irdma: Make the source udp port vary Leon Romanovsky
2022-01-05 15:40   ` Saleem, Shiraz
2022-01-05 22:12 ` [PATCH 4/5] RDMA/rxe: Use the standard method to produce udp source port yanjun.zhu
2022-01-05  7:52   ` Leon Romanovsky
2022-01-05  8:27     ` Zhu Yanjun
2022-01-05  8:55       ` Leon Romanovsky
2022-01-05  9:13         ` yanjun.zhu
2022-01-05 12:42         ` Zhu Yanjun
2022-01-05 22:12 ` [PATCH 5/5] RDMA/rxe: Remove the redundant randomization for UDP " yanjun.zhu
2022-01-05  7:49   ` Leon Romanovsky
2022-01-05  8:42     ` yanjun.zhu
2022-01-05  8:56       ` Leon Romanovsky
2022-01-05  9:03         ` yanjun.zhu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220105221237.2659462-4-yanjun.zhu@linux.dev \
    --to=yanjun.zhu@linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=liangwenpeng@huawei.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mustafa.ismail@intel.com \
    --cc=shiraz.saleem@intel.com \
    --cc=zyjzyj2000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).