aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorMike Marciniszyn <mike.marciniszyn@qlogic.com>2011-01-10 20:42:19 -0500
committerRoland Dreier <rolandd@cisco.com>2011-01-10 20:42:19 -0500
commit0a43e117221702b08a023d6aa1a31ac30e40866b (patch)
treee5977969e7035117ec6c19fac4adfcf69a2ff675 /drivers/infiniband
parent9d5b243f24212966d6d06058f96b2b1a22482f59 (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.c28
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;
111module_param_named(singleport, qib_singleport, ushort, S_IRUGO); 111module_param_named(singleport, qib_singleport, ushort, S_IRUGO);
112MODULE_PARM_DESC(singleport, "Use only IB port 1; more per-port buffer space"); 112MODULE_PARM_DESC(singleport, "Use only IB port 1; more per-port buffer space");
113 113
114/*
115 * Receive header queue sizes
116 */
117static unsigned qib_rcvhdrcnt;
118module_param_named(rcvhdrcnt, qib_rcvhdrcnt, uint, S_IRUGO);
119MODULE_PARM_DESC(rcvhdrcnt, "receive header count");
120
121static unsigned qib_rcvhdrsize;
122module_param_named(rcvhdrsize, qib_rcvhdrsize, uint, S_IRUGO);
123MODULE_PARM_DESC(rcvhdrsize, "receive header size in 32-bit words");
124
125static unsigned qib_rcvhdrentsize;
126module_param_named(rcvhdrentsize, qib_rcvhdrentsize, uint, S_IRUGO);
127MODULE_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 */
116static char txselect_list[MAX_ATTEN_LEN] = "10"; 131static 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
3537static int qib_7322_get_ib_cfg(struct qib_pportdata *ppd, int which) 3555static 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 */