All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
To: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>,
	Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Liran Liss <liranl-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Tal Alon <talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [RFC ABI V2 5/8] RDMA/core: Add new ioctl interface
Date: Thu, 21 Jul 2016 01:04:33 -0700	[thread overview]
Message-ID: <20160721080433.GA21060@infradead.org> (raw)
In-Reply-To: <20160721054439.GA19329-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

On Wed, Jul 20, 2016 at 11:44:39PM -0600, Jason Gunthorpe wrote:
> How many ioctls have you used that use a complex variable sized struct
> as the parameter?
> 
> There are a few and they ones I've used are self-describing one way or
> another. Perhaps they have an op code or something in the struct, or a
> netlink-like format, or *something* but you don't need to know what
> the fd is connected to in order to parse the struct. The ioctl # and
> the argument should be enough to parse.

In that case they are designed by taste-less fools.  No need to
to spread that BS even further.

> > Well there is no need to do that with the standard way. The filehandle
> > identifies the driver. No need to modify strace and no need to
> > schlepp the device_id around.
> 
> Nope, that isn't how strace works, strace never checks the filehandle.

Strace is just a random tracing tool.  No need to design interface
for it.  Just use a ioctl values that don't confluct with anything
heavily used and we'll be fine.

> You are really surprised by the rdma_cm architecture??? I know it is
> goofy, but we are stuck with it..

Are we?  We'll need to stick to the wire format obviously, but the
software architectures needs to die rather sooner than later.  It's the
worst pile of junk in the RDMA subsystem, and that really means
something.  It's almost impossible to use it correctly due to all the
warts and un- or under-documented assumtions in it's APIs.

> .. and we have been doing the un-described structs like you are asking
> for today. libmlx4 just assumes the fd it is talking to is a mlx4
> driver (because sysfs said so) and jams in untagged driver-specific
> structs to the command flow. strace cannot parse them and there is no
> kernel support for debugging or accidental misuse..
> 
> Adding a little tag to the driver specific struct seems totally
> harmless, every iteration of the various proposals has had some kind
> of struct tag one way or another. I don't know what you see strange
> about this.

Just use different ioctl codes for different drivers and you're done.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-07-21  8:04 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19 15:23 [RFC ABI V2 0/8] SG-based RDMA ABI Proposal Matan Barak
     [not found] ` <1468941812-32286-1-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-07-19 15:23   ` [RFC ABI V2 1/8] RDMA/core: Export RDMA IOCTL declarations Matan Barak
     [not found]     ` <1468941812-32286-2-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-07-20  1:06       ` Christoph Lameter
     [not found]         ` <alpine.DEB.2.20.1607192004510.5828-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2016-07-20  3:15           ` Leon Romanovsky
2016-07-21  8:07       ` Christoph Hellwig
     [not found]         ` <20160721080719.GB21060-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-07-21 10:49           ` Leon Romanovsky
2016-07-19 15:23   ` [RFC ABI V2 2/8] RDMA/core: Refactor IDR to be per-device Matan Barak
     [not found]     ` <1468941812-32286-3-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-07-20  1:15       ` Christoph Lameter
     [not found]         ` <alpine.DEB.2.20.1607192014010.5828-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2016-07-20  3:20           ` Leon Romanovsky
     [not found]             ` <20160720032037.GR20674-2ukJVAZIZ/Y@public.gmane.org>
2016-07-20 17:08               ` Jason Gunthorpe
2016-07-20 17:41       ` Jason Gunthorpe
     [not found]         ` <20160720174122.GJ21460-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-21 11:52           ` Matan Barak
     [not found]             ` <13309138-dd3f-7411-d750-4ff370d55daa-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-07-21 16:51               ` Jason Gunthorpe
2016-07-19 15:23   ` [RFC ABI V2 3/8] RDMA/core: Add support for custom types Matan Barak
2016-07-19 15:23   ` [RFC ABI V2 4/8] RDMA/core: Introduce add/remove uobj from types Matan Barak
2016-07-19 15:23   ` [RFC ABI V2 5/8] RDMA/core: Add new ioctl interface Matan Barak
     [not found]     ` <1468941812-32286-6-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-07-20  1:25       ` Christoph Lameter
     [not found]         ` <alpine.DEB.2.20.1607192021500.5828-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2016-07-20  8:11           ` Matan Barak
     [not found]             ` <53dd8337-0779-341e-49f5-ad675269bfe6-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-07-20 10:03               ` Christoph Lameter
     [not found]                 ` <alpine.DEB.2.20.1607200448370.12616-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2016-07-20 11:56                   ` Matan Barak
     [not found]                     ` <0fc727fd-bc35-b2bd-f4a7-04efd937d4c3-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-07-21  0:38                       ` Christoph Lameter
2016-07-20 17:21                   ` Jason Gunthorpe
     [not found]                     ` <20160720172143.GG21460-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-21  0:57                       ` Christoph Lameter
     [not found]                         ` <alpine.DEB.2.20.1607201950160.24804-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2016-07-21  1:56                           ` Jason Gunthorpe
     [not found]                             ` <20160721015613.GB8279-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-21  2:41                               ` Christoph Lameter
     [not found]                                 ` <alpine.DEB.2.20.1607202132080.26260-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2016-07-21  3:28                                   ` Jason Gunthorpe
     [not found]                                     ` <20160721032803.GA12093-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-21  5:00                                       ` Christoph Lameter
     [not found]                                         ` <alpine.DEB.2.20.1607202340280.26638-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2016-07-21  5:44                                           ` Jason Gunthorpe
     [not found]                                             ` <20160721054439.GA19329-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-21  7:11                                               ` Christoph Lameter
     [not found]                                                 ` <alpine.DEB.2.20.1607210202400.29415-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2016-07-21 16:41                                                   ` Jason Gunthorpe
     [not found]                                                     ` <20160721164133.GD19849-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-25 16:30                                                       ` Christoph Lameter
     [not found]                                                         ` <alpine.DEB.2.20.1607251104370.23039-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2016-07-25 18:01                                                           ` Jason Gunthorpe
     [not found]                                                             ` <20160725180119.GB18773-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-27 15:03                                                               ` Christoph Lameter
     [not found]                                                                 ` <alpine.DEB.2.20.1607270954150.25436-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2016-07-27 17:28                                                                   ` Parav Pandit
     [not found]                                                                     ` <CAG53R5XZ9RVg-2yGFbr-7To1SMbRoGG3xiZHf-vNnGM4K+R4pw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-27 18:03                                                                       ` Christoph Lameter
     [not found]                                                                         ` <alpine.DEB.2.20.1607271300150.27032-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2016-07-27 18:56                                                                           ` Parav Pandit
     [not found]                                                                             ` <CAG53R5V07Q-O8cmm3Ad23qsH3oDQiw9nL87yG2=ki=Rgg9LQAA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-27 18:58                                                                               ` Christoph Lameter
2016-07-21  8:04                                               ` Christoph Hellwig [this message]
     [not found]                                                 ` <20160721080433.GA21060-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-07-21 16:20                                                   ` Jason Gunthorpe
     [not found]                                                     ` <20160721162033.GB19849-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-25 16:32                                                       ` Christoph Lameter
     [not found]                                                         ` <alpine.DEB.2.20.1607251131000.23039-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2016-07-25 17:39                                                           ` Jason Gunthorpe
2016-07-19 15:23   ` [RFC ABI V2 6/8] RDMA/core: Add initialize and cleanup of common types Matan Barak
     [not found]     ` <1468941812-32286-7-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-07-20 17:40       ` Jason Gunthorpe
     [not found]         ` <20160720174052.GI21460-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-21 11:40           ` Matan Barak
2016-07-19 15:23   ` [RFC ABI V2 7/8] RDMA/core: Add common code for querying device and init context Matan Barak
2016-07-19 15:23   ` [RFC ABI V2 8/8] RDMA/mlx5: Add mlx5 initial support of the new infrastructure Matan Barak
     [not found]     ` <1468941812-32286-9-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-07-20 17:39       ` Jason Gunthorpe
     [not found]         ` <20160720173927.GH21460-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-21 11:38           ` Matan Barak
     [not found]             ` <8ffd0f92-2564-cc39-10ab-5db287399e82-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-07-21 16:49               ` Jason Gunthorpe
     [not found]                 ` <20160721164952.GE19849-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-24  6:18                   ` Matan Barak

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=20160721080433.GA21060@infradead.org \
    --to=hch-wegcikhe2lqwvfeawa7xhq@public.gmane.org \
    --cc=cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=liranl-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.