[tulip] Changing MAX_UNITS to a configurable value?
Ben Greear
greearb@candelatech.com
Mon Dec 24 02:05:01 2001
Donald Becker wrote:
> On Sun, 23 Dec 2001, Ben Greear wrote:
>
>
>>I find myself wanting to run gobs of 4-port NICs in my
>>machines
>>
>
> This is a very unusual requirement. It's reasonable to expect someone
> with such a configuration to modify documented constants at the top of
> the source file.
Perhaps, but if I can make it configurable through the xconfig process,
it will be much easier to explain to potential customers of mine. For
some reason, editing source code scares some people :) As long as we
default to decent values, and have help information in the config process,
I don't see any problems with the extra configurability...
Actually, it would probably make more sense to have some more global
settings that influenced all (most) drivers. For instance, for buffer
sizes: 'small', 'big', 'huge' (and let individual drivers deal with
their internals to keep powers-of-two and/or cache alignment tweakings
in order...) We could have another setting to influence the number of
devices the drivers can support 'few' /* 0-4 */, 'several' /* 0-8 */,
'many' /* 0-24 */, 'bunches'/* 0-64 */
>
>
>>and the tulip driver (in 2.4.17), by default, will
>>handle only 8. There is a #define (MAX_UNITS) that looks
>>like it will raise this number to, say, 32.....
>>
>
> Check carefully: this is a limit only on the number of interfaces that
> you can pass module options to, not the number of supported interfaces.
>
> #define MAX_UNITS 8 /* More are supported, limit only on options */
Hrm, maybe I have a PCI/Card problem then. I see 8 ports (two of the 3 4-port
NICs), but not the last 4 ports. lspci does not show them either. Does that
mean anything to you?
>
>
>>To keep from having to change source code, I'd like to either
>>make the max-units a module parameter, or a compile time
>>option in 'make xconfig'.
>>
>
> The reason for the limit is that each module option needs a initialized
> array element.
So, it's just a memory usage issue, correct?
Thanks for the feedback,
Ben
--
Ben Greear <greearb@candelatech.com> <Ben_Greear AT excite.com>
President of Candela Technologies Inc http://www.candelatech.com
ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear