Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Yanjun Zhu <yanjun.zhu@linux.dev>
To: Mark Zhang <markzhang@nvidia.com>,
	liangwenpeng@huawei.com, liweihang@huawei.com, jgg@ziepe.ca,
	mustafa.ismail@intel.com, shiraz.saleem@intel.com,
	zyjzyj2000@gmail.com, linux-rdma@vger.kernel.org
Subject: Re: [PATCH 1/4] RDMA/core: Calculate UDP source port based on flow label or lqpn/rqpn
Date: Wed, 5 Jan 2022 22:11:30 +0800	[thread overview]
Message-ID: <6cecca31-3b1a-fc74-4680-d556d2cc977b@linux.dev> (raw)
In-Reply-To: <dee99588-0710-c2b2-17b0-ba9d2f959a79@nvidia.com>


在 2022/1/5 21:51, Mark Zhang 写道:
> On 1/5/2022 4:07 PM, yanjun.zhu@linux.dev wrote:
>> From: Zhu Yanjun <yanjun.zhu@linux.dev>
>>
>> Calculate and set UDP source port based on the flow label. If flow label
>> is not defined in GRH then calculate it based on lqpn/rqpn.
>>
>> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
>> ---
>>   include/rdma/ib_verbs.h | 17 +++++++++++++++++
>>   1 file changed, 17 insertions(+)
>>
>> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
>> index 6e9ad656ecb7..2f122aa81f0f 100644
>> --- a/include/rdma/ib_verbs.h
>> +++ b/include/rdma/ib_verbs.h
>> @@ -4749,6 +4749,23 @@ static inline u32 rdma_calc_flow_label(u32 
>> lqpn, u32 rqpn)
>>       return (u32)(v & IB_GRH_FLOWLABEL_MASK);
>>   }
>>   +/**
>> + * rdma_get_udp_sport - Calculate and set UDP source port based on 
>> the flow
>> + *                      label. If flow label is not defined in GRH then
>> + *                      calculate it based on lqpn/rqpn.
>> + *
>> + * @fl:            flow label from GRH
>
> Indent:
> + * @fl:        flow label from GRH

Thanks. In V2, this problem is fixed.

>
>> + * @lqpn:        local qp number
>> + * @rqpn:        remote qp number
>> + */
>> +static inline u16 rdma_get_udp_sport(u32 fl, u32 lqpn, u32 rqpn)
>> +{
>> +    if (!fl)
>> +        fl = rdma_calc_flow_label(lqpn, rqpn);
>> +
>> +    return rdma_flow_label_to_udp_sport(fl);
>> +}
>> + >   const struct ib_port_immutable*
>>   ib_port_immutable_read(struct ib_device *dev, unsigned int port);
>>   #endif /* IB_VERBS_H */
>
> Maybe this and next patch can be squashed into one?

Why do you think this commit and next commit should be squashed into one?

Best Regards,

Zhu Yanjun


  reply	other threads:[~2022-01-05 14:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05  8:07 [PATCH 0/4] Generate UDP src port with flow label or lqpn/rqpn yanjun.zhu
2022-01-05  8:07 ` [PATCH 1/4] RDMA/core: Calculate UDP source port based on " yanjun.zhu
2022-01-05 13:51   ` Mark Zhang
2022-01-05 14:11     ` Yanjun Zhu [this message]
2022-01-05  8:07 ` [PATCH 2/4] RDMA/hns: Replace get_udp_sport with rdma_get_udp_sport yanjun.zhu
2022-01-05  8:07 ` [PATCH 3/4] RDMA/irdma: Make the source udp port vary yanjun.zhu
2022-01-04 17:18   ` Saleem, Shiraz
2022-01-04 19:26     ` Leon Romanovsky
2022-01-05  0:41       ` Yanjun Zhu
2022-01-05  8:07 ` [PATCH 4/4] RDMA/rxe: Use the standard method to produce udp source port yanjun.zhu
2022-01-04 17:17   ` Saleem, Shiraz
2022-01-05  0:33     ` Yanjun Zhu
2022-01-05 13:10       ` 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=6cecca31-3b1a-fc74-4680-d556d2cc977b@linux.dev \
    --to=yanjun.zhu@linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=liangwenpeng@huawei.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=liweihang@huawei.com \
    --cc=markzhang@nvidia.com \
    --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