IB/hfi1: Adjust default MTU to be 10KB
Increasing the default MTU size to 10KB improves performance for PSM. Change the default MTU to 10KB but constrain Verbs MTU to 8KB. Also update default MTU module parameter description to be HFI1_DEFAULT_MAX_MTU. Reviewed-by: Dean Luick <dean.luick@intel.com> Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Jubin John <jubin.john@intel.com> Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
60d585ad6e
commit
ef699e849c
@ -75,7 +75,8 @@ DEFINE_MUTEX(hfi1_mutex); /* general driver use */
|
||||
|
||||
unsigned int hfi1_max_mtu = HFI1_DEFAULT_MAX_MTU;
|
||||
module_param_named(max_mtu, hfi1_max_mtu, uint, S_IRUGO);
|
||||
MODULE_PARM_DESC(max_mtu, "Set max MTU bytes, default is 8192");
|
||||
MODULE_PARM_DESC(max_mtu, "Set max MTU bytes, default is " __stringify(
|
||||
HFI1_DEFAULT_MAX_MTU));
|
||||
|
||||
unsigned int hfi1_cu = 1;
|
||||
module_param_named(cu, hfi1_cu, uint, S_IRUGO);
|
||||
|
@ -455,9 +455,9 @@ struct rvt_sge_state;
|
||||
#define HLS_UP (HLS_UP_INIT | HLS_UP_ARMED | HLS_UP_ACTIVE)
|
||||
|
||||
/* use this MTU size if none other is given */
|
||||
#define HFI1_DEFAULT_ACTIVE_MTU 8192
|
||||
#define HFI1_DEFAULT_ACTIVE_MTU 10240
|
||||
/* use this MTU size as the default maximum */
|
||||
#define HFI1_DEFAULT_MAX_MTU 8192
|
||||
#define HFI1_DEFAULT_MAX_MTU 10240
|
||||
/* default partition key */
|
||||
#define DEFAULT_PKEY 0xffff
|
||||
|
||||
|
@ -167,8 +167,12 @@ static inline int opa_mtu_enum_to_int(int mtu)
|
||||
*/
|
||||
static inline int verbs_mtu_enum_to_int(struct ib_device *dev, enum ib_mtu mtu)
|
||||
{
|
||||
int val = opa_mtu_enum_to_int((int)mtu);
|
||||
int val;
|
||||
|
||||
/* Constraining 10KB packets to 8KB packets */
|
||||
if (mtu == (enum ib_mtu)OPA_MTU_10240)
|
||||
mtu = OPA_MTU_8192;
|
||||
val = opa_mtu_enum_to_int((int)mtu);
|
||||
if (val > 0)
|
||||
return val;
|
||||
return ib_mtu_enum_to_int(mtu);
|
||||
|
Loading…
Reference in New Issue
Block a user