Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1253042lfc; Wed, 1 Jun 2022 13:09:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2SZvx69erGFvQbzxnh7yk4IdyKCjFMmO/DVCj9+BH7FszRkiK0L45QS3ndnYSHTZ4jBw5 X-Received: by 2002:a17:90a:c90d:b0:1e2:c96b:5337 with SMTP id v13-20020a17090ac90d00b001e2c96b5337mr23237302pjt.42.1654114175852; Wed, 01 Jun 2022 13:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654114175; cv=none; d=google.com; s=arc-20160816; b=mIaCbaw7wVfP3SGOJbKmVKqeCZc7DGewyG/tXofe/dWKB3euQskQbv5lXPIOAOeSZ8 CvFEQYOl3l63MInRoMSN/mJ3CIX6aCLojsXhanBWLPVo3jVrQRc4R5l7tpUS1dI89pf7 vViwU1kxuJXqw1u167SblHdsY9M5SpbE2xNQ7UclzDrG+vfRlqM/umRxjfwKJveW7fAQ KTRxIi7DmZ9n0OrtS2XTB+HhIXy4Dyb0KBQ+wX8aeXYCp9iimeVhmCpuACTlMkXQoL3/ 9qUsTQ/oCPETKMaIMlxQuU8J7lCun2gPZPnjuJWmIDcsWj9uBPq+6GxDEgqohHwND6MD cZHw== 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:dkim-signature; bh=H1M+MLf4HVN2MHxQjq1tekuhrojui5lnUf3sg+vvCPU=; b=Uh2KwT+D2Gp3nFt1qnrbulNREWX14u/DhwSZdiKBONOufw09tOzESl85MJb2yqfTgK +7QmUZFQ1myzj74tlYWnDr9OVUkj+YTn8ilsZ8Aj+Y48WtqDj2VUL25BpKgHFeiOpXsY t3Sa07K3dgF/QuGOEGBGfdRZYamLEqIQaBL/6dpfh1aR7+7cJ9Ykawf10eemIRooazhq vQLStvdvWLyZCxqAMHM2JLsbWa+tJ6OK2FOSr9sCWSQw1ViiZW6w7ETUWOKJ6/DTmBBk jtDEoDuLfk9kWqyMEzIDY2Afi0evyAkPbUKig+rmWYkzPFwJzuibKjqTyWIl8QWeg6gx rjng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="HAildSU/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s12-20020a056a00194c00b00519099107ddsi3554909pfk.234.2022.06.01.13.09.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:09:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="HAildSU/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2A4B81BFEF9; Wed, 1 Jun 2022 12:24:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350752AbiFAI3X (ORCPT + 99 others); Wed, 1 Jun 2022 04:29:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349252AbiFAI3T (ORCPT ); Wed, 1 Jun 2022 04:29:19 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A25824B861; Wed, 1 Jun 2022 01:29:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 513D3B81854; Wed, 1 Jun 2022 08:29:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8AB1C385A5; Wed, 1 Jun 2022 08:29:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654072155; bh=1iXjC+c5NDksDK4JWBcsRyUMhftWpjNZ5o01WmkxYAc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HAildSU/sq7Bgxx0sWq8pyb5IW7hO4kp1mXK9VDpSGGieB/7DZd6I8AvLt0YkEDB5 +9cFXyLVug9Vm/WIEm8VnZNUT1z4Cq5kg6vxviY5FCRX+zYt+qLBnUkiDVvOmLyK5S Vg07weRxFj18FDJWZQi0lB1p2bS1+QR/pMOUgNmyRTu+bsRv+D/tdfQN1BzCCN+cV2 efEexTSPtk+K5OXjyDx9LUL8ZJ2inc1V9RNShdvvit0zVWv85IWkYtNwak3eDwNJsp Te868s6mOvSqgnV87dZx3TlrTHQeRWEjOuELjgaBo7/vwhXdgF+CD8Y975G7UB7sz/ TDqCVKcQG9zjg== Date: Wed, 1 Jun 2022 11:29:10 +0300 From: Leon Romanovsky To: Kent Overstreet Cc: Stephen Hemminger , Andrew Lunn , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, netdev@vger.kernel.org, mcgrof@kernel.org, tytso@mit.edu, RDMA mailing list Subject: Re: RFC: Ioctl v2 Message-ID: References: <20220520161652.rmhqlvwvfrvskg4w@moria.home.lan> <20220521164546.h7huckdwvguvmmyy@moria.home.lan> <20220521124559.69414fec@hermes.local> <20220525170233.2yxb5pm75dehrjuj@moria.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220525170233.2yxb5pm75dehrjuj@moria.home.lan> X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Wed, May 25, 2022 at 01:02:33PM -0400, Kent Overstreet wrote: > On Sat, May 21, 2022 at 12:45:59PM -0700, Stephen Hemminger wrote: > > On Sat, 21 May 2022 12:45:46 -0400 > > Kent Overstreet wrote: > > > > > On Fri, May 20, 2022 at 10:31:02PM +0200, Andrew Lunn wrote: > > > > > I want to circulate this and get some comments and feedback, and if > > > > > no one raises any serious objections - I'd love to get collaborators > > > > > to work on this with me. Flame away! > > > > > > > > Hi Kent > > > > > > > > I doubt you will get much interest from netdev. netdev already > > > > considers ioctl as legacy, and mostly uses netlink and a message > > > > passing structure, which is easy to extend in a backwards compatible > > > > manor. > > > > > > The more I look at netlink the more I wonder what on earth it's targeted at or > > > was trying to solve. It must exist for a reason, but I've written a few ioctls > > > myself and I can't fathom a situation where I'd actually want any of the stuff > > > netlink provides. > > > > Netlink was built for networking operations, you want to set something like a route with a large > > number of varying parameters in one transaction. And you don't want to have to invent > > a new system call every time a new option is added. > > > > Also, you want to monitor changes and see these events for a userspace control > > application such as a routing daemon. > > That makes sense - perhaps the new mount API could've been done as a netlink > interface :) > > But perhaps it makes sense to have both - netlink for the big complicated > stateful operations, ioctl v2 for the simpler ones. I haven't looked at netlink > usage at all, but most of the filesystem ioctls I've looked at fall into the the > simple bucket, for me. In RDMA, we solved this thing (standard entry points, multiple parameters and vendor specific data) by combining netlink and ioctls. The entry point is done with ioctls (mainly performance reason, but not only) while data is passed in netlink attributes style. ib_uverbs_ioctl: https://elixir.bootlin.com/linux/v5.18/source/drivers/infiniband/core/uverbs_ioctl.c#L605 Latest example of newly added global to whole stack command: RDMA/uverbs: Add uverbs command for dma-buf based MR registration https://lore.kernel.org/linux-rdma/1608067636-98073-4-git-send-email-jianxin.xiong@intel.com/ Thanks