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

Roland Dreier rolandd at cisco.com
Wed Nov 9 14:53:31 PST 2005


> +	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.

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.

 - R.



More information about the general mailing list