Re: [PATCH net 2/2] net/smc: align the connect behaviour with TCP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2022/5/10 17:30, Tony Lu wrote:
> On Mon, May 09, 2022 at 07:58:37PM +0800, Guangguan Wang wrote:
>> 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
> 
> If the connection is established successfully, the following up call of
> connect() returns -EISCONN (SS_CONNECTED), which is expected and SMC
> does it, same as TCP.
> 
> In case of misunderstanding, could you append more detailed information?
> 
> Thanks,
> Tony Lu
> 

io_uring uses nonblocking connect as follow steps:
  1) call connect with nonblocking
  2) wait for selector/poll to indicate writability
  3) call connect to confirm connection's state

In the third step, tcp changes the socket state from SS_CONNECTING to
SS_CONNECTED and returns 0 if the connection is established successfully,
but smc returns -EISCONN.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux