Issue 31158.
If we set the number of MTTs automatically by the driver (default
value or auto-detection, by the memory size in the machine), need
to set the used value of the MTTs, so the user will see this value.
Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
(Ported from Mellanox OFED 2.4)
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
log_mtts_per_seg),
(si.totalram << 1)
>> log_mtts_per_seg)));
+ /* set the actual value, so it will be reflected to the user
+ using the sysfs */
+ mod_param_profile.num_mtt = ilog2(profile->num_mtt * (1 << log_mtts_per_seg));
}
}