linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luben Tuikov <luben_tuikov@adaptec.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Christoph Hellwig <hch@lst.de>,
	linux-scsi@vger.kernel.org, jejb@steeleye.com, "Moore,
	Eric Dean" <Eric.Moore@lsil.com>
Subject: Re: [PATCH 1/4] sas: add flag for locally attached PHYs
Date: Thu, 20 Oct 2005 16:10:56 -0400	[thread overview]
Message-ID: <4357F9D0.3090602@adaptec.com> (raw)
In-Reply-To: <1129828959.2807.18.camel@laptopd505.fenrus.org>

On 10/20/05 13:22, Arjan van de Ven wrote:
>>We are not going to implement SDI in the kernel.  Long before SDI or
>>it's predecessor, HP CSMI were designed we made it clear we're not going
>>to accept wide ioctl-APIs, especially when they're even bad for old
>>ioctl API standards.  The CSMI spec has been passed around in an early
>>phase and been totally rejected, 
> 
> 
> Just to say AYE on this:
> 
> the problem with these things is that they define an IOCTL interface,
> while a library level interface would have been a LOT better. By far.
> That way the spec doesn't define the implementation, but only a real
> INTERFACE while allowing flexibility and compatibility. IOCTLs are just
> very very much the wrong layer to put such an interface. (just as
> posix/sus specify the (g)libc interface and not the kernel interface,
> although of course they impact it somewhat and glibc can for several
> things do a straight pass-through to the raw kernel interface).

Hi Arjan, how are you?

As I mentioned already, you do not have to take section 4 of SDI
literally.  If you implement section 5 of SDI, the back end, then
the front end is ajustable: sg/sysfs/whathaveyou1/whathaveyou2, etc.

Here is an excerpt sent by me to another storage engineer:
--cut--
Example of include/scsi/sdi/sdi.h (back-end):

/* This struct describes section 5 of the SDI spec */
struct sdi_functions_struct {
	int (*sdi_get_driver_info)(struct sdi_header *header,
				   struct sdi_driver_info *info);
	int (*sdi_get_controller_config)(struct sdi_header *header,
					 struct sdi_controller_config *config);
	/* the rest of the stub SDI functions defined here */
	...
};
	
/* This struct describes the provider */
struct sdi_provider_struct {
	char *provider_name; /* some name, whatever, may not be necessary */
	...
	struct sdi_functions_struct sdi_functions;   /* see above */
	...
};

And then the _calling_ of those functions is either via sg or sysfs
or whatever makes people happy (done in drivers/scsi/sdi.c).

Dispatching of those is driver/fw/hw/whatever dependent depending on
the provider and what they registered.

This will live in drivers/scsi/sdi.c and include/scsi/sdi/sdi.h
--cut--

You see?  You don't need IOCTLs, yet you can be fully compliant
to the spec so that already existing user space management programs
can transition with minimal change to their code (over to the front
end: sg/whatever).  This cuts down production costs in testing,
verification/etc.  Makes things cheaper to deploy and customers
are happy.

	Luben
