]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: improve return codes for SMC-Dv2
authorKarsten Graul <kgraul@linux.ibm.com>
Sat, 31 Oct 2020 18:19:38 +0000 (19:19 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 31 Oct 2020 22:44:13 +0000 (15:44 -0700)
commit27fffb43537201a5fef1c78e402a26e4d9f3b2dd
tree6b73ef2ea707b1d3a8ab572b04a7d1570d46c6fd
parent652488a6ce254171a0ea92ed367f55cc6f65a017
net/smc: improve return codes for SMC-Dv2

To allow better problem diagnosis the return codes for SMC-Dv2 are
improved by this patch. A few more CLC DECLINE codes are defined and
sent to the peer when an SMC connection cannot be established.
There are now multiple SMC variations that are offered by the client and
the server may encounter problems to initialize all of them.
Because only one diagnosis code can be sent to the client the decision
was made to send the first code that was encountered. Because the server
tries the variations in the order of importance (SMC-Dv2, SMC-D, SMC-R)
this makes sure that the diagnosis code of the most important variation
is sent.

v2: initialize rc in smc_listen_v2_check().

Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Link: https://lore.kernel.org/r/20201031181938.69903-1-kgraul@linux.ibm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/smc/af_smc.c
net/smc/smc_clc.h
net/smc/smc_core.h