Christoph Hellwig | 1 Nov 2005 05:58
Picon

Re: [openib-general] Re: [PATCH/RFC] IB: Add SCSI RDMA Protocol (SRP) initiator

On Mon, Oct 31, 2005 at 08:55:23PM -0800, Roland Dreier wrote:
> Anyway, looking at drivers/scsi/ibmvscsi/srp.h, the main problem I see
> is that the file has a bunch of bitfields that are big-endian only
> (which makes sense because the driver can only be compiled for pSeries
> or iSeries anyway).
> 
> But I have no objection to moving the file to include/scsi/srp.h,
> adding a bunch of
> 
>     #if defined(__LITTLE_ENDIAN_BITFIELD)
>     #elif defined(__BIG_ENDIAN_BITFIELD)
>     #endif
> 
> and adding a few missing defines, and then converting ib_srp to use
> the same file.
> 
> Does that seem like the right thing to do?

No. Bitfields for accessing hardware/wire datastructures are wrong and
will always break in some circumstances.  Your header is much better.

> 
> Thanks,
>   Roland
> _______________________________________________
> openib-general mailing list
> openib-general <at> openib.org
> http://openib.org/mailman/listinfo/openib-general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
(Continue reading)

Roland Dreier | 1 Nov 2005 06:03
Picon
Favicon

Re: Re: [PATCH/RFC] IB: Add SCSI RDMA Protocol (SRP) initiator

    Christoph> No. Bitfields for accessing hardware/wire
    Christoph> datastructures are wrong and will always break in some
    Christoph> circumstances.  Your header is much better.

OK, that's my feeling as well.

Would it make sense for me to split the pure SRP spec structures and
so on into a separate file and put it in include/scsi/srp.h?  Then we
can move ibmvscsi towards using that file.

 - R.
Christoph Hellwig | 1 Nov 2005 06:04
Picon

Re: Re: [PATCH/RFC] IB: Add SCSI RDMA Protocol (SRP) initiator

On Mon, Oct 31, 2005 at 09:03:35PM -0800, Roland Dreier wrote:
>     Christoph> No. Bitfields for accessing hardware/wire
>     Christoph> datastructures are wrong and will always break in some
>     Christoph> circumstances.  Your header is much better.
> 
> OK, that's my feeling as well.
> 
> Would it make sense for me to split the pure SRP spec structures and
> so on into a separate file and put it in include/scsi/srp.h?  Then we
> can move ibmvscsi towards using that file.

Sounds like a good idea, yes.


Gmane