-- 
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/

  reply	other threads:[~2005-10-20 20:11 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-20 15:25 [PATCH 1/4] sas: add flag for locally attached PHYs Moore, Eric Dean
2005-10-20 15:55 ` Luben Tuikov
2005-10-20 16:01 ` Christoph Hellwig
2005-10-20 16:51   ` Luben Tuikov
2005-10-20 17:03     ` Christoph Hellwig
2005-10-20 17:22       ` Arjan van de Ven
2005-10-20 20:10         ` Luben Tuikov [this message]
2005-10-21  8:16           ` Arjan van de Ven
2005-10-20 20:02       ` Luben Tuikov
2005-10-21  0:01         ` Andrew Patterson
2005-10-21  0:46           ` ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs) Jeff Garzik
2005-10-21  5:09             ` Mike Christie
2005-10-21  5:41             ` Douglas Gilbert
2005-10-21  6:19               ` Jeff Garzik
2005-10-21 18:37                 ` Luben Tuikov
2005-10-21 17:48             ` Luben Tuikov
2005-10-21 18:04               ` Christoph Hellwig
2005-10-21 18:12                 ` Luben Tuikov
2005-10-21 18:20                   ` Matthew Wilcox
2005-10-22  2:30                     ` Douglas Gilbert
2005-10-22  2:54                       ` Jeff Garzik
2005-10-22  3:53                         ` Jeff Garzik
2005-10-22 17:14                           ` Luben Tuikov
2005-10-22 17:49                             ` Francois Romieu
2005-10-22 16:51                         ` Luben Tuikov
2005-10-21 18:18               ` Jeff Garzik
2005-10-21 18:50                 ` Luben Tuikov
2005-10-21 18:54                   ` Jeff Garzik
2005-10-21 19:13                     ` Luben Tuikov
2005-10-21 19:23                       ` Jeff Garzik
2005-10-21 22:20                         ` Stefan Richter
2005-10-21 19:22                     ` Luben Tuikov
2005-10-21 19:39                       ` Jeff Garzik
2005-10-21 20:41                         ` Luben Tuikov
2005-10-21 21:12                           ` Jeff Garzik
2005-10-21 21:24                             ` Luben Tuikov
2005-10-21 21:41                               ` Jeff Garzik
2005-10-21 22:14                                 ` Luben Tuikov
2005-10-21 22:43                                   ` Jeff Garzik
2005-10-22  9:26                                     ` Stefan Richter
2005-10-22 17:23                                       ` Luben Tuikov
2005-10-22 10:42                                     ` Stefan Richter
2005-10-22 10:58                                       ` Christoph Hellwig
2005-10-22 15:28                                         ` Sergey Panov
2005-10-22 17:19                                           ` Christoph Hellwig
2005-10-22 17:38                                             ` Sergey Panov
2005-10-24 15:18                                               ` Luben Tuikov
2005-10-22 18:27                                             ` Alan Cox
2005-10-24 13:51                                             ` Luben Tuikov
2005-10-24 15:41                                               ` Alan Cox
2005-10-24 15:14                                                 ` Luben Tuikov
2005-10-24 16:03                                                   ` Regala
2005-10-24 16:13                                                     ` Luben Tuikov
2005-10-24 16:04                                                   ` Regala
2005-10-22 17:30                                         ` Luben Tuikov
2005-10-22 18:19                                           ` Jeff Garzik
2005-10-22 17:49                                         ` Stefan Richter
2005-10-24 22:09                                           ` ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attachedPHYs) David Lang
2005-10-24 23:09                                             ` Stefan Richter
2005-10-22 11:12                                       ` David Lang
2005-10-22 17:39                                         ` Luben Tuikov
2005-10-22 17:41                                         ` Stefan Richter
2005-10-22 17:51                                           ` Christoph Hellwig
2005-10-22 18:21                                             ` Stefan Richter
2005-10-22 18:39                                             ` Sergey Panov
2005-10-22 13:27                                       ` ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs) Stefan Richter
2005-10-22 16:09                                     ` Luben Tuikov
2005-10-21 19:41                       ` Matthew Wilcox
2005-10-21 19:48                         ` Luben Tuikov
2005-10-21 19:54                           ` Matthew Wilcox
2005-10-21 20:05                             ` Luben Tuikov
2005-10-21 19:46                       ` Arjan van de Ven
2005-10-21 19:50                         ` Luben Tuikov
2005-10-21  9:06           ` [PATCH 1/4] sas: add flag for locally attached PHYs Arjan van de Ven
2005-10-21 17:05             ` Andrew Patterson
2005-10-21 17:18               ` Arjan van de Ven
2005-10-21 18:57               ` Luben Tuikov
2005-10-21 17:32           ` Luben Tuikov
2005-10-21  1:50 ` Douglas Gilbert
2005-10-21  2:16   ` Jeff Garzik
2005-10-21  3:25     ` Douglas Gilbert
2005-10-21 18:04   ` Luben Tuikov
  -- strict thread matches above, loose matches on Subject: below --
2005-10-20 15:45 Moore, Eric Dean
2005-10-20 16:16 ` Luben Tuikov
2005-10-19 20:08 Moore, Eric Dean
2005-10-19 21:00 ` Luben Tuikov
2005-10-20 14:11   ` Christoph Hellwig
2005-10-20 15:29     ` Luben Tuikov
2005-10-20 15:49       ` Christoph Hellwig
2005-10-20 16:08         ` Luben Tuikov
2005-10-19 18:01 Christoph Hellwig
2005-10-19 19:24 ` Luben Tuikov
2005-10-19 19:37   ` Luben Tuikov

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=4357F9D0.3090602@adaptec.com \
    --to=luben_tuikov@adaptec.com \
    --cc=Eric.Moore@lsil.com \
    --cc=arjan@infradead.org \
    --cc=hch@lst.de \
    --cc=jejb@steeleye.com \
    --cc=linux-scsi@vger.kernel.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 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).