All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yanjun Zhu <yanjun.zhu@linux.dev>
To: "Saleem, Shiraz" <shiraz.saleem@intel.com>,
	"yanjun.zhu@linux.dev" <yanjun.zhu@linux.dev>,
	"Ismail, Mustafa" <mustafa.ismail@intel.com>,
	"dledford@redhat.com" <dledford@redhat.com>,
	"jgg@ziepe.ca" <jgg@ziepe.ca>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: [PATCH 1/1] RDMA/irdma: Make the source udp port vary
Date: Sat, 18 Dec 2021 10:29:15 +0800	[thread overview]
Message-ID: <a660b16a-d2be-a3fb-131d-0d4a0c5a31fd@linux.dev> (raw)
In-Reply-To: <d62f36375fac4a1286194bcbddcf50d4@intel.com>

在 2021/12/17 10:02, Saleem, Shiraz 写道:
>> Subject: [PATCH 1/1] RDMA/irdma: Make the source udp port vary
>>
>> From: Zhu Yanjun <yanjun.zhu@linux.dev>
>>
>> Based on the link https://www.spinics.net/lists/linux-rdma/msg73735.html,
>> get the source udp port number for a QP based on the local QPN. This provides a
>> better spread of traffic across NIC RX queues.  The method in the commit
>> d3c04a3a6870 ("IB/rxe: vary the source udp port for receive
>> scaling") is stable. So it is also adopted in this commit.
>>
>> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
>> ---
>>   drivers/infiniband/hw/irdma/verbs.c | 7 ++++++-
>>   1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
>> index 102dc9342f2a..2697b40a539e 100644
>> --- a/drivers/infiniband/hw/irdma/verbs.c
>> +++ b/drivers/infiniband/hw/irdma/verbs.c
>> @@ -690,6 +690,11 @@ static int irdma_cqp_create_qp_cmd(struct irdma_qp
>> *iwqp)
>>   	return status ? -ENOMEM : 0;
>>   }
>>
>> +static inline u16 irdma_get_src_port(struct irdma_qp *iwqp) {
>> +	return 0xc000 + (hash_32_generic(iwqp->ibqp.qp_num, 14) & 0x3fff); }
>> +
> 
> There are core hash function helpers based on the grh.flow_label or lqpn/rqrpn that RoCEv2 drivers could use the to get the UDP src port?
> 
> https://elixir.bootlin.com/linux/v5.16-rc5/source/include/rdma/ib_verbs.h#L4719
> 
> Why don't we use them instead to set the udp_info->src_port in irdma_modify_qp_roce when the path address vector is provided?

Got it. I will send a new patch based on your suggestion.
Thanks.
Zhu Yanjun

> 
> Shiraz


      reply	other threads:[~2021-12-18  2:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-14  5:42 [PATCH 1/1] RDMA/irdma: Make the source udp port vary yanjun.zhu
2021-12-14 17:27 ` Tom Talpey
2021-12-14 17:29   ` Jason Gunthorpe
2021-12-14 18:09     ` Tom Talpey
2021-12-14 18:50       ` Jason Gunthorpe
2021-12-17  2:02 ` Saleem, Shiraz
2021-12-18  2:29   ` Yanjun Zhu [this message]

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=a660b16a-d2be-a3fb-131d-0d4a0c5a31fd@linux.dev \
    --to=yanjun.zhu@linux.dev \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mustafa.ismail@intel.com \
    --cc=shiraz.saleem@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.