Re: [PATCH] srp.h: avoid padding of structs

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

 



Am Dienstag, den 18.04.2006, 09:05 -0700 schrieb Roland Dreier:
> Thanks for pointing out this problem.  However I don't think we should
> pack every structure in the file, because packing structures that
> don't need it leads to gcc generating horrible code on architectures
> like ia64.  I'd prefer something like the following.
> 
> James, can you queue this up?  I'd be happy to merge it through my
> tree but it seems more appropriate for it to go through the SCSI tree.
> It's probably 2.6.17 material at this point in the cycle.
> 
> Thanks,
>   Roland
> 
> 
> 
> Several structs in <scsi/srp.h> get padded to a multiple of 8 bytes on
> 64-bit architectures and end up with a size that does not match the
> definition in the SRP spec:
> 
>                                      SRP spec     64-bit
>     sizeof (struct indirect_buf)        20          24
>     sizeof (struct srp_login_rsp)       52          56
>     sizeof (struct srp_rsp)             36          40
> 
> Fix this by adding __attribute__((packed)) to the offending structs.
> 
> Problem pointed out by Arne Redlich <arne.redlich@xxxxxxxxxxx>.
> 
> Signed-off-by: Roland Dreier <rolandd@xxxxxxxxx>

James,

since this one isn't in scsi-rc-fixes-2.6 yet and you didn't comment on
it, either, I assume you missed this one:

http://marc.theaimsgroup.com/?l=linux-scsi&m=114537635902712&w=2

Arne
-- 
Arne Redlich
Xiranet Communications GmbH

-
: 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