Re: ibmvfc oddities

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

 



On 09/21/2017 05:02 AM, Hannes Reinecke wrote:
> Hi Brian,
> 
> I was looking at the ibmvfc code (trying to hook up libfc), and have
> found this definition:
> 
> struct ibmvfc_fcp_rsp_info {
> 	__be16 reserved;
> 	u8 rsp_code;
> 	u8 reserved2[4];
> }__attribute__((packed, aligned (2)));
> 
> in comparison, libfc has this:
> 
> struct fcp_resp_rsp_info {
>     __u8      _fr_resvd[3];       /* reserved */
>     __u8      rsp_code;           /* Response Info Code */
>     __u8      _fr_resvd2[4];      /* reserved */
> };
> 
> So both look _nearly_ identical, except the missing byte at the start.
> It might be inserted due to some compile alignment magic, but I'd rather
> not rely on this.
> Could you clarify if the two structures really are different, or if this
> is a simple oversight?

Looks like a bug to me. We should probably just have ibmvfc use the
libfc definition.

Tyrel - can you do this conversion and run a bit of regression testing?
Looking at the possible values of rsp_code, the most likely place where
this might cause us some issues is in TMF handling. I'm a little
worried this could result in a potential double completion in error
handling in some rare cases.... Tyrel - are you aware of any issues
like that, which this might explain?

Thanks,

Brian

-- 
Brian King
Power Linux I/O
IBM Linux Technology Center




[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