All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cheng Xu <chengyou@linux.alibaba.com>
To: Bernard Metzler <BMT@zurich.ibm.com>,
	"jgg@ziepe.ca" <jgg@ziepe.ca>,
	"dledford@redhat.com" <dledford@redhat.com>
Cc: "leon@kernel.org" <leon@kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"KaiShen@linux.alibaba.com" <KaiShen@linux.alibaba.com>,
	"tonylu@linux.alibaba.com" <tonylu@linux.alibaba.com>
Subject: Re: [PATCH rdma-next v2 08/11] RDMA/erdma: Add connection management (CM) support
Date: Thu, 20 Jan 2022 10:50:59 +0800	[thread overview]
Message-ID: <bc98f3d7-e400-db94-4c75-b92b556011fa@linux.alibaba.com> (raw)
In-Reply-To: <BYAPR15MB263196636F8243CF6C653DE599599@BYAPR15MB2631.namprd15.prod.outlook.com>



On 1/19/22 5:56 PM, Bernard Metzler wrote:
> 
> 
>> -----Original Message-----
>> From: Cheng Xu <chengyou@linux.alibaba.com>
>> Sent: Wednesday, 19 January 2022 04:58
>> To: Bernard Metzler <BMT@zurich.ibm.com>; jgg@ziepe.ca;
>> dledford@redhat.com
>> Cc: leon@kernel.org; linux-rdma@vger.kernel.org;
>> KaiShen@linux.alibaba.com; tonylu@linux.alibaba.com
>> Subject: [EXTERNAL] Re: [PATCH rdma-next v2 08/11] RDMA/erdma: Add
>> connection management (CM) support
>>
>>
>>
>> On 1/18/22 10:49 PM, Bernard Metzler wrote:
>>>
>>
>> <...>
>>
>>>> +		cm_id = cep->listen_cep->cm_id;
>>>> +
>>>> +		event.ird = cep->dev->attrs.max_ird;
>>>> +		event.ord = cep->dev->attrs.max_ord;
>>>
>>> Provide to the user also the negotiated  IRD/ORD of the
>>> reply. Things may have changed upon peer's request.
>>> See current siw code for the details.
>>>
>>
>> IRD/ORD in ERDMA hardware is fixed, no need to negotiate them in MPA
>> request/reply now. For this reason, we didn't follow siw with MPA v2.
> 
> How is that working? Is the idea that the adapter implements a fixed
> value which (hopefully) always exceeds any ULP requested IRD/ORD?

Yes, for better IRQ/ORQ queue buffer alignment in hardware, we use a fix
depth in our device. ULPs call iw_connect()/iw_accept() with ird/ord in
iw_cm_conn_param, if exceed, return -EINVAL immediately, this ensures
erdma always have enough IRQ/ORQ resources.

> In any case, the negotiated (even if fixed) value MUST be provided
> to the ULP's at both ends. In the erdma case, it is likely more than the
> ULP was asking for. See RFC 5040, section 6.1
> https://datatracker.ietf.org/doc/html/rfc5040#section-6.1
> 

I think the values of IRD/ORD does influence the behavior of ULPs,
the purpose of IRD/ORD negotiation is making sure that both ends of the
RNICs have enough resources, otherwise overflow may happens.

For ULPs, They always can post as many RDMA Read as they can (not exceed
the max_send_wr), no matter the value of IRD/ORD is, RDMA Read will be
delayed if ORD value goes to zero [1]. In erdma case with fix ORQ/IRQ
depth, the ORD/IRD is more likes a flow control credit. And we will
consider this.

[1] 
https://datatracker.ietf.org/doc/html/draft-hilland-rddp-verbs-00#section-6.5


> 
>>
>>>> +	} else {
>>>> +		cm_id = cep->cm_id;
>>>> +	}
>>>> +
>>>> +	if (reason == IW_CM_EVENT_CONNECT_REQUEST ||
>>>> +	    reason == IW_CM_EVENT_CONNECT_REPLY) {
>>>> +		u16 pd_len = be16_to_cpu(cep->mpa.hdr.params.pd_len);
>>>> +
>>>
>>> Does erdma support MPA protocol version 2, and enhanced connection
>>> setup protocol? In that case, some private data contain protocol
>>> information and must be hidden to the user.
>>>
>>
>> Now we follow MPA v1. And due to specially network environment in Cloud
>> VPC, we extend the MPA v1: We exchange information with a extend header,
>> which followed with original MPA v1 header.
> 
> This is control information placed between MPAv1 header and ULP's
> private data? So erdma is not interoperable with a device implementing
> IETF iWarp?
> 

Yes, but this is not the major reason. As I mentioned in the cover
letter, erdma is a RNIC provided by our MOC hardware in VPC
environment, and we do not sell erdma cards (indeed no single physical
cards, erdma is generated & accelerated by MOC) but the the VMs or bare
metals with ERDMA feature. No other iWarp devices in VPC physically, and
ERDMA can communicate with.

Thanks,
Cheng Xu,

  reply	other threads:[~2022-01-20  2:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 14:49 [PATCH rdma-next v2 08/11] RDMA/erdma: Add connection management (CM) support Bernard Metzler
2022-01-19  3:58 ` Cheng Xu
2022-01-19  9:56   ` Bernard Metzler
2022-01-20  2:50     ` Cheng Xu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-01-17  8:48 [PATCH rdma-next v2 00/11] Elastic RDMA Adapter (ERDMA) driver Cheng Xu
2022-01-17  8:48 ` [PATCH rdma-next v2 08/11] RDMA/erdma: Add connection management (CM) support Cheng Xu

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=bc98f3d7-e400-db94-4c75-b92b556011fa@linux.alibaba.com \
    --to=chengyou@linux.alibaba.com \
    --cc=BMT@zurich.ibm.com \
    --cc=KaiShen@linux.alibaba.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=tonylu@linux.alibaba.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.