Re: IOSQE_IO_LINK vs. short send of SOCK_STREAM

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

 



On 1/11/23 9:32 AM, Stefan Metzmacher wrote:
> Hi Ming,
> 
>> Per my understanding, a short send on SOCK_STREAM should terminate the
>> remainder of the SQE chain built by IOSQE_IO_LINK.
>>
>> But from my observation, this point isn't true when using io_sendmsg or
>> io_sendmsg_zc on TCP socket, and the other remainder of the chain still
>> can be completed after one short send is found. MSG_WAITALL is off.
> 
> This is due to legacy reasons, you need pass MSG_WAITALL explicitly
> in order to a retry or an error on a short write...
> It should work for send, sendmsg, sendmsg_zc, recv and recvmsg.

Dylan and I were just discussing this OOB and was hoping you'd chime
in, as I had some recollection that you were involved with this one.

We should probably ensure this is adequately documented, as it isn't
immediately obvious that you'd need WAITALL for links to work with
receives.

> For recv and recvmsg MSG_WAITALL also fails the link for MSG_TRUNC and MSG_CTRUNC.
> 
> metze
> 

-- 
Jens Axboe





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux