Re: [PATCH 3/4] RDMA/irdma: Make the source udp port vary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



在 2022/1/5 3:26, Leon Romanovsky 写道:
On Tue, Jan 04, 2022 at 05:18:01PM +0000, Saleem, Shiraz wrote:
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?

I asked same question in previous revision.

Zhu, please remove them.

Hi, Leon Romanovsky && Saleem, Shiraz

Without these local variables, the line "udp_info->src_port = rdma_get_udp_sport(fl, lqp, rqp);" will exceed 80. This will cause warning when this commit is checked by script/checkpatch.pl.

Let me have a try to find a better way to avoid these local variables.

Zhu Yanjun


Thanks




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux