[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a4b54142-e324-8c08-738b-b89046ccc794@linux.ibm.com>
Date: Tue, 4 Jan 2022 10:58:13 +0100
From: Karsten Graul <kgraul@...ux.ibm.com>
To: Wen Gu <guwen@...ux.alibaba.com>, davem@...emloft.net,
kuba@...nel.org
Cc: linux-s390@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, dust.li@...ux.alibaba.com,
tonylu@...ux.alibaba.com
Subject: Re: [PATCH net v2] net/smc: Reset conn->lgr when link group
registration fails
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.
Powered by blists - more mailing lists