Thread (1 message) 1 message, 1 author, 2016-07-21

Re: [RFC ABI V2 5/8] RDMA/core: Add new ioctl interface

From: Christoph Hellwig <hidden>
Date: 2016-07-21 08:04:33

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.
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help