On Tue, 2019-06-11 at 10:51 +0100, Stefan Hajnoczi wrote: > On Mon, Jun 10, 2019 at 07:19:03PM +0530, Aarushi Mehta wrote: > > +static bool qemu_luring_poll_cb(void *opaque) > > +{ > > + LuringState *s = opaque; > > + struct io_uring_cqe *cqes; > > + > > + if (io_uring_peek_cqe(&s->ring, &cqes) == 0) { > > + if (!cqes) { > > + qemu_luring_process_completions_and_submit(s); > > + return true; > > + } > > Is this logic inverted? We have a completion when cqes != NULL.
This indeed looks inverted to me. Best regards, Maxim Levitsky