From: Wen Gu <guwen@linux.alibaba.com>
To: Karsten Graul <kgraul@linux.ibm.com>,
davem@davemloft.net, kuba@kernel.org
Cc: linux-s390@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, dust.li@linux.alibaba.com,
tonylu@linux.alibaba.com
Subject: Re: [PATCH net v2] net/smc: Reset conn->lgr when link group registration fails
Date: Wed, 5 Jan 2022 14:18:33 +0800 [thread overview]
Message-ID: <8242aa42-4356-0333-4e59-3d6a6f20d737@linux.alibaba.com> (raw)
In-Reply-To: <a4b54142-e324-8c08-738b-b89046ccc794@linux.ibm.com>
Thanks for your reply.
On 2022/1/4 5:58 pm, Karsten Graul wrote:
> On 04/01/2022 03:59, Wen Gu wrote:
>> SMC connections might fail to be registered to a link group due to
>> things like unable to find a link to assign to in its creation. As
>> a result, connection creation will return a failure and most
>> resources related to the connection won't be applied or initialized,
>> such as conn->abort_work or conn->lnk.
>
> Patch looks good to me, but one more thing to think about:
>
> Would it be better to invoke __smc_lgr_terminate() instead of smc_lgr_schedule_free_work()
> when a link group was created but cannot be used now? This would immediately free up all
> allocated resources for this unusable link group instead of starting the default 10-minute
> timer until the link group is freed.
> __smc_lgr_terminate() takes care of completely removing the link group in the context of
> its caller. It is also used from within smc_lgr_cleanup_early() that is used when the very
> first connection of a link group is aborted.
Thanks for your suggestion.
I also agree with using link group termination function for a immediate free.
I will improve it and send a v3 patch.
Thanks,
Wen Gu
prev parent reply other threads:[~2022-01-05 6:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-04 2:59 [PATCH net v2] net/smc: Reset conn->lgr when link group registration fails Wen Gu
2022-01-04 9:58 ` Karsten Graul
2022-01-05 6:18 ` Wen Gu [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=8242aa42-4356-0333-4e59-3d6a6f20d737@linux.alibaba.com \
--to=guwen@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=dust.li@linux.alibaba.com \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@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