aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rdma/hfi1/init.c
diff options
context:
space:
mode:
authorSebastian Sanchez <sebastian.sanchez@intel.com>2015-12-11 08:44:48 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-21 14:00:17 -0800
commit2ce6bf2292742e0a4e71f08717ce314ce6332151 (patch)
tree38ffdcfaa9b1b344b566f37173402dcc1dafa14c /drivers/staging/rdma/hfi1/init.c
parentstaging/rdma/hfi1: Fix for module parameter hdrq_entsize when it's 0 (diff)
downloadlinux-dev-2ce6bf2292742e0a4e71f08717ce314ce6332151.tar.xz
linux-dev-2ce6bf2292742e0a4e71f08717ce314ce6332151.zip
staging/rdma/hfi1: Change num_rcv_contexts to num_user_contexts and its meaning
num_rcv_contexts sets the number of user contexts, both receive and send. Renaming it to num_user_contexts makes sense to reflect its true meaning. When num_rcv_contexts is 0, the default behavior is the number of CPU cores instead of 0 contexts. This commit changes the variable num_rcv_contexts to num_user_contexts, and it also makes any negative value for this variable default to the number of CPU cores, so if num_user_contexts is set >= 0, the value will number of contexts. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rdma/hfi1/init.c')
-rw-r--r--drivers/staging/rdma/hfi1/init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/rdma/hfi1/init.c b/drivers/staging/rdma/hfi1/init.c
index 467ff26bcab0..7ad9eb182514 100644
--- a/drivers/staging/rdma/hfi1/init.c
+++ b/drivers/staging/rdma/hfi1/init.c
@@ -82,10 +82,10 @@
* Number of user receive contexts we are configured to use (to allow for more
* pio buffers per ctxt, etc.) Zero means use one user context per CPU.
*/
-uint num_rcv_contexts;
-module_param_named(num_rcv_contexts, num_rcv_contexts, uint, S_IRUGO);
+int num_user_contexts = -1;
+module_param_named(num_user_contexts, num_user_contexts, uint, S_IRUGO);
MODULE_PARM_DESC(
- num_rcv_contexts, "Set max number of user receive contexts to use");
+ num_user_contexts, "Set max number of user contexts to use");
u8 krcvqs[RXE_NUM_DATA_VL];
int krcvqsset;