Commit 74696496 authored by Litao Jiao's avatar Litao Jiao
Browse files

net/smc: align the connect behaviour with TCP

mainline inclusion
from mainline-v5.19-rc1
commit 3aba1030
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6TK1U
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3aba103006bcc4a7472b7c9506b3bc065ffb7992



--------------------------------

Connect with O_NONBLOCK will not be completed immediately
and returns -EINPROGRESS. It is possible to use selector/poll
for completion by selecting the socket for writing. After select
indicates writability, a second connect function call will return
0 to indicate connected successfully as TCP does, but smc returns
-EISCONN. Use socket state for smc to indicate connect state, which
can help smc aligning the connect behaviour with TCP.

Signed-off-by: default avatarGuangguan Wang <guangguan.wang@linux.alibaba.com>
Acked-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarLitao Jiao <jiaolitao@sangfor.com.cn>
parent 22bae0fc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment