Re: [PATCH net-next 2/2] io_uring: ignore POLLIN for recvmsg on MSG_ERRQUEUE

2020-08-21 Thread Jens Axboe
On 8/21/20 6:08 PM, Luke Hsiao wrote: > Hi Jakub and Jens, > > Thank you for both of your reviews. Some responses inline below. > > On Fri, Aug 21, 2020 at 2:11 PM Jens Axboe wrote: >> >> On 8/21/20 2:41 PM, Jakub Kicinski wrote: >>> On Thu, 20 Aug 2020 16:49:54 -0700 Luke Hsiao wrote: +

Re: [PATCH net-next 2/2] io_uring: ignore POLLIN for recvmsg on MSG_ERRQUEUE

2020-08-21 Thread Jens Axboe
On 8/21/20 2:41 PM, Jakub Kicinski wrote: > On Thu, 20 Aug 2020 16:49:54 -0700 Luke Hsiao wrote: >> +/* If reading from MSG_ERRQUEUE using recvmsg, ignore POLLIN */ >> +if (req->opcode == IORING_OP_RECVMSG && (sqe->msg_flags & MSG_ERRQUEUE)) >> +mask &= ~(POLLIN); > > FWIW this

Re: [PATCH net-next 2/2] io_uring: ignore POLLIN for recvmsg on MSG_ERRQUEUE

2020-08-21 Thread Jakub Kicinski
On Thu, 20 Aug 2020 16:49:54 -0700 Luke Hsiao wrote: > + /* If reading from MSG_ERRQUEUE using recvmsg, ignore POLLIN */ > + if (req->opcode == IORING_OP_RECVMSG && (sqe->msg_flags & MSG_ERRQUEUE)) > + mask &= ~(POLLIN); FWIW this adds another W=1 C=1 warnings to this code: fs

[PATCH net-next 2/2] io_uring: ignore POLLIN for recvmsg on MSG_ERRQUEUE

2020-08-20 Thread Luke Hsiao
From: Luke Hsiao Currently, io_uring's recvmsg subscribes to both POLLERR and POLLIN. In the context of TCP tx zero-copy, this is inefficient since we are only reading the error queue and not using recvmsg to read POLLIN responses. This patch was tested by using a simple sending program to call