[openib-general] Re: [PATCH] mthca: fix posting long work request lists

Grant Grundler iod00d at hp.com
Wed Nov 9 15:45:56 PST 2005


On Wed, Nov 09, 2005 at 02:53:31PM -0800, Roland Dreier wrote:
> > +	MTHCA_INVAL_LKEY			= 0x100,
> > +	MTHCA_TAVOR_MAX_WQES_PER_RECV_DB	= 256
> 
>     Grant> Why would we use two different contants with the same value
>     Grant> in one enum?  ie why not declare them both at "0x100" *or*
>     Grant> "256"?
> 
> I thought about that when I was writing it.  Both are kind of random
> constants that could just as easily be in two enums, but I don't see
> much benefit in that.

Putting them in one enum implies they are related.
That's what confused me.
Can they just be #defines ?


> The reason I left one in hex and on in decimal is that the first
> constant is really just a bit pattern, so I think it's clearer in
> hex.  The second constant really represents the number 256, so I think
> it's clearer in decimal.

yeah - makes sense.

grant



More information about the general mailing list