From: Leon Romanovsky <leon@kernel.org>
To: Kent Overstreet <kent.overstreet@gmail.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Andrew Lunn <andrew@lunn.ch>,
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 <linux-rdma@vger.kernel.org>
Subject: Re: RFC: Ioctl v2
Date: Wed, 1 Jun 2022 11:29:10 +0300 [thread overview]
Message-ID: <YpcjVs/41EzAtr9k@unreal> (raw)
In-Reply-To: <20220525170233.2yxb5pm75dehrjuj@moria.home.lan>
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 <kent.overstreet@gmail.com> 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
next prev parent reply other threads:[~2022-06-01 8:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 16:16 RFC: Ioctl v2 Kent Overstreet
2022-05-20 20:31 ` Andrew Lunn
2022-05-21 16:45 ` Kent Overstreet
2022-05-21 18:55 ` Andrew Lunn
2022-05-21 19:45 ` Stephen Hemminger
2022-05-25 17:02 ` Kent Overstreet
2022-05-25 20:57 ` Andrew Lunn
2022-06-01 8:29 ` Leon Romanovsky [this message]
2022-05-20 23:45 ` Theodore Ts'o
2022-05-25 17:20 ` Kent Overstreet
2022-06-09 22:02 ` Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YpcjVs/41EzAtr9k@unreal \
--to=leon@kernel.org \
--cc=andrew@lunn.ch \
--cc=kent.overstreet@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).