aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/smc.h
diff options
context:
space:
mode:
authorUrsula Braun <ubraun@linux.ibm.com>2019-11-14 13:02:43 +0100
committerDavid S. Miller <davem@davemloft.net>2019-11-15 12:28:28 -0800
commit5edd6b9cb8d7c6c346c93c52a53735591127e879 (patch)
treeb8ef0b599ed2379d37c113e1b9a3f39c444a979b /include/net/smc.h
parentnet/smc: abnormal termination of SMCD link groups (diff)
downloadwireguard-linux-5edd6b9cb8d7c6c346c93c52a53735591127e879.tar.xz
wireguard-linux-5edd6b9cb8d7c6c346c93c52a53735591127e879.zip
net/smc: introduce bookkeeping of SMCD link groups
If the ism module is unloaded return control from exit routine only, if all link groups are freed. If an IB device is thrown away return control from device removal only, if all link groups belonging to this device are freed. A counters for the total number of SMCD link groups per ISM device is introduced. ism module unloading continues only if the total number of SMCD link groups for all ISM devices is zero. ISM device removal continues only it the total number of SMCD link groups per ISM device has decreased to zero. Signed-off-by: Ursula Braun <ubraun@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/smc.h')
-rw-r--r--include/net/smc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/smc.h b/include/net/smc.h
index 7c2082341bb3..646feb4bc75f 100644
--- a/include/net/smc.h
+++ b/include/net/smc.h
@@ -79,6 +79,8 @@ struct smcd_dev {
bool pnetid_by_user;
struct list_head lgr_list;
spinlock_t lgr_lock;
+ atomic_t lgr_cnt;
+ wait_queue_head_t lgrs_deleted;
u8 going_away : 1;
};