[ofw] Re: [PATCH 8/8] [ib-diags] smpquery: add support for WinOF

Sasha Khapyorsky sashak at voltaire.com
Wed Feb 18 09:57:03 PST 2009


On 09:32 Wed 18 Feb     , Sean Hefty wrote:
> >>  #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.

This is not so in Linux. complib headers are installed under infiniband
(don't know why, but historically it is so).

Hmm, actually it is not really matter since complib headers by itself are
using  things like #include <complib/cl_something.h>. So ok, I think we
can change it in diag tools too.

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

Thanks. Just repost the patch. I will apply.

Sasha



More information about the ofw mailing list