diff options
author | Mike Marciniszyn <mike.marciniszyn@qlogic.com> | 2011-01-10 20:42:19 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2011-01-10 20:42:19 -0500 |
commit | 0a43e117221702b08a023d6aa1a31ac30e40866b (patch) | |
tree | e5977969e7035117ec6c19fac4adfcf69a2ff675 /drivers/infiniband | |
parent | 9d5b243f24212966d6d06058f96b2b1a22482f59 (diff) |
IB/qib: Add receive header queue size module parameters
The receive header queue sizes need to modified for performance
tuning. Three module parameters are added to support this.
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_iba7322.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c index 9031cd82e879..b35676f44373 100644 --- a/drivers/infiniband/hw/qib/qib_iba7322.c +++ b/drivers/infiniband/hw/qib/qib_iba7322.c | |||
@@ -111,6 +111,21 @@ static ushort qib_singleport; | |||
111 | module_param_named(singleport, qib_singleport, ushort, S_IRUGO); | 111 | module_param_named(singleport, qib_singleport, ushort, S_IRUGO); |
112 | MODULE_PARM_DESC(singleport, "Use only IB port 1; more per-port buffer space"); | 112 | MODULE_PARM_DESC(singleport, "Use only IB port 1; more per-port buffer space"); |
113 | 113 | ||
114 | /* | ||
115 | * Receive header queue sizes | ||
116 | */ | ||
117 | static unsigned qib_rcvhdrcnt; | ||
118 | module_param_named(rcvhdrcnt, qib_rcvhdrcnt, uint, S_IRUGO); | ||
119 | MODULE_PARM_DESC(rcvhdrcnt, "receive header count"); | ||
120 | |||
121 | static unsigned qib_rcvhdrsize; | ||
122 | module_param_named(rcvhdrsize, qib_rcvhdrsize, uint, S_IRUGO); | ||
123 | MODULE_PARM_DESC(rcvhdrsize, "receive header size in 32-bit words"); | ||
124 | |||
125 | static unsigned qib_rcvhdrentsize; | ||
126 | module_param_named(rcvhdrentsize, qib_rcvhdrentsize, uint, S_IRUGO); | ||
127 | MODULE_PARM_DESC(rcvhdrentsize, "receive header entry size in 32-bit words"); | ||
128 | |||
114 | #define MAX_ATTEN_LEN 64 /* plenty for any real system */ | 129 | #define MAX_ATTEN_LEN 64 /* plenty for any real system */ |
115 | /* for read back, default index is ~5m copper cable */ | 130 | /* for read back, default index is ~5m copper cable */ |
116 | static char txselect_list[MAX_ATTEN_LEN] = "10"; | 131 | static char txselect_list[MAX_ATTEN_LEN] = "10"; |
@@ -3530,8 +3545,11 @@ static void qib_7322_config_ctxts(struct qib_devdata *dd) | |||
3530 | 3545 | ||
3531 | /* kr_rcvegrcnt changes based on the number of contexts enabled */ | 3546 | /* kr_rcvegrcnt changes based on the number of contexts enabled */ |
3532 | dd->cspec->rcvegrcnt = qib_read_kreg32(dd, kr_rcvegrcnt); | 3547 | dd->cspec->rcvegrcnt = qib_read_kreg32(dd, kr_rcvegrcnt); |
3533 | dd->rcvhdrcnt = max(dd->cspec->rcvegrcnt, | 3548 | if (qib_rcvhdrcnt) |
3534 | dd->num_pports > 1 ? 1024U : 2048U); | 3549 | dd->rcvhdrcnt = max(dd->cspec->rcvegrcnt, qib_rcvhdrcnt); |
3550 | else | ||
3551 | dd->rcvhdrcnt = max(dd->cspec->rcvegrcnt, | ||
3552 | dd->num_pports > 1 ? 1024U : 2048U); | ||
3535 | } | 3553 | } |
3536 | 3554 | ||
3537 | static int qib_7322_get_ib_cfg(struct qib_pportdata *ppd, int which) | 3555 | static int qib_7322_get_ib_cfg(struct qib_pportdata *ppd, int which) |
@@ -6097,8 +6115,10 @@ static int qib_init_7322_variables(struct qib_devdata *dd) | |||
6097 | ppd++; | 6115 | ppd++; |
6098 | } | 6116 | } |
6099 | 6117 | ||
6100 | dd->rcvhdrentsize = QIB_RCVHDR_ENTSIZE; | 6118 | dd->rcvhdrentsize = qib_rcvhdrentsize ? |
6101 | dd->rcvhdrsize = QIB_DFLT_RCVHDRSIZE; | 6119 | qib_rcvhdrentsize : QIB_RCVHDR_ENTSIZE; |
6120 | dd->rcvhdrsize = qib_rcvhdrsize ? | ||
6121 | qib_rcvhdrsize : QIB_DFLT_RCVHDRSIZE; | ||
6102 | dd->rhf_offset = dd->rcvhdrentsize - sizeof(u64) / sizeof(u32); | 6122 | dd->rhf_offset = dd->rcvhdrentsize - sizeof(u64) / sizeof(u32); |
6103 | 6123 | ||
6104 | /* we always allocate at least 2048 bytes for eager buffers */ | 6124 | /* we always allocate at least 2048 bytes for eager buffers */ |