[linux-next patch] RDMA/srp: add module parameter 'has_max_it_iu_size'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Honggang Li <honli@xxxxxxxxxx>

commit 882981f4a411 ("RDMA/srp: Add support for immediate data")
commit 547ed331bbe8 ("RDMA/srp: Add parse function for maximum
initiator to target IU size")

The use_imm_data kernel module parameter was introduced in kernel
v5.0 (882981f4a411). The max_it_iu_size will be introduced in kernel
v5.5 (547ed331bbe8).

We need the 'max_it_iu_size' for old SRPT, which does not support
immediate data.

The ib_srp module will emit a warning message of unknown parameter,
if we blindly append the 'max_it_iu_size' at the very end of login
string for kernel before 547ed331bbe8.

With this flag, srp_daemon will know the 'max_it_iu_size' login option
is available or not, by checking the file [1].

[1] /sys/module/ib_srp/parameters/has_max_it_iu_size

Signed-off-by: Honggang Li <honli@xxxxxxxxxx>
---
 drivers/infiniband/ulp/srp/ib_srp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index b7f7a5f7bd98..96434f743a91 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -74,6 +74,7 @@ static bool allow_ext_sg;
 static bool prefer_fr = true;
 static bool register_always = true;
 static bool never_register;
+static bool has_max_it_iu_size = true;
 static int topspin_workarounds = 1;
 
 module_param(srp_sg_tablesize, uint, 0444);
@@ -103,6 +104,10 @@ module_param(register_always, bool, 0444);
 MODULE_PARM_DESC(register_always,
 		 "Use memory registration even for contiguous memory regions");
 
+module_param(has_max_it_iu_size, bool, 0444);
+MODULE_PARM_DESC(has_max_it_iu_size,
+		  "Indicate the module supports max_it_iu_size login parameter");
+
 module_param(never_register, bool, 0444);
 MODULE_PARM_DESC(never_register, "Never register memory");
 
-- 
2.21.0





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux