linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sathya Prakash Veerichetty <sathya.prakash@broadcom.com>
To: dgilbert@interlog.com, Bart Van Assche <Bart.VanAssche@wdc.com>,
	hch@infradead.org, Kashyap Desai <kashyap.desai@broadcom.com>,
	Shivasharan Srikanteshwara
	<shivasharan.srikanteshwara@broadcom.com>
Cc: Sumit Saxena <sumit.saxena@broadcom.com>,
	Peter Rivera <peter.rivera@broadcom.com>,
	linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org
Subject: RE: [PATCH 13/14] megaraid_sas: NVME passthru command support
Date: Wed, 10 Jan 2018 15:14:40 -0700	[thread overview]
Message-ID: <e407e98c266c060412bfa8b64ded18df@mail.gmail.com> (raw)
In-Reply-To: <d6da790a-8248-c71d-6643-6ae3107989d0@interlog.com>

Bart et al,
Broadcom's Tri-mode HBAs and MegaRAID controllers are capable of
connecting with SAS, SATA, NVMe drives,  SAS expanders and PCIe switches
(with NVMe drives connected behind that) and are capable of creating RAID
volumes on top of similar family of drives.  In the case of RAID
controllers, all of those drives and RAID volumes are exposed to the OS as
generic SCSI devices and in the case of HBA only for SAS and SATA the
topology is exposed to OS through SAS transport layer and NVMe drives are
exposed as generic SCSI devices.  The SCSI CDB to specific packet (SATA
frames, SSP frames or NVMe) translation occurs in the hardware/firmware.
For the OS driver, the interface to interact is common across all the type
of devices and it is MPI SCSI IO Request.

The NVMe passthru support added in this patch is only for management
purpose and will let Broadcom specific management applications to send
some direct NVMe commands to the hardware/firmware solely for management
purpose.  For normal READ/WRITE I/O the preferred path is to issue SCSI
command to our hardware/firmware and let it translate to the NVMe.

We have many architectural constraints to directly expose NVMe drives to
NVMe subsystem for normal I/O usage and management usage and hence we
prefer not to go down the path.

This patch is just addition of new feature for our management applications
(which are common across many OSes) to access a specific type of MPI
command to manage NVMe drives connected behind our HBAs (which are
non-standard) in a vendor specific way, hence we think this patch is valid
to be accepted to megaraid driver.  Please let us know if more details are
required on the tri-mode controllers.

Thanks
Sathya


-----Original Message-----
From: Linux-nvme [mailto:linux-nvme-bounces@lists.infradead.org] On Behalf
Of Douglas Gilbert
Sent: Wednesday, January 10, 2018 1:06 PM
To: Bart Van Assche; hch@infradead.org; kashyap.desai@broadcom.com;
shivasharan.srikanteshwara@broadcom.com
Cc: sumit.saxena@broadcom.com; peter.rivera@broadcom.com;
linux-nvme@lists.infradead.org; linux-scsi@vger.kernel.org
Subject: Re: [PATCH 13/14] megaraid_sas: NVME passthru command support

On 2018-01-10 11:22 AM, Bart Van Assche wrote:
> On Tue, 2018-01-09 at 22:07 +0530, Kashyap Desai wrote:
>> Overall NVME support behind MR controller is really a SCSI device. On
>> top of that, for MegaRaid, NVME device can be part of Virtual Disk
>> and those drive will not be exposed to the driver. User application
>> may like to talk to hidden NVME devices (part of VDs). This patch
>> will extend the existing interface for megaraid product in the same
>> way it is currently supported for other protocols like SMP, SATA
pass-through.
>
> It seems to me like there is a contradiction in the above paragraph:
> if some NVMe devices are not exposed to the driver, how can a user
> space application ever send NVMe commands to it?

I think that he meant that the NVMe physical devices (e.g. SSDs) are not
exposed to the upper layers (e.g. the SCSI mid-layer and above). The SCSI
subsystem has a no_uld_attach device flag that lets a LLD attach physical
devices but the sd driver and hence the block layer do not "see" them. The
idea is that maintenance programs like smartmontools can use them via the
bsg or sg drivers. The Megaraid driver code does not seem to use
no_uld_attach. Does the NVMe subsystem have similar "generic" (i.e.
non-block) devices accessible to the user space?

> Anyway, has it been considered to implement the NVMe support as an
> NVMe transport driver? The upstream kernel already supports NVMe
> communication with NVMe PCI devices, NVMe over RDMA and NVMe over FC.
> If communication to the NVMe devices behind the MegaRaid controller
> would be implemented as an NVMe transport driver then all
> functionality of the Linux NVMe driver could be reused, including its
sysfs entries.

Broadcom already sell "SAS" HBAs that have "tri-mode" phys. That is a phy
that can connect to a SAS device (e.g. a SAS expander), a SATA device or a
NVMe device. Now if I was Broadcom designing a 24 Gbps SAS-4 next
generation expander I would be thinking of using those tri-mode phys on
it. But then there is a problem, SAS currently supports 3 protocols: SSP
(for SCSI storage and enclosure management (SES)), STP (for SATA storage )
and SMP (for expander management). The problem is how those NVMe commands,
status and data cross the wire between the OS HBA (or MegaRaid type
controller) and an expander. Solving that might need some lateral
thinking.

On one hand the NVM Express folks seem to have shelved the idea of a SCSI
to NVMe Translation Layer (SNTL) and have not updated an old white paper
on the subject. Currently there is no SNTL on Linux (there was but it was
removed) or FreeBSD but there is one on Windows.

On the other hand I'm informed that recently the same body accepted the
SES-3 standard pretty much as-is. That is done with the addition of SES
Send and SES Receive commands to NVME-MI. The library under sg_ses has
already been modified to use them (by implementing a specialized SNTL).

Doug Gilbert


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2018-01-10 22:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 13:35 [PATCH 13/14] megaraid_sas: NVME passthru command support Shivasharan S
2018-01-08 10:05 ` Christoph Hellwig
2018-01-09 16:37   ` Kashyap Desai
2018-01-09 16:45     ` Christoph Hellwig
2018-01-09 20:50       ` Douglas Gilbert
2018-01-09 23:23         ` Keith Busch
2018-01-10  9:32           ` Kashyap Desai
2018-01-10 10:03         ` Kashyap Desai
2018-01-10 16:22     ` Bart Van Assche
2018-01-10 20:06       ` Douglas Gilbert
2018-01-10 22:14         ` Sathya Prakash Veerichetty [this message]
2018-01-11 17:46           ` Keith Busch
2018-01-11 18:07             ` Sathya Prakash Veerichetty
2018-01-15 12:16               ` Kashyap Desai
2018-01-16  3:06                 ` Martin K. Petersen
  -- strict thread matches above, loose matches on Subject: below --
2018-01-05 13:33 Shivasharan S
2018-01-05 13:27 [PATCH 00/14] megaraid_sas: driver updates Shivasharan S
2018-01-05 13:27 ` [PATCH 13/14] megaraid_sas: NVME passthru command support Shivasharan S

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=e407e98c266c060412bfa8b64ded18df@mail.gmail.com \
    --to=sathya.prakash@broadcom.com \
    --cc=Bart.VanAssche@wdc.com \
    --cc=dgilbert@interlog.com \
    --cc=hch@infradead.org \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=peter.rivera@broadcom.com \
    --cc=shivasharan.srikanteshwara@broadcom.com \
    --cc=sumit.saxena@broadcom.com \
    /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).