From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) by gnuweeb.org (Postfix) with ESMTPS id 911118060F for ; Mon, 29 Aug 2022 19:46:29 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (1024-bit key; unprotected) header.d=purestorage.com header.i=@purestorage.com header.a=rsa-sha256 header.s=google header.b=Yh6+YwaY; dkim-atps=neutral Received: by mail-ej1-f44.google.com with SMTP id kk26so17769746ejc.11 for ; Mon, 29 Aug 2022 12:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=l3skwgcR8n0TOtdyqt/xNUW8nplEdhTPfhgsXZmnrKQ=; b=Yh6+YwaYs1PzKrQTJaAcU09TQYQ2BIGSMNIL6ouglFa+xuasecyb0lSAiJXHeXPe5W Bdi1x9neZ+kJNbCdv8uBNAPx+itz6RiwmysKHXqQJwccMnyO+wvtumLBctfPs2L5Mzxc lZtZSMj6NEgFT7vYzYwDw9bKvtsJ6ul7lXHFg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=l3skwgcR8n0TOtdyqt/xNUW8nplEdhTPfhgsXZmnrKQ=; b=bwI4pR7dUPmY4rpcAqrZkEeRF4DTgYo5XC8kZhDkL124jtdGtjazW8SbhgRKOxWyFW G5xzzGDMo5DG6NQDiFKJTm3rYHAZYNr6rh8LV6YTVMVJP/4vJ2IyJcB7We4njhv3HmZL 5llc8KFOd2K0WIzkMZZllUmBmPPFVbqAaKmFj7zbsv2OHQy+CmkxOKdRD/KtnYT20XtT TQYuXckquvagg9E1jYOxmQ5KhgXtXZ5rPpdHOKUYQk84DKyU+gLT9pblPhPXm19JKhVG 5xMSkma5iIT+u/ATGdEV15rUemOoltS3IQO7CWRRr9Zw5pfYyDWXChslvyxfUNAGzbJz 9ukA== X-Gm-Message-State: ACgBeo0vb/SWohscj69aiAuKmUCao1V+0LKXoEcAnEYJW0ATcpUO0aHs +W3q5YYC9ULT1kUY9dXB+SIGr2tw4HRPXeQ30g1Vlg== X-Google-Smtp-Source: AA6agR4AEPuuqNAvtj7VH5sf6JPa+hVk/+Aj2e2mnhnqmHmfyg0qi61fsdOXESAcq7oh5B/9ODgKCOxDrbIsiJdwxLQ= X-Received: by 2002:a17:907:7f0b:b0:731:b81a:1912 with SMTP id qf11-20020a1709077f0b00b00731b81a1912mr14735533ejc.8.1661802387869; Mon, 29 Aug 2022 12:46:27 -0700 (PDT) MIME-Version: 1.0 References: <20220829030521.3373516-1-ammar.faizi@intel.com> <20220829030521.3373516-2-ammar.faizi@intel.com> In-Reply-To: <20220829030521.3373516-2-ammar.faizi@intel.com> From: Caleb Sander Date: Mon, 29 Aug 2022 12:46:17 -0700 Message-ID: Subject: Re: [RFC PATCH liburing v1 1/4] syscall: Add io_uring syscall functions To: Ammar Faizi Cc: Jens Axboe , Muhammad Rizki , Kanna Scarlet , io-uring Mailing List , Linux Kernel Mailing List , "GNU/Weeb Mailing List" Content-Type: text/plain; charset="UTF-8" List-Id: On Sun, Aug 28, 2022 at 8:07 PM Ammar Faizi wrote: > > --- a/src/include/liburing.h > +++ b/src/include/liburing.h > @@ -202,6 +202,14 @@ int io_uring_register_file_alloc_range(struct io_uring *ring, > int io_uring_register_notifications(struct io_uring *ring, unsigned nr, > struct io_uring_notification_slot *slots); > int io_uring_unregister_notifications(struct io_uring *ring); > +int io_uring_enter(unsigned int fd, unsigned int to_submit, > + unsigned int min_complete, unsigned int flags, > + sigset_t *sig); > +int io_uring_enter2(int fd, unsigned to_submit, unsigned min_complete, > + unsigned flags, sigset_t *sig, int sz); > +int io_uring_setup(unsigned entries, struct io_uring_params *p); > +int io_uring_register(int fd, unsigned opcode, const void *arg, > + unsigned nr_args); Can we be consistent about using "int fd"? And either standardize on "unsigned" or "unsigned int"? Looks like syscalls should maybe be separated by an empty line from the register/unregister functions in the header file. > --- /dev/null > +++ b/src/syscall.c > @@ -0,0 +1,30 @@ > +/* SPDX-License-Identifier: MIT */ > + > +#include "lib.h" Looks like this include is unused? Other than that, Reviewed-by: Caleb Sander