Re: [RFC] Common header file for FC definitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux