From: Karsten Graul <kgraul@linux.ibm.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
heiko.carstens@de.ibm.com, raspl@linux.ibm.com,
ubraun@linux.ibm.com
Subject: [PATCH net-next 6/8] net/smc: abnormal termination without orderly flag
Date: Thu, 14 Nov 2019 13:02:45 +0100 [thread overview]
Message-ID: <20191114120247.68889-7-kgraul@linux.ibm.com> (raw)
In-Reply-To: <20191114120247.68889-1-kgraul@linux.ibm.com>
From: Ursula Braun <ubraun@linux.ibm.com>
For abnormal termination issue an LLC DELETE_LINK without the
orderly flag.
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
---
net/smc/smc_core.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c
index 30854acb846c..ee44e8244d0c 100644
--- a/net/smc/smc_core.c
+++ b/net/smc/smc_core.c
@@ -161,10 +161,10 @@ static void smc_lgr_unregister_conn(struct smc_connection *conn)
* of the DELETE LINK sequence from server; or as server to
* initiate the delete processing. See smc_llc_rx_delete_link().
*/
-static int smc_link_send_delete(struct smc_link *lnk)
+static int smc_link_send_delete(struct smc_link *lnk, bool orderly)
{
if (lnk->state == SMC_LNK_ACTIVE &&
- !smc_llc_send_delete_link(lnk, SMC_LLC_REQ, true)) {
+ !smc_llc_send_delete_link(lnk, SMC_LLC_REQ, orderly)) {
smc_llc_link_deleting(lnk);
return 0;
}
@@ -201,7 +201,7 @@ static void smc_lgr_free_work(struct work_struct *work)
if (!lgr->is_smcd && !lgr->terminating) {
/* try to send del link msg, on error free lgr immediately */
if (lnk->state == SMC_LNK_ACTIVE &&
- !smc_link_send_delete(lnk)) {
+ !smc_link_send_delete(lnk, true)) {
/* reschedule in case we never receive a response */
smc_lgr_schedule_free_work(lgr);
spin_unlock_bh(lgr_lock);
@@ -1233,9 +1233,7 @@ static void smc_lgrs_shutdown(void)
if (!lgr->is_smcd) {
struct smc_link *lnk = &lgr->lnk[SMC_SINGLE_LINK];
- if (lnk->state == SMC_LNK_ACTIVE)
- smc_llc_send_delete_link(lnk, SMC_LLC_REQ,
- false);
+ smc_link_send_delete(&lgr->lnk[SMC_SINGLE_LINK], false);
smc_llc_link_inactive(lnk);
}
cancel_delayed_work_sync(&lgr->free_work);
--
2.17.1
next prev parent reply other threads:[~2019-11-14 12:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-14 12:02 [PATCH net-next 0/8] net/smc: improve termination handling (part 3) Karsten Graul
2019-11-14 12:02 ` [PATCH net-next 1/8] net/smc: fix final cleanup sequence for SMCD devices Karsten Graul
2019-11-14 12:02 ` [PATCH net-next 2/8] net/smc: immediate termination for SMCD link groups Karsten Graul
2019-11-14 12:02 ` [PATCH net-next 3/8] net/smc: abnormal termination of " Karsten Graul
2019-11-14 12:02 ` [PATCH net-next 4/8] net/smc: introduce bookkeeping " Karsten Graul
2019-11-14 12:02 ` [PATCH net-next 5/8] net/smc: no WR buffer wait for terminating link group Karsten Graul
2019-11-14 12:02 ` Karsten Graul [this message]
2019-11-14 12:02 ` [PATCH net-next 7/8] net/smc: wait for tx completions before link freeing Karsten Graul
2019-11-14 12:02 ` [PATCH net-next 8/8] net/smc: immediate termination for SMCR link groups Karsten Graul
2019-11-15 20:30 ` [PATCH net-next 0/8] net/smc: improve termination handling (part 3) David Miller
2019-11-16 16:37 ` Karsten Graul
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=20191114120247.68889-7-kgraul@linux.ibm.com \
--to=kgraul@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=raspl@linux.ibm.com \
--cc=ubraun@linux.ibm.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