From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
Mark Zhang <markz@mellanox.com>,
Alex Rosenbaum <alexr@mellanox.com>, <linux-rdma@vger.kernel.org>,
Parav Pandit <parav@mellanox.com>
Subject: Re: [PATCH rdma-next] IB/cm: Consider local communication ID when check for a stale connection
Date: Fri, 31 Jul 2020 14:47:06 -0300 [thread overview]
Message-ID: <20200731174706.GA513882@nvidia.com> (raw)
In-Reply-To: <20200716104158.1422501-1-leon@kernel.org>
On Thu, Jul 16, 2020 at 01:41:58PM +0300, Leon Romanovsky wrote:
> From: Mark Zhang <markz@mellanox.com>
>
> Made the check for duplicate/stale CM more strict by adding comparison
> for remote communication ID field.
>
> The absence of such strict check causes to the following flows not being
> handled properly:
> 1. Client tries to setup more than one connection with same QP in
> a server (e.g., when use external QP), the client would reject
> the reply.
This is correct and required behavior by IBA:
12.9.8.3.1 REQ RECEIVED / REP RECEIVED
(RC, UC, XRC) A CM may receive a REQ/REP specifying a remote QPN in
“REQ:local QPN”/”REP:local QPN” that the CM already considers
connected to a local QP.
> 2. Client node reboots, and when it gets the same QP number as that
> of before the reboot time, the server would rejects the request.
IBA has a specific flow that should be followed for this case:
When a CM receives such a REQ/REP it shall abort the connection
establishment by issuing REJ to the REQ/REP. It shall then issue DREQ,
with “DREQ:remote QPN” set to the remote QPN from the REQ/REP, until
DREP is received or Max Retries is exceeded, and place the local QP
in the TimeWait state.
The fundmental issue is IBA does not include the SRC QPN in any RC
packets. It is the responsiblity of each end port to ensure that only
one RC QP is setup sending traffic to a given DLID/DQPN pair.
This is what the timewait mechanism and these checks in the CM are
for. The proper CM use will ensure that the local QP targetting the
DLID/DQPN is destroyed before the cm_id enters timedwait, and the
timedwait will prevent a new QP from being established with the same
parameters until the network has flushed all packets related to the
old sending QP.
Jason
prev parent reply other threads:[~2020-07-31 17:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-16 10:41 [PATCH rdma-next] IB/cm: Consider local communication ID when check for a stale connection Leon Romanovsky
2020-07-31 17:47 ` Jason Gunthorpe [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=20200731174706.GA513882@nvidia.com \
--to=jgg@nvidia.com \
--cc=alexr@mellanox.com \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=markz@mellanox.com \
--cc=parav@mellanox.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.