--- libev/ev_iouring.c 2019/12/27 16:15:58 1.9 +++ libev/ev_iouring.c 2019/12/27 21:56:29 1.11 @@ -301,6 +301,11 @@ if (errno != EINVAL) return -1; /* we failed */ +#if TODO + if ((~params.features) & (IORING_FEAT_NODROP | IORING_FEATURE_SINGLE_MMAP)) + return -1; /* we require the above features */ +#endif + /* EINVAL: lots of possible reasons, but maybe * it is because we hit the unqueryable hardcoded size limit */ @@ -432,8 +437,9 @@ int res = cqe->res; /* ignore fd removal events, if there are any. TODO: verify */ + /* TODO: yes, this triggers */ if (cqe->user_data == (__u64)-1) - abort ();//D + return; assert (("libev: io_uring fd must be in-bounds", fd >= 0 && fd < anfdmax)); @@ -450,8 +456,8 @@ if (ecb_expect_false (res < 0)) { - //TODO: EINVAL handling (was something failed with this fd) - //TODO: EBUSY happens when? + /*TODO: EINVAL handling (was something failed with this fd)*/ + /*TODO: EBUSY happens when?*/ if (res == -EBADF) { @@ -489,7 +495,7 @@ /* we have two options, resize the queue (by tearing down * everything and recreating it, or living with it * and polling. - * we implement this by resizing tghe queue, and, if that fails, + * we implement this by resizing the queue, and, if that fails, * we just recreate the state on every failure, which * kind of is a very inefficient poll. * one danger is, due to the bios toward lower fds, @@ -511,12 +517,12 @@ /* we hit the kernel limit, we should fall back to something else. * we can either poll() a few times and hope for the best, * poll always, or switch to epoll. - * since we use epoll anyways, go epoll. + * TODO: is this necessary with newer kernels? */ iouring_internal_destroy (EV_A); - /* this should make it so that on return, we don'T call any uring functions */ + /* this should make it so that on return, we don't call any uring functions */ iouring_to_submit = 0; for (;;)