[ofa-general] Re: [PATCH] ib_mthca: use log values instead of numeric values when specifiying HCA resource maxes in module parameters
Jack Morgenstein
jackm at dev.mellanox.co.il
Thu May 1 00:04:27 PDT 2008
On Tuesday 29 April 2008 19:48, Roland Dreier wrote:
> given that mthca has had the old interface for nearly a year and a half,
> what do we gain from changing it now?
>
We gain clarity and consistency. The mlx4 driver in OFED 1.3 uses log values
in the module parameters (patch for mlx4 that I submitted in October 2007).
> > I put a check in the patch for detecting if the user specified a log or not,
> > to make the transition from the old method (of numbers instead of logs)
> > easier.
>
> Yes, that is nice. Would the plan be just to allow both methods?
Good idea, but cannot be done for all parameters. "max rdb per qp"
is by default 4 rdb's per qp (log = 2). If an administrator supplies
ONLY this parameter in an "options" line for ib_mthca, how can I tell
if the value is a log or a number? (Say administrator places the following
line: "options ib_mthca num_rdb=4" -- how will I know that the admin
means "log" , or just a number).
Maybe the best solution is to change the parameter name from "num_xxx" to
"log_num_xxx". That way, if the administrator is using an old /etc/modprobe.conf
file, with lines like "options ib_mthca num_xxxx=20000", then ib_mthca will fail
to load, and there will be lines in file /var/log/messages like
"ib_mthca: Unknown parameter `num_cq' ".
Please note also that very few customer are using this module-parameter capability
as yet.
> it would make sense for mlx4 to allow setting parameter
> values by value and not by log, and then we end up with all the same
> code in both places, and so why not just have mlx4 set by value the same
> way as mthca?
>
OFED 1.3 has the patch I submitted for mlx4 in October 07, and this already uses
logs, not values. We would then be confusing Hermon customers if we change this
to values.
I think it is healthiest to:
1. Use the ib_mthca patch I submitted, but change the parameter names from "num_xxx" to
"log_num_xxx"
2. Take the mlx4 patch as is (maybe adding a check that values are <31).
- Jack
More information about the general
mailing list