[ofa-general][PATCH 4/12 v2] mlx4: Pre reserved Qp regions

Roland Dreier rdreier at cisco.com
Fri Jun 6 14:40:27 PDT 2008


 > +int mlx4_bitmap_init_with_effective_max(struct mlx4_bitmap *bitmap,
 > +					u32 num, u32 mask, u32 reserved,
 > +					u32 effective_max)

I don't really understand what effective_max is buying you here... it
seems that the caller could just reduce the real max and get the same
effect without tracking two different values?

It's hard to say without seeing the ethernet code, but would it make
more sense to add support to the allocator to allocate from multiple
regions?

 > +static int num_mac = 1;
 > +module_param_named(num_mac, num_mac, int, 0444);
 > +MODULE_PARM_DESC(num_mac, "Maximum number of MACs per ETH port "
 > +		  "(1-127, default 1)");
 > +
 > +static int num_vlan;
 > +module_param_named(num_vlan, num_vlan, int, 0444);
 > +MODULE_PARM_DESC(num_vlan, "Maximum number of VLANs per ETH port "
 > +		  "(0-126, default 0)");

Jack is pushing to make these types of module parameters specified using
log2 of the value instead of the absolute value -- seems you guys should
agree on the interface you want to use.



More information about the general mailing list