From: Jens Axboe <axboe@kernel.dk>
To: Luke Hsiao <lukehsiao@google.com>
Cc: Luke Hsiao <luke.w.hsiao@gmail.com>,
David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
Arjun Roy <arjunroy@google.com>,
Soheil Hassas Yeganeh <soheil@google.com>,
Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next v2 2/2] io_uring: ignore POLLIN for recvmsg on MSG_ERRQUEUE
Date: Fri, 21 Aug 2020 20:16:32 -0600 [thread overview]
Message-ID: <0bc6cc65-e764-6fe0-9b0a-431015835770@kernel.dk> (raw)
In-Reply-To: <CADFWnLxQL5_1_E7Pa8tG4aBhY45sOY_PK1ct0kHs1uUbJSKS-A@mail.gmail.com>
On 8/21/20 8:13 PM, Luke Hsiao wrote:
> Hi Jens,
>
> On Fri, Aug 21, 2020 at 7:09 PM Jens Axboe <axboe@kernel.dk> wrote:
>>
>> On 8/21/20 8:04 PM, Luke Hsiao wrote:
>>>
>> Sorry, one more minor thing to fix up:
>>
>>> @@ -4932,6 +4934,11 @@ static bool io_arm_poll_handler(struct io_kiocb *req)
>>> mask |= POLLIN | POLLRDNORM;
>>> if (def->pollout)
>>> mask |= POLLOUT | POLLWRNORM;
>>> +
>>> + /* If reading from MSG_ERRQUEUE using recvmsg, ignore POLLIN */
>>> + if (req->opcode == IORING_OP_RECVMSG && (sqe->msg_flags & MSG_ERRQUEUE))
>>> + mask &= ~POLLIN;
>>> +
>>
>> Don't pass in the sqe here, but use req->sr_msg.msg_flags for this check. This
>> is actually really important, as you don't want to re-read anything from the
>> sqe.
>>
>> I'm actually surprised this one got past Jann :-)
>
> Got it, I will make the change and send v3. In Jann's defense, he
> reviewed the previous commit, but not this one :). Thanks for your
> detailed feedback.
Ah right you are, I guess it was the previous patch that had his
review! Thanks for taking care of this.
--
Jens Axboe
next prev parent reply other threads:[~2020-08-22 2:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 23:49 [PATCH net-next 0/2] Support reading msg errq from io_uring Luke Hsiao
2020-08-20 23:49 ` [PATCH net-next 1/2] io_uring: allow tcp ancillary data for __sys_recvmsg_sock() Luke Hsiao
2020-08-21 21:10 ` Jens Axboe
2020-08-20 23:49 ` [PATCH net-next 2/2] io_uring: ignore POLLIN for recvmsg on MSG_ERRQUEUE Luke Hsiao
2020-08-21 20:41 ` Jakub Kicinski
2020-08-21 21:11 ` Jens Axboe
2020-08-22 0:08 ` Luke Hsiao
2020-08-22 1:17 ` Jens Axboe
2020-08-22 2:04 ` [PATCH net-next v2 1/2] io_uring: allow tcp ancillary data for __sys_recvmsg_sock() Luke Hsiao
2020-08-22 2:04 ` [PATCH net-next v2 2/2] io_uring: ignore POLLIN for recvmsg on MSG_ERRQUEUE Luke Hsiao
2020-08-22 2:08 ` Jens Axboe
2020-08-22 2:13 ` Luke Hsiao
2020-08-22 2:16 ` Jens Axboe [this message]
2020-08-22 4:41 ` [PATCH net-next v3 1/2] io_uring: allow tcp ancillary data for __sys_recvmsg_sock() Luke Hsiao
2020-08-22 4:41 ` [PATCH net-next v3 2/2] io_uring: ignore POLLIN for recvmsg on MSG_ERRQUEUE Luke Hsiao
2020-08-22 15:49 ` Jens Axboe
2020-08-24 23:16 ` David Miller
2020-08-24 23:16 ` [PATCH net-next v3 1/2] io_uring: allow tcp ancillary data for __sys_recvmsg_sock() David Miller
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=0bc6cc65-e764-6fe0-9b0a-431015835770@kernel.dk \
--to=axboe@kernel.dk \
--cc=arjunroy@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=luke.w.hsiao@gmail.com \
--cc=lukehsiao@google.com \
--cc=netdev@vger.kernel.org \
--cc=soheil@google.com \
/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