]> 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)
commit48ae56438bd98a1a75eac2e8e2c7623642e2906d
tree6b73ef2ea707b1d3a8ab572b04a7d1570d46c6fd
parent0a9d2e0b3ff45d440d6c6ce1f113e1f8aa8af88c
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