From: Karsten Graul <kgraul@linux.ibm.com>
To: Tony Lu <tonylu@linux.alibaba.com>
Cc: kuba@kernel.org, davem@davemloft.net, guwen@linux.alibaba.com,
netdev@vger.kernel.org, linux-s390@vger.kernel.org,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH RFC net] net/smc: Ensure the active closing peer first closes clcsock
Date: Tue, 23 Nov 2021 10:26:21 +0100 [thread overview]
Message-ID: <d83109fe-ae25-def0-b28e-f8695d4535c7@linux.ibm.com> (raw)
In-Reply-To: <20211116033011.16658-1-tonylu@linux.alibaba.com>
On 16/11/2021 04:30, Tony Lu wrote:
> diff --git a/net/smc/smc_close.c b/net/smc/smc_close.c
> index 0f9ffba07d26..04620b53b74a 100644
> --- a/net/smc/smc_close.c
> +++ b/net/smc/smc_close.c
> @@ -228,6 +228,12 @@ int smc_close_active(struct smc_sock *smc)
> /* send close request */
> rc = smc_close_final(conn);
> sk->sk_state = SMC_PEERCLOSEWAIT1;
> +
> + /* actively shutdown clcsock before peer close it,
> + * prevent peer from entering TIME_WAIT state.
> + */
> + if (smc->clcsock && smc->clcsock->sk)
> + rc = kernel_sock_shutdown(smc->clcsock, SHUT_RDWR);
> } else {
While integrating this patch I stumbled over the overwritten rc, which was
already set with the return value from smc_close_final().
Is the rc from kernel_sock_shutdown() even important for the result of this
function? How to handle this in your opinion?
next prev parent reply other threads:[~2021-11-23 9:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 3:30 [PATCH RFC net] net/smc: Ensure the active closing peer first closes clcsock Tony Lu
2021-11-17 16:19 ` Karsten Graul
2021-11-22 16:47 ` Karsten Graul
2021-11-23 3:03 ` Tony Lu
2021-11-23 9:26 ` Karsten Graul [this message]
2021-11-24 8:57 ` Tony Lu
2021-11-24 10:08 ` Karsten Graul
2021-11-24 11:26 ` Tony Lu
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=d83109fe-ae25-def0-b28e-f8695d4535c7@linux.ibm.com \
--to=kgraul@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=guwen@linux.alibaba.com \
--cc=kuba@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox