Messages in this thread | | | Date | Wed, 5 Jan 2022 14:18:33 +0800 | Subject | Re: [PATCH net v2] net/smc: Reset conn->lgr when link group registration fails | From | Wen Gu <> |
| |
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
| |