Roland Dreier wrote:
 > I noticed that the following attributes in ibv_device_attr are in
 > network order:
 >    node_guid
 >    sys_image_guid
> > What is the reason for this?

It's hard for me to see any reason to byte-swap them.  GUIDs are
really byte-strings and it seems sensible to keep them into network
order, since you're not likely to do any arithmetic with them.
Another point in favor of network byte order is that GIDs are IPv6
addresses, and so they should be stored in network byte order by the
verbs just as IP addresses are kept in network byte order everywhere
else.  Given that GIDs are in network byte order, I think it would be
very confusing and error-prone if GUIDs were in host byte order.

I wanted to clarify this issue, thanks.

I will add to the man page that those attributes are in network order to prevent any confusion in the future ... (i tried to use them and noticed that they are not in host order in the first place ...)

thanks again
Dotan

_______________________________________________
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