[ofa-general] IPOIB CM (NOSRQ)[PATCH V5] patch

Roland Dreier rdreier at cisco.com
Sun Jun 10 08:57:02 PDT 2007


Haven't read very far, but...

 > +#define SIXTY_FOUR_K (1ul << 16)
 > +#define MEGA_BYTE (1ul << 20)

this is really horrible.  There's no point in this type of defines --
a constant should have a name that describes what it's *for*, not what
the value is.  The code above is pretty close to

#define SIXTY_FOUR	64

and I hope it's obvious why that's pointless.

And also

 > +		ipoib_warn(priv, "NOSRQ has reached the configurable limit "
 > +		           "of either %d RC QPs or, max recv buf size of "
 > +			   "0x%lx MB\n", max_rc_qp, max_recv_buf * MEGA_BYTE);

this is buggy -- you print the value as being in MB but then also
multiply by MEGA_BYTE before printing it.



More information about the general mailing list