]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: return ETIMEDOUT when smc_connect_clc() timeout
authorD. Wythe <alibuda@linux.alibaba.com>
Tue, 15 Feb 2022 08:24:50 +0000 (16:24 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 17 Feb 2022 04:31:39 +0000 (20:31 -0800)
commit61dd6bd96bd3da4073afa7bac0a313a1e772c6a2
treee3261bca70a662a658106e6bc15557ba27628b87
parentb5066f24a51436a3b47cc54ebdabbb8e2f33bd5d
net/smc: return ETIMEDOUT when smc_connect_clc() timeout

When smc_connect_clc() times out, it will return -EAGAIN(tcp_recvmsg
retuns -EAGAIN while timeout), then this value will passed to the
application, which is quite confusing to the applications, makes
inconsistency with TCP.

From the manual of connect, ETIMEDOUT is more suitable, and this patch
try convert EAGAIN to ETIMEDOUT in that case.

Signed-off-by: D. Wythe <alibuda@linux.alibaba.com>
Reviewed-by: Karsten Graul <kgraul@linux.ibm.com>
Link: https://lore.kernel.org/r/1644913490-21594-1-git-send-email-alibuda@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/smc/af_smc.c