public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Aboo Valappil <aboo@aboo.org>
Cc: linux-scsi@vger.kernel.org
Subject: Re: SCSITAP, Virtual SCSI HBA and user space SCSI initiators
Date: Thu, 12 Oct 2006 15:39:14 -0500	[thread overview]
Message-ID: <452EA7F2.7040506@cs.wisc.edu> (raw)
In-Reply-To: <452E7A9A.3000501@aboo.org>

Aboo Valappil wrote:
> I am sending this again as the initial mail did not make it to the list.
> 
> Hi All,
> 
> I thought a lot about whether  I should write to mailing list about this
> or not. I have requested help from the list before to complete this. May
> be I am too crazy to develop something like this. When I think more and
> more about this, it will be really useful, mainly for educational
> purposes and it could be useful in other environments.
> 
> I like to know everyone's opinion on this. Please let me know your
> thoughts and suggestions and its inclusion in the main line Linux kernel.
> 
> I have developed a Virtual HBA (Around ~600 lines of code). It is a
> kernel module and works very well with 2.6.9 kernel. Basically it
> registers a HBA (LLD) to the SCSI Mid layer. It implements a linked list
> with all the SCSI commands queued from Mid layer. I registered  a
> character device driver. I ship out the SCSI commands off to user space
> via this character device. There is a user space application monitoring
> this character device looking for SCSI commands, process it and sends it
> back to the mid layer through this character interface.  At the moment,
> the interface to the Virtual HBA inside the kernel is through read/write
> and ioctls to the character device. I am trying to get rid of reading
> and writing of SCSI request_buffer through character device and use
> memmap/splice to avoid copying kernel buffer to user space(I am facing
> some challenges as the request_buffer is not a linear buffer, but a
> scatter gather buffer).

Is there any reason you went with the virtual scsi hba? There is a
dm-userspace module which would allow you to put any block layer driver
in userspace. You should ask Dan Smith <danms@us.ibm.com> and Tomo
<fujita.tomonori@lab.ntt.co.jp> to learn more.

I guess the downside would be that a lot of scsi-ml would be duplicated
in userspace. I am not sure how big a deal that is. If it is a problem,
you could at least look into what it takes to throw requests and buffers
between the kernel and userspace and what code can be shared between
your driver, dm-userspace, SG_IO, and the scsi target code.

  parent reply	other threads:[~2006-10-12 20:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <452E0A5C.6020001@aboo.org>
2006-10-12 17:25 ` SCSITAP, Virtual SCSI HBA and user space SCSI initiators Aboo Valappil
2006-10-12 17:48   ` James Bottomley
2006-10-12 22:13     ` aboo
2006-10-12 23:02       ` James Bottomley
2006-10-12 20:39   ` Mike Christie [this message]
2006-10-12 22:48   ` FUJITA Tomonori

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=452EA7F2.7040506@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=aboo@aboo.org \
    --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