summaryrefslogtreecommitdiffstats
path: root/net/smc/smc_core.c
diff options
context:
space:
mode:
authorKarsten Graul <kgraul@linux.ibm.com>2020-04-30 15:55:38 +0200
committerDavid S. Miller <davem@davemloft.net>2020-04-30 12:44:33 -0700
commit555da9af827d95134656fa459c8f3ece04dd867a (patch)
treef2d35cfc1e42ad9d560cbc09855e8365240586c2 /net/smc/smc_core.c
parent1569a3c44303834680e93df2ecf60f356be9b322 (diff)
downloadlinux-555da9af827d95134656fa459c8f3ece04dd867a.tar.bz2
net/smc: add event-based llc_flow framework
The new framework allows to start specific types of LLC control flows, protects active flows and makes it possible to wait for flows to finish before starting a new flow. This mechanism is used for the LLC control layer to model flows like 'add link' or 'delete link' which need to send/receive several LLC messages and are not allowed to get interrupted by the wrong type of messages. 'Add link' or 'Delete link' messages arriving in the middle of a flow are delayed and processed when the current flow finished. Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Reviewed-by: Ursula Braun <ubraun@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_core.c')
-rw-r--r--net/smc/smc_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c
index db49f8cd5c95..4867ddcfe0c6 100644
--- a/net/smc/smc_core.c
+++ b/net/smc/smc_core.c
@@ -263,6 +263,7 @@ static void smc_lgr_free_work(struct work_struct *work)
if (smc_link_usable(lnk))
lnk->state = SMC_LNK_INACTIVE;
}
+ wake_up_interruptible_all(&lgr->llc_waiter);
}
smc_lgr_free(lgr);
}
@@ -696,6 +697,7 @@ static void smc_lgr_cleanup(struct smc_link_group *lgr)
if (smc_link_usable(lnk))
lnk->state = SMC_LNK_INACTIVE;
}
+ wake_up_interruptible_all(&lgr->llc_waiter);
}
}