[ofw] patch: Allow send_bw to work with grh.

Tzachi Dar tzachid at mellanox.co.il
Tue Nov 23 02:41:36 PST 2010


Hi sean,

It seems to me that since we are already using the sprintf and sscanf for passing the information, there is no reason to change only for the last parameter. It will only make the code more complicated.

Thanks
Tzachi

> -----Original Message-----
> From: Hefty, Sean [mailto:sean.hefty at intel.com]
> Sent: Monday, November 22, 2010 8:12 PM
> To: Tzachi Dar; ofw at lists.openfabrics.org
> Subject: RE: patch: Allow send_bw to work with grh.
> 
> > +
> >
> > +// The Format of the message we pass through sockets (With Gid).
> >
> > +#define KEY_PRINT_FMT_GID
> >
> "%04x:%06x:%06x:%08x:%016I64x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%
> 02x:%02x:%02x:%02x:%02x:%02x:%0
> > 2x:%02x"
> 
> Please use inet_ntop to print GIDs.  It's much simpler.
> 
> > +             sprintf(msg, KEY_PRINT_FMT_GID,cl_hton16(my_dest->lid),
> cl_hton32(my_dest->qpn),
> >
> > +                             cl_hton32(my_dest->psn),
> cl_hton32(my_dest->rkey), my_dest->vaddr,
> >
> > +                             my_dest->gid.raw[0],my_dest-
> >gid.raw[1],
> >
> > +                             my_dest->gid.raw[2],my_dest-
> >gid.raw[3],
> >
> > +                             my_dest->gid.raw[4],my_dest-
> >gid.raw[5],
> >
> > +                             my_dest->gid.raw[6],my_dest-
> >gid.raw[7],
> >
> > +                             my_dest->gid.raw[8],my_dest-
> >gid.raw[9],
> >
> > +                             my_dest->gid.raw[10],my_dest-
> >gid.raw[11],
> >
> > +                             my_dest->gid.raw[12],my_dest-
> >gid.raw[13],
> >
> > +                             my_dest->gid.raw[14],my_dest-
> >gid.raw[15]);



More information about the ofw mailing list