Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7211799rwd; Mon, 19 Jun 2023 20:39:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4xdukO6G3QD39ldAyVs+JbGastNWD4pe2lOVtdrVnCVYH9ttqdIt8HQ5Rv7ncs/TwrHhlf X-Received: by 2002:a1f:5f8f:0:b0:46e:9f33:add1 with SMTP id t137-20020a1f5f8f000000b0046e9f33add1mr3236201vkb.6.1687232349791; Mon, 19 Jun 2023 20:39:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687232349; cv=none; d=google.com; s=arc-20160816; b=Ff3wtzrI45aOojgSxM5W7k3KzeanRp+rmkCYinumIjs8/Vfsii9MmXG9Q5WX+oDqYo QT7hbUOB8r8hXfJpVIF3wUyMm7IoFlhRVEmJ1IZuqqS7xQBChUKS/K3CUxZXUC6cTeXw s5bUow+K5/lvISb/2Qdv9invwEjz89lJRtOfWQWJOMCIRbkBQ/shs9cN18BBpp48Tg0d PYcVWIpTB17w1kpq0L+cjAJyBf6rgPBuDmW2TsATvl60Jxo37JPATxH093TRbsIOet7+ wDjb5OmpbWOSVTWgcjcdT6Xp7AUJ62kjXSgFddJFnugOY94SDFlLTHw4j5XiAB8E3dXX 0Cvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=jazvYYz8HdBtzjx+tDAgVdU/cfX+/yTSu4W6jPzzVGs=; b=SZvh9ea57bTXLCyvYwHCJnPlEJl74PzukEz0bW6nMEOPy2mKJ9qq4DLmJ/Kz1lWt0S 7VKO1jEWXhzl1cC6LFwpGtJw9HaZQMjwfReij9spwIZZyCuhuaJfmYZqYl9SNkaJBZNd tSiAl404HC2jW+BvzKjzPEdiipiuD1sBnBvMNQ4Lmd4q2fQq5apbShdhWtvtqSAjjWGJ jW9zTPLBzSs3XJ5PbUA7BHiCNsDFXy7XH7CkCapR1ZFGUoXLP0hL2jCXK3lXOhOCYYZ7 lN+Ws91Nw0nPUPZfKdabJTC/o1d4trKGOiNpGGgej1tvnm0+PPJRzRk122zhLoyDurux THvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VhAGSw+8; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q2-20020a170902eb8200b001aaf6228a70si1025395plg.325.2023.06.19.20.38.53; Mon, 19 Jun 2023 20:39:09 -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=@kernel.org header.s=k20201202 header.b=VhAGSw+8; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229886AbjFTCJb (ORCPT + 99 others); Mon, 19 Jun 2023 22:09:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjFTCJa (ORCPT ); Mon, 19 Jun 2023 22:09:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B066910E; Mon, 19 Jun 2023 19:09:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3DE3060EA5; Tue, 20 Jun 2023 02:09:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 910E7C433C8; Tue, 20 Jun 2023 02:09:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687226968; bh=TBAuPDZ4ZIJJqnKHAAtmN9rFin/Sn5+rIr+zk1Fviiw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=VhAGSw+8AxIJS0XH/VyoJz0CgNamR62jHZV6R4jjyHJyClJtOi+P4yF+QgKT4x6ql kQSHnfpqYY7mz/meatf5sNYRl9JWyf3A4O86rHtssihIwi/Xdg5ZIT8B2JxrjH1FeJ YPrkB6q2NFjt0ZNTfEY86/X6CBLDgQ2V/12YNyY6FkWCzuLA3wZmUqMeU0ZIezvLXH we75IHXE78D5FHaZyBBwWxwf8dcmdg1qXOdNr7yzdWYKtVcBvWY2yPnLNWexoDQvZs 82+yLU6Pm7s4XD10AZCFdStwWu2lMwwtrMktRwYCPwAxSKkOGAk7+I3CpWi+NAzv1J ZEcdY7ufoVlTA== Message-ID: Date: Mon, 19 Jun 2023 19:09:27 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [RFC PATCH v2 1/4] net: wire up support for file_operations->uring_cmd() Content-Language: en-US To: Pavel Begunkov , Breno Leitao , io-uring@vger.kernel.org, axboe@kernel.dk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, Matthieu Baerts , Mat Martineau , Marcelo Ricardo Leitner , Xin Long Cc: leit@fb.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, dccp@vger.kernel.org, mptcp@lists.linux.dev, linux-sctp@vger.kernel.org, ast@kernel.org, kuniyu@amazon.com, martin.lau@kernel.org, Jason Xing , Joanne Koong , Greg Kroah-Hartman , "Jason A. Donenfeld" , Willem de Bruijn , Guillaume Nault , Andrea Righi References: <20230614110757.3689731-1-leitao@debian.org> <20230614110757.3689731-2-leitao@debian.org> <6b5e5988-3dc7-f5d6-e447-397696c0d533@kernel.org> From: David Ahern In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,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 6/19/23 2:28 AM, Pavel Begunkov wrote: > That callback is all about file dependent operations, just like ioctl. > And as the patch in question is doing socket specific stuff, I think > architecturally it fits well. I also believe Breno wants to extend it > later to support more operations. > > Sockets are a large chunk of use cases, it can be implemented as a > separate io_uring request type if nothing else works, but in general > that might not be as scalable. The io_uring commands are wrappers to existing networking APIs - doing via io_uring what userspace apps can do via system calls. As such, the translations should be done in io_uring code and then invoking in-kernel APIs. Same comment applies to sockopts when those come around and any other future extensions.