linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [LSF/MM TOPIC] Unifying the LIO and SCST target drivers
@ 2015-01-14 10:05 Bart Van Assche
  2015-01-14 11:26 ` Hannes Reinecke
                   ` (4 more replies)
  0 siblings, 5 replies; 33+ messages in thread
From: Bart Van Assche @ 2015-01-14 10:05 UTC (permalink / raw)
  To: lsf-pc@lists.linux-foundation.org
  Cc: linux-scsi@vger.kernel.org, target-devel, Nicholas A. Bellinger

The LIO and SCST SCSI target subsystems consist of the following components:
* A core that processes SCSI commands and that provides common
functionality like persistent reservations, LUN masking and an interface
that allows configuration from user space.
* Device handlers that allow this core to access SCSI devices, block
devices and files uniformly as SCSI devices.
* Target drivers that implement a storage protocol (iSCSI, FC, SRP,
iSER, FCoE, ...) and that realize the SCSI request and response
communication between the target system and an initiator system.

A significant amount of code is shared between several LIO target
drivers and the SCST target drivers that implement the same storage
protocol. Since there are two sets of these drivers this means that each
set has to be maintained, extended and tested separately. This means a
lot of redundant work. The main difference between these two sets of
drivers is the interface between the target drivers and the SCSI target
core.  Hence the proposal to discuss the unification of the API between
SCSI target core and SCSI target drivers. Implementing a single unified
API would have the following advantages:
* A single set of target drivers works for both projects which means a
reduction of the maintenance effort for those who maintain target
drivers for target driver developers and target driver users.
* This would increase the size of the user base for the unified target
drivers.
* This would reduce the workload for the storage target maintainers.
* This would motivate the SCST target driver maintainers to contribute
to the upstream target drivers and to bring the upstream SRP and FCoE
target drivers to the same feature and stability level as their SCST
counterparts. In other words, the LIO users would also benefit from this
work.
* This effort would also help SCST users by ensuring that all latest
target driver features are also available to SCST users. Some time ago
(but no longer today) the LIO QLogic target driver was ahead of the SCST
QLogic target driver. This motivated an SCST user to port the LIO QLogic
target driver to SCST. See also Greg Wettstein, New release of
SCST/Qlogic target interface driver, linux-scsi, April 2014,
http://marc.info/?l=linux-scsi&m=139649571807085).

During the first phase of this initiative the focus will be on the
QLogic FC, SRP and FCoE target drivers since a significant part of the
code of these drivers is shared between the two target frameworks.

For those who are not following the SCST project: I'm maintaining the
SCST SRP and FCoE target drivers.

Nic, in case it was not yet clear, you would be more than welcome during
this session :-)

Bart.

