[openib-general] VAPI like API

Sean Hefty mshefty at ichips.intel.com
Thu Jul 29 13:59:09 PDT 2004


On Thu, 29 Jul 2004 09:45:46 -0400
"Rimmer, Todd" <trimmer at infiniconsys.com> wrote:

> How do you see odd sized fields like the multicast gid group id being handled?
> Also when we get to actual MAD processing there are a lot of bitfields in the MAD/CM/SA packets.

My preference would be to use functions to get/set values in MADs that are of odd sizes.  I would prefer to use bit masks, rather an bit fields.  But, I'll defer to using whatever method is most commonly used in the networking stack today.


> Personally I have debugged so many missing ntoh type bugs in the past that

This is why I'm saying that everything should be in network order.  You get a LID or QP number from a path record/CM MAD/etc., then turn around and use it unmodified in the access layer API.  Remove or reduce how many times ntoh must be called, and the number of bugs should be removed/reduced accordingly.


> We took a layered byteswapping approach.

This sounds error prone to me; however, I can understand why you might take this approach with the MAD headers.



More information about the general mailing list