From: Tom Talpey <tom@talpey.com>
To: Hyunchul Lee <hyc.lee@gmail.com>
Cc: linux-cifs <linux-cifs@vger.kernel.org>,
Namjae Jeon <linkinjeon@kernel.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Steve French <smfrench@gmail.com>
Subject: Re: [PATCH 2/2] ksmbd: smbd: handle RDMA CM time wait event
Date: Wed, 15 Jun 2022 14:52:54 -0400 [thread overview]
Message-ID: <26e088a7-ddf0-8c18-69c8-49fb53813f8d@talpey.com> (raw)
In-Reply-To: <CANFS6bbNima0zLDWVboq3gd4Szbio7owAs09cesf7SFUHPjWyQ@mail.gmail.com>
On 6/14/2022 10:14 PM, Hyunchul Lee wrote:
> 2022년 6월 14일 (화) 오후 8:56, Tom Talpey <tom@talpey.com>님이 작성:
>>
>>
>> On 6/13/2022 7:01 PM, Hyunchul Lee wrote:
>>> After a QP has been disconnected, it stays
>>> in a timewait state for in flight packets.
>>> After the state has completed,
>>> RDMA_CM_EVENT_TIMEWAIT_EXIT is reported.
>>> Disconnect on RDMA_CM_EVENT_TIMEWAIT_EXIT
>>> so that ksmbd can restart.
>>>
>>> Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
>>> ---
>>> fs/ksmbd/transport_rdma.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/fs/ksmbd/transport_rdma.c b/fs/ksmbd/transport_rdma.c
>>> index d035e060c2f0..4b1a471afcd0 100644
>>> --- a/fs/ksmbd/transport_rdma.c
>>> +++ b/fs/ksmbd/transport_rdma.c
>>> @@ -1535,6 +1535,7 @@ static int smb_direct_cm_handler(struct rdma_cm_id *cm_id,
>>> wake_up_interruptible(&t->wait_status);
>>> break;
>>> }
>>> + case RDMA_CM_EVENT_TIMEWAIT_EXIT:
>>> case RDMA_CM_EVENT_DEVICE_REMOVAL:
>>> case RDMA_CM_EVENT_DISCONNECTED: {
>>> t->status = SMB_DIRECT_CS_DISCONNECTED;
>>
>> Is this issue seen on all RDMA providers? Because I would normally
>> expect that an RDMA_CM_EVENT_DISCONNECTED will precede the TIMEWAIT
>> event. What scenarios have you seen this not occur?
>>
>
> There was an issue that ksmbd got stuck after attempting to shutdown.
> We are trying to reproduce it, but we haven't reproduced it yet,
> but It seems to be related to the TIMEWAIT event.
I don't think it's appropriate to add this case to SMB. I think it's
quite unlikely that it will address anything, because an RDMA provider
must have indicated a CM_EVENT_DISCONNECTED prior to any TIMEWAIT.
So, the QP (and connection) will already have been torn down by ksmbd
at the earlier event. Perhaps ksmbd did not properly drain the QP at
the initial disconnect.
> And other drivers such as nvme have disconnected on the TIMEWAIT event.
NVME is a completely different upper layer, and has different client/
server transport behavior. The SMB session insulates its peers from
most transport errors, and should not be requesting timewait for
its connections, and definitely not waiting for timewait to expire
before initiating teardown (or recovery). The NFS/RDMA client and
server ignore this event, btw.
>> Unless ksmbd wishes to reuse its QP's, which is not currently the
>> case (right?), there's pretty much no reason to manage QP state and
>> hang around for TIMEWAIT.
>
> Right, ksmbd doesn't reuse QP.
Then there appears to be no good justification for the change. Sorry,
but it's a NAK from me.
Tom.
next prev parent reply other threads:[~2022-06-15 18:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-13 23:01 [PATCH 1/2] ksmbd: remove duplicate flag set in smb2_write Hyunchul Lee
2022-06-13 23:01 ` [PATCH 2/2] ksmbd: smbd: handle RDMA CM time wait event Hyunchul Lee
2022-06-13 23:10 ` Namjae Jeon
2022-06-14 11:56 ` Tom Talpey
2022-06-15 2:14 ` Hyunchul Lee
2022-06-15 18:52 ` Tom Talpey [this message]
2022-06-17 7:51 ` Hyunchul Lee
2022-06-13 23:08 ` [PATCH 1/2] ksmbd: remove duplicate flag set in smb2_write Namjae Jeon
2022-06-13 23:12 ` Hyunchul Lee
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=26e088a7-ddf0-8c18-69c8-49fb53813f8d@talpey.com \
--to=tom@talpey.com \
--cc=hyc.lee@gmail.com \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=senozhatsky@chromium.org \
--cc=smfrench@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