On Mon, Jun 15, 2009 at 04:42:36PM +0300, Eli Cohen wrote:

> +void str2gid(char *grh, union ibv_gid *gid)
> +{
> +     char tmp;
> +
> +     tmp = grh[8];
> +     grh[8] = 0;
> +     gid->dwords[0] = htonl(strtoul(grh, NULL, 16));
> +     grh[8] = tmp;
> +
> +     tmp = grh[16];
> +     grh[16] = 0;
> +     gid->dwords[1] = htonl(strtoul(grh + 8, NULL, 16));
> +     grh[16] = tmp;
> +
> +     tmp = grh[24];
> +     grh[24] = 0;
> +     gid->dwords[2] = htonl(strtoul(grh + 16, NULL, 16));
> +     grh[24] = tmp;
> +
> +     gid->dwords[3] = htonl(strtoul(grh + 24, NULL, 16));
> +}

Please use inet_pton(AF_INET6,grh,gid) for this?

> +     if (ctx->dgid.global.interface_id) {
> +             attr.ah_attr.is_global = 1;
> +             attr.ah_attr.grh.hop_limit = 1; 
> +             attr.ah_attr.grh.dgid = ctx->dgid;
> +     }

We've been working to get rid of stuff like this for the IB router
work. Can you call into the SA path resolution stuff instead of doing
this?

> +     if (ctx->dgid.global.interface_id) {
> +             ah_attr.is_global = 1;
> +             ah_attr.grh.hop_limit = 1;
> +             ah_attr.grh.dgid = ctx->dgid;
> +     }
> +

Same

Jason
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to