[openib-general][RFC][PATCH] mthca: HCA initialization parameters

Roland Dreier rdreier at cisco.com
Thu May 18 11:47:13 PDT 2006


    Leonid> Hello, we need a capability to change the HCA parameters,
    Leonid> in order to tune its resources.

    Leonid>    There is a special structure 'mthca_profile' in the
    Leonid> MTHA driver, used during the HCA initialization and
    Leonid> determining different HCA initialization parameters, such
    Leonid> as maximum number of QPs, CQs, address vectors etc.
    Leonid> Unfortunately, the parameters can not be defined outside
    Leonid> the driver.

    Leonid>    Attached file implements a number of the module
    Leonid> parameters allowing to define the 'mthca_profile' values.

Thanks, I've held off on doing this because adding these module
parameters doesn't handle multiple different HCAs very gracefully.
But I'm not sure if I really have a better solution -- (ab)using
request_firmware() maybe?

Does it make sense to tune all of these values?  For example is anyone
really changing the size of the user access region context?  And
certainly making num_uar tunable doesn't make any sense -- what do we
do if the user asks for more UARs than the PCI BAR can cover?  And
what do we save if someone asks for fewer?

The scheme of making the module parameter take effect only if its
non-zero seems really confusing to me.  Someone is going to look in
sysfs and see that num_qp is 0 and get confused.

Also I think all of these values need to be powers of 2, so that
should probably be enforced somehow (either by making the parameters
be log-base-2 values, or using roundup_pow_of_two -- I'm not sure
which is better).

 - R.



More information about the general mailing list