[ofa-general] RE: [PATCH 8/8] [ib-diags] smpquery: add support for WinOF

Sean Hefty sean.hefty at intel.com
Wed Feb 18 09:32:30 PST 2009


>>  #include <infiniband/umad.h>
>>  #include <infiniband/mad.h>
>> -#include <infiniband/complib/cl_nodenamemap.h>
>> +#include <complib/cl_nodenamemap.h>
>
>Is it needed? Rest tools use similar path with leading 'infiniband'.

That directory path doesn't exist in Windows.  I think this makes sense.
Complib is a separate library, independent of infiniband.

>> -	for (i = 0; i < (n + 31) / 32; i++) {
>> +	for (i = 0; i < (uint32_t) ((n + 31) / 32); i++) {
>
>Wouldn't it be better to make declare i, j, k as int? Width 32 doesn't
>make any sense here.
>
>>  		mod =  i | (portnum << 16);
>>  		if (!smp_query(data, dest, IB_ATTR_PKEY_TBL, mod, 0))
>>  			return "pkey table query failed";
>> @@ -353,7 +353,7 @@ guid_info(ib_portid_t *dest, char **argv, int argc)
>>  		return "port info failed";
>>  	mad_decode_field(data, IB_PORT_GUID_CAP_F, &n);
>>
>> -	for (i = 0; i < (n + 7) / 8; i++) {
>> +	for (i = 0; i < (uint32_t) ((n + 7) / 8); i++) {

fixed




More information about the general mailing list