Re: [RFC 2/2] io_uring/net: allow to override notification tag

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

 



On Wed, 2022-08-17 at 11:48 +0100, Pavel Begunkov wrote:
> On 8/16/22 09:37, Dylan Yudaken wrote:
> > On Tue, 2022-08-16 at 08:42 +0100, Pavel Begunkov wrote:
> > > Considering limited amount of slots some users struggle with
> > > registration time notification tag assignment as it's hard to
> > > manage
> > > notifications using sequence numbers. Add a simple feature that
> > > copies
> > > sqe->user_data of a send(+flush) request into the notification
> > > CQE it
> > > flushes (and only when it's flushes).
> > 
> > I think for this to be useful I think it would also be needed to
> > have
> > flags on the generated CQE.
> > 
> > If there are more CQEs coming for the same request it should have
> > IORING_CQE_F_MORE set. Otherwise user space would not be able to
> > know
> > if it is able to reuse local data.
> 
> If you want to have:
> 
> expect_more = cqe->flags & IORING_CQE_F_MORE;
> 
> Then in the current form you can perfectly do that with
> 
> // MSG_WAITALL
> expect_more = (cqe->res == io_len);
> // !MSG_WAITALL,
> expect_more = (cqe->res >= 0);
> 
> But might be more convenient to have IORING_CQE_F_MORE set,
> one problem is a slight change of (implicit) semantics, i.e.
> we don't execute linked requests when filling a IORING_CQE_F_MORE
> CQE + CQE ordering implied from that.
> 
> It's maybe worth to not rely on the link failing concept for
> deciding whether to flush or not.

Is the ordering guaranteed then to be <send cqe>, <notif cqe>?
If so I would put the IORING_CQE_F_MORE more as a nice to have for
consistency with other ops

> 
> 
> > Additionally it would need to provide a way of disambiguating the
> > send
> > CQE with the flush CQE.
> 
> Do you mean like IORING_CQE_F_NOTIF from 1/2?
> 

Apologies - I missed that 





[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