Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3488022rwe; Mon, 29 Aug 2022 12:50:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR45qDYSQEv7siJ/XZoOOoM3puUAQ+hmrJmUhi6rVfAR0jdtSbLJQXVFyVw5B8+PnbPLEhcp X-Received: by 2002:a65:6944:0:b0:41b:4483:35cc with SMTP id w4-20020a656944000000b0041b448335ccmr15668891pgq.296.1661802629625; Mon, 29 Aug 2022 12:50:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661802629; cv=none; d=google.com; s=arc-20160816; b=au7wu7giRjp4yPYazoluYUTSxUW1MJjdXAWb+7ryjTLo0paZRx4YupFrtq4XgfNj09 JuHkAjw12a2x/8p/vnXFNp4eLktjJt/GuO0IQ4VLqDnsV/dqRLvateuEB+5icXGbhfbF 6pt9q9jCCNk0gp2QJoL+SSRPRdhekfv+Wpam/besb+THasxg2cAc+BtURfQTr7ssyTdv 8HqOPCjYu2gCyJaCJjXqTXzdJG0YjOUBSWznfWfabUEnjtsaSfdfhNBFYuPnGRHlODp7 EE+lMGSoo81d/HiSLq8tlRZpSiY0FTfyzlSVhAqKAc/1wkAWTi4wja7Yn2kOJWMe7Yv3 q9Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=l3skwgcR8n0TOtdyqt/xNUW8nplEdhTPfhgsXZmnrKQ=; b=ZzkIENgQUjwvfLeir2d0v6YYkz3boBhHjF63g602DmfytIRLTSnQcExMJujKG4CxOb g94pk1QT+l2FfoCBGCrJfIkWfuWOMv+IjY6lBPofTTFY4WEg0UGuDEYTUV8SgLGHU3Rf Oop/vc/2gvS/ZbLtlxCLgvCfqiioAyR89+OsIVIi5wMXWEeaB3aiRoCuz4hnl35s3N5/ oz3c9PLOeDInH2aAJjQXqcWjFavmdyz3r9Ae2RBDbvw6h/iViVTyuCRj+DHtyjVVCQa4 PyJweaRVjpZgvHDSnNKS4WiMGtrbXsqV8iNC1jjG1ddzTpjiqKQ0f0NQbJq0WnWQL4Qs wBMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@purestorage.com header.s=google header.b=Yh6+YwaY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=purestorage.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e19-20020a635013000000b0042a1989bde6si190112pgb.26.2022.08.29.12.50.18; Mon, 29 Aug 2022 12:50:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@purestorage.com header.s=google header.b=Yh6+YwaY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=purestorage.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229904AbiH2Tqf (ORCPT + 99 others); Mon, 29 Aug 2022 15:46:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229782AbiH2Tqa (ORCPT ); Mon, 29 Aug 2022 15:46:30 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CE6A74DD2 for ; Mon, 29 Aug 2022 12:46:29 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id se27so10082838ejb.8 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=x7+FHCxMvM9qo5nHtEvvr9BhIFCrX3Fk4GeRBPTTzwFo35gW/LBjxIFcQDeepC8Dru tq8388fo1m3AaJLbN68KhbcXOsQvK+z8byErW4qXIw2em4IvgT2pE64KPkebCMg2mWVB Xa+zYowYOWl0Ll+oRH5VOyk3L/0OCF77E/ioli4/yC8Ntkjg6kcDl50OLkMX4cEdZBCc Q84+N9GxP4KBYwqzWd/PjRxo22zvKtchot4SWKvujQcD32I/D7sYNwzYqDP/ZXqLR10R P7+N1NQdNVeSjSioQBGt4J0SbBYB1z7wkskck8mm62JpuWx/BpZRKScDtIyFTXr3dY4v Frow== X-Gm-Message-State: ACgBeo2XbfjOrPX1buo+3TpaRtclqJGsEUEh2547r8st56Ik+SQdMoIm peq7nWCUXcSbJFTBn23sXs4JSpFckPyi0A/OC/ZR7Q== 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" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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