On 5/18/23 3:17?PM, Stefan Roesch wrote: > diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c > index f06175b36b41..66e4591fbe2b 100644 > --- a/io_uring/io_uring.c > +++ b/io_uring/io_uring.c > @@ -4405,6 +4405,15 @@ static int __io_uring_register(struct io_ring_ctx *ctx, unsigned opcode, > break; > ret = io_register_file_alloc_range(ctx, arg); > break; > + case IORING_REGISTER_NAPI: > + ret = -EINVAL; > + if (!arg) > + break; > + ret = io_register_napi(ctx, arg); > + break; > + case IORING_UNREGISTER_NAPI: > + ret = io_unregister_napi(ctx, arg); > + break; > default: > ret = -EINVAL; To match most of the others here in terms of behavior, I think this should be: case IORING_REGISTER_NAPI: ret = -EINVAL; if (!arg || nr_args != 1) break; ret = io_register_napi(ctx, arg); break; case IORING_UNREGISTER_NAPI: ret = -EINVAL; if (nr_args != 1) break; ret = io_unregister_napi(ctx, arg); break; Apart from that, looks good. -- Jens Axboe