linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>,
	Constantine Gavrilov <CONSTG@il.ibm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: io-uring <io-uring@vger.kernel.org>
Subject: Re: io_uring_enter() with opcode IORING_OP_RECV ignores MSG_WAITALL in msg_flags
Date: Wed, 23 Mar 2022 19:40:18 +0000	[thread overview]
Message-ID: <8f3cc170-1c24-da8a-37ec-f2e73eade46c@gmail.com> (raw)
In-Reply-To: <7e6f6467-6ac2-3926-9d7b-09f52f751481@kernel.dk>

On 3/23/22 12:19, Jens Axboe wrote:
> On 3/23/22 4:31 AM, Constantine Gavrilov wrote:
>> I get partial receives on TCP socket, even though I specify
>> MSG_WAITALL with IORING_OP_RECV opcode. Looking at tcpdump in
>> wireshark, I see entire reassambled packet (+4k), so it is not a
>> disconnect. The MTU is smaller than 4k.
>>
>>  From the mailing list history, looks like this was discussed before
>> and it seems the fix was supposed to be in. Can someone clarify the
>> expected behavior?
>>
>> I do not think rsvmsg() has this issue.
> 
> Do you have a test case? I added the io-uring list, that's the
> appropriate forum for this kind of discussion.

MSG_WAITALL (since Linux 2.2)
        This flag requests that the operation block until the full
        request is satisfied.  However, the call may still return
        less data than requested if a signal is caught

My guess would be that it's either due to signals (including
task_works actively used by io_uring) or because of some
interoperability problem with NOWAIT.

-- 
Pavel Begunkov

  reply	other threads:[~2022-03-23 19:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <BYAPR15MB260078EC747F0F0183D1BB1BFA189@BYAPR15MB2600.namprd15.prod.outlook.com>
2022-03-23 12:19 ` io_uring_enter() with opcode IORING_OP_RECV ignores MSG_WAITALL in msg_flags Jens Axboe
2022-03-23 19:40   ` Pavel Begunkov [this message]
2022-03-23 12:11 Constantine Gavrilov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8f3cc170-1c24-da8a-37ec-f2e73eade46c@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=CONSTG@il.ibm.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).