[openib-general] [PATCH] mthca - read byte count & read request size

Eli Cohen eli at mellanox.co.il
Mon Mar 6 23:28:23 PST 2006


On Mon, 2006-03-06 at 19:25 -0800, Grant Grundler wrote:

> Why is this an enum?
> 
> > +static int pcix_max_rbc = PCIX_MAX_RBC_INVALID;
> 
> It's declared an int and is "user visible".
> I think the user interface would be better served
> if the user could just specify "pcix_max_rbc=2048"
> instead of some magic value.

Using an enum confines the set of valid values the user can specify to
the range 0-3 and it is easier to filter out invalid values. If I used
raw values for the parameters then questions like how do I interpret a
value of 1000 would rise: As invalid value so the parameter is ignored?
Or maybe I would configure rbc to 512? or 1024?



More information about the general mailing list