]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: add new link state and related helpers
authorKarsten Graul <kgraul@linux.ibm.com>
Wed, 29 Apr 2020 15:10:43 +0000 (17:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Apr 2020 19:26:32 +0000 (12:26 -0700)
commita39e749ce891c8187f8eafa2d1f96af8e22bfab0
treec056b8e27021556cc3b69dae521c3b1ef5ccfc63
parent1450e41200599c39232339820a7ef20a2970684c
net/smc: add new link state and related helpers

Before a link can be reused it must have been cleared. Lowest current
link state is INACTIVE, which does not mean that the link is already
cleared.
Add a new state UNUSED that is set when the link is cleared and can be
reused.
Add helper smc_llc_usable_link() to find an active link in a link group,
and smc_link_usable() to determine if a link is usable.

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>
net/smc/smc_core.c
net/smc/smc_core.h
net/smc/smc_llc.c
net/smc/smc_llc.h
net/smc/smc_wr.c