From: Karsten Graul <kgraul@linux.ibm.com>
To: Wen Gu <guwen@linux.alibaba.com>, davem@davemloft.net, kuba@kernel.org
Cc: linux-s390@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH net] net/smc: Reset conn->lgr when link group registration fails
Date: Wed, 29 Dec 2021 14:07:11 +0100 [thread overview]
Message-ID: <07930fec-4109-0dfd-7df4-286cb56ec75b@linux.ibm.com> (raw)
In-Reply-To: <1640677770-112053-1-git-send-email-guwen@linux.alibaba.com>
On 28/12/2021 08:49, 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.
I agree with your fix to set conn->lgr to NULL when smc_lgr_register_conn() fails.
It would probably be better to have smc_lgr_register_conn() set conn->lgr instead to set
it before in smc_conn_create(). So it would not be set at all then the registration failes.
What I do not understand is the extra step after the new label out_unreg: that
may invoke smc_lgr_schedule_free_work(). You did not talk about that one.
Is the idea to have a new link group get freed() when a connection could not
be registered on it? In that case I would expect this code after label create:
in smc_lgr_create(), when the rc from smc_lgr_register_conn() is not zero.
Thoughts?
next prev parent reply other threads:[~2021-12-29 13:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-28 7:49 [RFC PATCH net] net/smc: Reset conn->lgr when link group registration fails Wen Gu
2021-12-29 13:07 ` Karsten Graul [this message]
2021-12-30 3:50 ` Wen Gu
2022-01-03 10:52 ` Karsten Graul
2022-01-04 2:13 ` Wen Gu
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=07930fec-4109-0dfd-7df4-286cb56ec75b@linux.ibm.com \
--to=kgraul@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=guwen@linux.alibaba.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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