net/smc: introduce bookkeeping of SMCD link groups
authorUrsula Braun <ubraun@linux.ibm.com>
Thu, 14 Nov 2019 12:02:43 +0000 (13:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Nov 2019 20:28:28 +0000 (12:28 -0800)
commit5edd6b9cb8d7c6c346c93c52a53735591127e879
treeb8ef0b599ed2379d37c113e1b9a3f39c444a979b
parent5421ec281df9dfda4418c02959e1f76097cabd9a
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>
include/net/smc.h
net/smc/smc_core.c
net/smc/smc_ism.c