^ permalink raw reply	[flat|nested] 33+ messages in thread
* Re: [Lsf-pc] [LSF/MM TOPIC] Unifying the LIO and SCST target drivers
@ 2015-02-03 10:06 Dr. Greg Wettstein
  2015-02-09 13:16 ` Bart Van Assche
  0 siblings, 1 reply; 33+ messages in thread
From: Dr. Greg Wettstein @ 2015-02-03 10:06 UTC (permalink / raw)
  To: Christoph Hellwig, Bart Van Assche
  Cc: lsf-pc@lists.linux-foundation.org, target-devel,
	linux-scsi@vger.kernel.org, Nicholas A. Bellinger

On Jan 19,  1:21am, Christoph Hellwig wrote:
} Subject: Re: [Lsf-pc] [LSF/MM TOPIC] Unifying the LIO and SCST target driv

Hi, I hope the week is going well for everyone.

I'm a bit behind on e-mail and getting ready for travel but wanted to
reply back to this thread because of our involvement and interest in
this whole situation.

> On Thu, Jan 15, 2015 at 05:13:00PM +0100, Bart Van Assche wrote:
> > My goal is to realize this proposal without adding hooks for out-of-tree
> > code in the upstream kernel. What I had in mind is to raise the
> > abstraction level of the API between LIO core and target drivers a
> > little bit (e.g. by using accessor functions where necessary instead of
> > accessing structure members directly)

> That's very much a hook, althiugh a week one.
> 
> Either way I don't think bringing up a very much political topic
> without even any code to discuss isn't a very valueable use of our time
> slots.

There is code, no one is bothering to look at it or understand the
issues involved.

It takes a six line patch to the in-kernel Qlogic target driver for
SCST to leverage and contribute positively to the state of the
in-kernel driver.  A six line patch, which if we were engaging in
grounded engineering discussions, implements an interface which we
haven't found anyone who suggests is unfounded.

Our bona-fides in all this is that we developed the SCST target
interface driver which allows SCST to sit on top of the in-kernel
Qlogic target driver.  That driver is in use in a number of locations
driving hundreds and hundreds and hundreds of terrabytes of storage.

See the scst-devel and linux-scsi lists and the following:

ftp://ftp.enjellic.com/pub/scst/sqa_driver-1.1.tar.gz

Based on these experiences and building and debugging very complex
converged networks we can state pretty unequivocably that the current
target driver situation is working to no ones advantage.

The in-kernel target driver hasn't seen significant improvement or
work in over a year.  We carry a number of patches and bug fixes to
the driver which we have identified and fixed locally.  We are so
frustrated with the whole situation we don't even bother to push fixes
upstream.  So the notion that holding the in-kernel target driver as a
sacred bastion of purity will lead to a better codebase is ill
founded.

We cherry pick patches back and forther between the in-kernel and
out-of-kernel drivers and can speak pretty authoritatively to the fact
the in-kernel driver is now slipping behind the out-of-tree code.

There is a significant regression, which we believe can lead to
catastrophic data corruption under the right conditions, in the Qlogic
target driver, both in-tree and out-of-tree.  We believe the problem
is in session handling and have provided logs to Qlogic and were told,
'there is a issue and we are looking into it', but haven't heard
anything back.

The simple fact of the matter is that in modern CNA's/HBA's all of
this behavior is ultimately governed by the firmware in the cards.  No
one has access to that but the vendors.  We can make their job in
supporting the whole storage community easier if we are all looking at
and working on the same code, to the extent that is possible.

I can't speak to Infiniband but in the realm of fibre-channel/FCOE the
only problem is political not technical.

This is not an issue of a vendor electing to keep code out of tree.
The decision was made to take LIO into the kernel and there are not
going to be two in-kernel target stacks, so SCST is going to live out
of tree.  Those of us with significant engineering investments are not
going to dump SCST and move to the in tree code, good, bad or
indifferent.

We are willing and have expended the engineering time to make this
situation better.  An engineering based discussion comes down to what
types of legitimate API's the kernel needs to expose.  We do that all
over the kernel, I'm not sure why storage, other then politics, needs
to be any different.

Best wishes for a productive week.

Greg

}-- End of excerpt from Christoph Hellwig

As always,
Dr. G.W. Wettstein, Ph.D.   Enjellic Systems Development, LLC.
4206 N. 19th Ave.           Specializing in information infra-structure
Fargo, ND  58102            development.
PH: 701-281-1686
FAX: 701-281-3949           EMAIL: greg@enjellic.com
------------------------------------------------------------------------------
"For a successful technology, reality must take precedence over public
 relations, for nature cannot be fooled."
                                -- Richard Feynmann

^ permalink raw reply	[flat|nested] 33+ messages in thread
* Re: [Lsf-pc] [LSF/MM TOPIC] Unifying the LIO and SCST target drivers
@ 2015-02-12 13:04 Dr. Greg Wettstein
  0 siblings, 0 replies; 33+ messages in thread
From: Dr. Greg Wettstein @ 2015-02-12 13:04 UTC (permalink / raw)
  To: Bart Van Assche, greg, Christoph Hellwig
  Cc: lsf-pc@lists.linux-foundation.org, target-devel,
	linux-scsi@vger.kernel.org, Nicholas A. Bellinger

On Feb 9,  2:16pm, Bart Van Assche wrote:
} Subject: Re: [Lsf-pc] [LSF/MM TOPIC] Unifying the LIO and SCST target driv

> On 02/03/15 11:06, Dr. Greg Wettstein wrote:
> > It takes a six line patch to the in-kernel Qlogic target driver for
> > SCST to leverage and contribute positively to the state of the
> > in-kernel driver.  A six line patch, which if we were engaging in
> > grounded engineering discussions, implements an interface which we
> > haven't found anyone who suggests is unfounded.

> Hi Greg,

Hi Bart, I hope your week is going well.

> Thanks for your feedback. Although I certainly value your work,
> please note that what I proposed goes further than what you have
> done. If I understood your e-mails correctly what you have done is
> to unify the API between the QLogic initiator and target drivers for
> SCST and LIO. My proposal comprises not only a unification of the
> initiator drivers but also of the target drivers.

Just to clarify issues for discussion our work on the SQATGT driver
centered exclusively on the target component of the Qlogic driver.

Our work focused on providing an SCST equivalant to the tcm_qla2xxx.c
driver which the in-kernel implementation of the Qlogic target driver
uses to interface with the TCM target core.  The {scst,tcm}_qla2xxx
drivers register a function dispatch structure with the Qlogic
hardware target driver, qla_target.c.  These drivers take the actions
requested by the hardware driver and translate them into the necessary
target core processing functions.

As I have indicated the scst_qla2xxx driver could be distributed
separately from the kernel since it only relies on symbols which are
exported from the Qlogic driver.  I'm not familiar with IB and such
but it seems to be a reasonable architecture for both camps of
interest to collaborate on.

> Last week I finally found the time to start working on an sample
> implementation of such a unified driver. I hope that I will be able to
> make that code available for review somewhere next week.

Let us know when that becomes available since we would certainly like
to be assisting and supporting whatever the community agrees to as a
solution.

> Bart.

Have a good week.

}-- End of excerpt from Bart Van Assche

As always,
Dr. G.W. Wettstein, Ph.D.   Enjellic Systems Development, LLC.
4206 N. 19th Ave.           Specializing in information infra-structure
Fargo, ND  58102            development.
PH: 701-281-1686
FAX: 701-281-3949           EMAIL: greg@enjellic.com
------------------------------------------------------------------------------
"... Doc (interviews) is closest in look&feel to a Windows word-processor.
 It's even slow.  Very slow.  Hard to set up fonts and printing in the
 version I have...."
                                -- David Johnson

^ permalink raw reply	[flat|nested] 33+ messages in thread
* Re: [Lsf-pc] [LSF/MM TOPIC] Unifying the LIO and SCST target drivers
@ 2015-03-06  0:01 Dr. Greg Wettstein
  0 siblings, 0 replies; 33+ messages in thread
From: Dr. Greg Wettstein @ 2015-03-06  0:01 UTC (permalink / raw)
  To: Nicholas A. Bellinger, Bart Van Assche
  Cc: Christoph Hellwig, lsf-pc@lists.linux-foundation.org,
	target-devel, linux-scsi@vger.kernel.org

On Mar 1, 10:59pm, "Nicholas A. Bellinger" wrote:
} Subject: Re: [Lsf-pc] [LSF/MM TOPIC] Unifying the LIO and SCST target driv

Hi, I hope the week is progressing well for everyone.

> On Sat, 2015-02-28 at 12:59 +0100, Bart Van Assche wrote:
> > On 02/27/15 22:58, Nicholas A. Bellinger wrote:
> > > Looking at how your attempting to drive creation + removal of struct
> > > config_group from within kernel code here:
> > > 
> > > target: Add target port registration API
> > > https://github.com/bvanassche/linux/commit/dbb8bf32db3428ede6ecc688ede1e5e01fc59d88
> > > 
> > > is the exactly the wrong approach to take.
> > > 
> > > The creation and deletion of struct config_group must be driven by
> > > user-space, and by user-space only.  No exceptions will be made.
> > 
> > There exists an approach that preserves the ABI of both SCST and LIO,
> > namely:
> > * Add empty transport_register_wwn() and transport_unregister_wwn()
> >   functions in the LIO core.
> > * Add calls to these functions at the appropriate place in the FC
> >   and SRP target drivers.
> > * In the SCST implementation of the unified target driver API, route
> >   calls to transport_register_wwn() and transport_unregister_wwn() to
> >   scst_register_target() and scst_unregister_target() respectively.
> > 

> NAK.
>
> I'll not consider any hooks in upstream target code, and certainly
> not driver hooks for a control-plane approach unanimously rejected
> by both configfs and sysfs maintainers in 2008 and 2010.
>
> The whole point of target_core_fabric_configfs.c is to transparently
> reference count fabric driver data structures populated underneath
> /sys/kernel/config/target/$FABRIC/, who's design also has the added
> bonus of providing module reference counting to drivers 'for free'.
>
> So until you're prepared to evolve on this issue and stop pretending
> as if the future didn't already happen, this type of discussion at
> LSF is a waste of time.

So, in this spirit of collaborative and collegial exchange, which I
see that Christoph has called for, I have a question for those who
posess familiarity with the LIO control plane design.

In this parousia of total user-space configuration, not necessarily a
bad thing, what would be the target fabric presentation of a storage
target server which has one Qlogic 8242 card and one Qlogic 8362 card
in it?

> --nab

Best wishes for a pleasant remainder of the week to everyone.

Greg

}-- End of excerpt from "Nicholas A. Bellinger"

As always,
Dr. G.W. Wettstein, Ph.D.   Enjellic Systems Development, LLC.
4206 N. 19th Ave.           Specializing in information infra-structure
Fargo, ND  58102            development.
PH: 701-281-1686
FAX: 701-281-3949           EMAIL: greg@enjellic.com
------------------------------------------------------------------------------
"Man, despite his artistic pretensions, his sophistication and many
 accomplishments, owes the fact of his existence to a six-inch layer of
 topsoil and the fact that it rains."
                                -- Anonymous writer on perspective.
                                   GAUSSIAN quote.

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2015-03-09 16:51 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-14 10:05 [LSF/MM TOPIC] Unifying the LIO and SCST target drivers Bart Van Assche
2015-01-14 11:26 ` Hannes Reinecke
2015-01-14 12:23 ` Sagi Grimberg
2015-01-14 23:08 ` Quinn Tran
2015-01-15  0:52 ` Nicholas A. Bellinger
2015-01-15  9:08 ` [Lsf-pc] " Christoph Hellwig
2015-01-15 16:13   ` Bart Van Assche
2015-01-19  9:21     ` Christoph Hellwig
2015-01-19  9:36       ` Bart Van Assche
2015-02-20 10:49         ` Bart Van Assche
2015-02-21  0:00           ` Nicholas A. Bellinger
2015-02-25  8:43             ` Bart Van Assche
2015-02-27 21:58               ` Nicholas A. Bellinger
2015-02-28 11:59                 ` Bart Van Assche
2015-03-02  6:59                   ` Nicholas A. Bellinger
2015-03-04 10:23                     ` Bart Van Assche
2015-03-05 13:23                       ` Christoph Hellwig
2015-03-05 16:06                         ` Bart Van Assche
2015-03-05 18:38                           ` Andy Grover
2015-03-06  7:25                             ` Bart Van Assche
2015-03-06 19:15                               ` Andy Grover
2015-03-07  2:41                                 ` Sagi Grimberg
2015-03-07  6:25                                 ` Nicholas A. Bellinger
2015-03-09 16:51                                   ` Andy Grover
2015-03-06 23:10                               ` Nicholas A. Bellinger
2015-03-08 16:09                           ` Christoph Hellwig
2015-02-21 20:48           ` Sagi Grimberg
2015-02-22 16:29           ` Christoph Hellwig
2015-03-06 13:36           ` Bart Van Assche
  -- strict thread matches above, loose matches on Subject: below --
2015-02-03 10:06 Dr. Greg Wettstein
2015-02-09 13:16 ` Bart Van Assche
2015-02-12 13:04 Dr. Greg Wettstein
2015-03-06  0:01 Dr. Greg Wettstein

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).