Received: by 2002:ac8:3b51:0:b0:3f3:9eb6:4eb6 with SMTP id r17csp5098239qtf; Thu, 22 Jun 2023 08:21:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5u8x25YQcYXzfB8yTIZq/TdcYA6JGvArlzavZTu91bl7d6br46uY5ZnT6+LLMmvQhjmBYj X-Received: by 2002:a05:6a20:3ca3:b0:121:ec70:b906 with SMTP id b35-20020a056a203ca300b00121ec70b906mr9263963pzj.45.1687447287015; Thu, 22 Jun 2023 08:21:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687447286; cv=none; d=google.com; s=arc-20160816; b=fvZWLRF1W9zCaJPCAjervhFG4hit6CPf6+vKt+zvG209E5UlP4bla2D5cFn4K6als/ srpy/M7A+o+bX+B+zHhSL8KkuBOr+Le5sqYjHNJoLqhycm/E/buVMsjse+dUidMXUJwQ ebWnaKXAZTYz+CKVICUhZNH8o4pbuncd/oFmBSsKr3ThYkRFVyrUpRsKnw7hs3yOLhgn tvLRPiiOMhPZmyEypk6djieyqQ8012SwocD9P+CYeYCNeZmb/FLuOZMCy0WnAaI4r1pB mYmw4lRV5fbHE0iSeq2ksPeGF9/pGldx9+eGAeqTrLkEblOp1qkB2NHvw083uYT8S47Y 0AeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=t/n7cyBQWBJrKRj8jxj2QgN2B2DXg9ROG/UR9O3ggiI=; b=rboUjjIlTe+KK2ZmfyRd4j98MFYx8xnBvKh0gKewdl05ADSOxu7FkgkF3umuRwPmHn I/p44DfoyZvXEgV225HLtS3IcRvat8keQW8YTQt3IxudEep+fkrLBF0L9nmX5ezB5Buq iOKo9Pi/9J5jPrnBvKMkdnuRd5Dt7TTYPIKJ/8ZkWGyuWao9XSzf8hdaQfcbFNSAYtf/ vB8a8v8Ox0AJm38pDgkgC2GGg6qV/pbopqU9V0W4tMSZHUvpZbPWusAED+YmNJW6k7ky h+z1yoWGmo6C93B3nUGvGhqSCVCC1UIfROZVz4Iva0q+lIfv1l8SLUUEz/mOl2sE+icA PhGw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o20-20020a637e54000000b00549fb44e303si6419628pgn.131.2023.06.22.08.21.14; Thu, 22 Jun 2023 08:21:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232105AbjFVPDj (ORCPT + 99 others); Thu, 22 Jun 2023 11:03:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232095AbjFVPDg (ORCPT ); Thu, 22 Jun 2023 11:03:36 -0400 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29C26268F; Thu, 22 Jun 2023 08:03:17 -0700 (PDT) Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-311099fac92so8393016f8f.0; Thu, 22 Jun 2023 08:03:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687446160; x=1690038160; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=t/n7cyBQWBJrKRj8jxj2QgN2B2DXg9ROG/UR9O3ggiI=; b=a4j/5BRe6ikbuTRZI5Ze/gfo7/DAUTTt/Asv4VPS1uMJMnPhnmuh7vFI2flJapVr4c UC+yvK8fb+aDyyZvCRQqGDk+z6C2DKUUyx3wBFeXmEI9B0wmB5U9DE2jqY5GiagcJfrP L8dbVkdFYlUXouFhKkFgQHP98vaipyQbb6tfM+JyUloqgfELr3LX9nXtijiuJAKg4IUy bGq8hnjoDEAGee1IoRlEYtX8GaYpNcyfn+3JaDGggBdTUd/YydevihI5Qxys3woJHATZ XJt4sFYP7WCONzGr3yDRDr7jzQStv5iZj3SNvu2G8J9O9dIuzKIOIs/NTwXlcElan5hc NuOw== X-Gm-Message-State: AC+VfDyPcTNW4Dm1Yd08cbR4TKzHn8kKo3+YFCQJsXm9gb0Kn6EbXh3a iWdghonOgUchIPWqbhymzMs= X-Received: by 2002:adf:f34f:0:b0:30f:b1ee:5cd0 with SMTP id e15-20020adff34f000000b0030fb1ee5cd0mr16382265wrp.50.1687446159714; Thu, 22 Jun 2023 08:02:39 -0700 (PDT) Received: from gmail.com (fwdproxy-cln-021.fbsv.net. [2a03:2880:31ff:15::face:b00c]) by smtp.gmail.com with ESMTPSA id n15-20020a5d4c4f000000b003111025ec67sm7266818wrt.25.2023.06.22.08.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 08:02:39 -0700 (PDT) Date: Thu, 22 Jun 2023 08:02:37 -0700 From: Breno Leitao To: Greg Kroah-Hartman Cc: Jonathan Corbet , Jens Axboe , Pavel Begunkov , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , leit@meta.com, Arnd Bergmann , Steve French , Lu Baolu , Jiri Slaby , Stephen Hemminger , Jason Gunthorpe , Simon Ser , "open list:DOCUMENTATION" , open list , "open list:IO_URING" , "open list:NETWORKING [GENERAL]" Subject: Re: [PATCH] io_uring: Add io_uring command support for sockets Message-ID: References: <20230621232129.3776944-1-leitao@debian.org> <2023062231-tasting-stranger-8882@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2023062231-tasting-stranger-8882@gregkh> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Thu, Jun 22, 2023 at 07:20:48AM +0200, Greg Kroah-Hartman wrote: > On Wed, Jun 21, 2023 at 04:21:26PM -0700, Breno Leitao wrote: > > Enable io_uring commands on network sockets. Create two new > > SOCKET_URING_OP commands that will operate on sockets. Since these > > commands are similar to ioctl, uses the _IO{R,W} helpers to embedded the > > argument size and operation direction. Also allocates a unused ioctl > > chunk for uring command usage. > > > > In order to call ioctl on sockets, use the file_operations->uring_cmd > > callbacks, and map it to a uring socket function, which handles the > > SOCKET_URING_OP accordingly, and calls socket ioctls. > > > > This patches was tested by creating a new test case in liburing. > > Link: https://github.com/leitao/liburing/commit/3340908b742c6a26f662a0679c4ddf9df84ef431 > > > > Signed-off-by: Breno Leitao > > --- > > Isn't this a new version of an older patch? Yes, this should have tagged as V2. [1] https://lore.kernel.org/lkml/20230406144330.1932798-1-leitao@debian.org/#r > > --- a/Documentation/userspace-api/ioctl/ioctl-number.rst > > +++ b/Documentation/userspace-api/ioctl/ioctl-number.rst > > @@ -361,6 +361,7 @@ Code Seq# Include File Comments > > 0xCB 00-1F CBM serial IEC bus in development: > > > > 0xCC 00-0F drivers/misc/ibmvmc.h pseries VMC driver > > +0xCC A0-BF uapi/linux/io_uring.h io_uring cmd subsystem > > This change is nice, but not totally related to this specific one, > shouldn't it be separate? This is related to this patch, since I am using it below, in the following part: +#define SOCKET_URING_OP_SIOCINQ _IOR(0xcc, 0xa0, int) +#define SOCKET_URING_OP_SIOCOUTQ _IOR(0xcc, 0xa1, int) Should I have a different patch, even if they are related? > > +EXPORT_SYMBOL_GPL(uring_sock_cmd); > > Did you forget the "io_" prefix? Yes, I will rename the function. Thanks for the review.