On Tue, May 18, 2010 at 3:08 PM, Sean Hefty <[email protected]> wrote:
>>Thoughts?
>
> The padding looks wrong based on the IB spec. PortInfoRecord should have
> PortInfo as its last field. The size of PortInfoRecord should be 58 bytes.
I don't think that size for PortInfoRecord is correct as PortInfo is
60 bytes with MaxCreditHint and LinkRtLatency.
-- Hal
>
>>#include <complib/cl_packon.h>
>>typedef struct _ib_portinfo_record
>>{
>> ib_net16_t lid;
>> uint8_t port_num;
>> uint8_t resv;
>> ib_port_info_t port_info;
>> uint8_t pad[6]; <-- ??
>>
>>} PACK_SUFFIX ib_portinfo_record_t;
>>#include <complib/cl_packoff.h>
>
> My guess (and this is only a guess) is that the padding was added to make
> PortInfoRecord align on a 64-bit boundary, probably in case it were sent as
> part
> of an RMPP mad. The PortInfo structure contains 64-bit values at the top of
> the
> structure.
>
> You should be safe removing the padding. It may cause Itanium to complain
> about
> unaligned fields, but I would expect it to work.
>
> - Sean
>
> _______________________________________________
> ofw mailing list
> [email protected]
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
>
_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw