linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: James Smart <James.Smart@Emulex.Com>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-scsi@vger.kernel.org, robert.w.love@intel.com
Subject: Re: [RFC] Common header file for FC definitions
Date: Tue, 8 Jan 2008 17:53:41 +0100	[thread overview]
Message-ID: <20080108165341.GA13926@schmichrtp.de.ibm.com> (raw)
In-Reply-To: <47839AEB.3090003@emulex.com>

On Tue, Jan 08, 2008 at 10:46:51AM -0500, James Smart wrote:
> Christoph Hellwig wrote:
> >On Tue, Jan 08, 2008 at 09:09:36AM +0100, Christof Schmitt wrote:
> >>zfcp has a couple of definitions to describe the FC protocol. Grepping
> >>through the complete source tree shows that e.g. the lpfc module makes
> >>similar private definitions. It think that it would make sense to
> >>introduce a global header file for FC related definitions that each FC
> >>driver can use.
> >>
> >>The attached patch contains some definitons that i found in zfcp and
> >>could be reused by other drivers.
> >>
> >>What do others think? Would this be useful?
> >
> >This is a very good idea.  It might make more sense to have the more or
> >less complete defintions for the fc protocol in the header.  Robert &
> >folks have been working on a software fc stack part as the fcoe header
> >so they might have one to contribute.
> 
> I Agree - A common header for standard FC definitions would be a good thing.
> 
> That said, we have to be a little lenient on when drivers convert over to
> the standard headers as there's likely code change required.

For zfcp, i would like to move the FC specific definitions out of the
zfcp_def.h header file. My idea would be to introduce a simple header
file like proposed and to adapt zfcp to use these.  I don't intend to
write header files for the full FC protocol, since zfcp only uses a
small part. When other drivers use more definitions, then the
definitions can be added to the existing file.

When other drivers want to use the global definitions, they can
include the global file, but they don't have to.

Would others also be interested in having structs in the global header
file for FC commands like this?

struct zfcp_ls_adisc {
	u8		code;
	u8		field[3];
	u32		hard_nport_id;
	u64		wwpn;
	u64		wwnn;
	u32		nport_id;
} __attribute__ ((packed));

This could be renamed to fc_ls_adisc and also be part of the global
header file. But probably it makes more sense to start simple now and
think about the common structs later.

Thanks for the comments.

Christof

  reply	other threads:[~2008-01-08 16:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-08  8:09 [RFC] Common header file for FC definitions Christof Schmitt
2008-01-08 13:14 ` Christoph Hellwig
2008-01-08 15:46   ` James Smart
2008-01-08 16:53     ` Christof Schmitt [this message]
2008-01-08 13:59 ` Seokmann Ju

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=20080108165341.GA13926@schmichrtp.de.ibm.com \
    --to=christof.schmitt@de.ibm.com \
    --cc=James.Smart@Emulex.Com \
    --cc=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=robert.w.love@intel.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).