* [linux-next patch] RDMA/srp: add module parameter 'has_max_it_iu_size'
@ 2019-10-25 13:23 Honggang LI
2019-10-26 2:10 ` Bart Van Assche
0 siblings, 1 reply; 3+ messages in thread
From: Honggang LI @ 2019-10-25 13:23 UTC (permalink / raw)
To: bvanassche, dledford, jgg; +Cc: linux-rdma, Honggang Li
From: Honggang Li <honli@redhat.com>
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@redhat.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [linux-next patch] RDMA/srp: add module parameter 'has_max_it_iu_size'
2019-10-25 13:23 [linux-next patch] RDMA/srp: add module parameter 'has_max_it_iu_size' Honggang LI
@ 2019-10-26 2:10 ` Bart Van Assche
2019-10-29 6:47 ` Honggang LI
0 siblings, 1 reply; 3+ messages in thread
From: Bart Van Assche @ 2019-10-26 2:10 UTC (permalink / raw)
To: Honggang LI, dledford, jgg; +Cc: linux-rdma
On 2019-10-25 06:23, Honggang LI wrote:
> +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");
Since the approach of this patch requires to add one new kernel
parameter every time a new login parameter is added, I don't think this
approach is future-proof. Has it been considered to export a list of all
supported login parameters to user space?
Thanks,
Bart.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-next patch] RDMA/srp: add module parameter 'has_max_it_iu_size'
2019-10-26 2:10 ` Bart Van Assche
@ 2019-10-29 6:47 ` Honggang LI
0 siblings, 0 replies; 3+ messages in thread
From: Honggang LI @ 2019-10-29 6:47 UTC (permalink / raw)
To: Bart Van Assche; +Cc: dledford, jgg, linux-rdma
On Fri, Oct 25, 2019 at 07:10:44PM -0700, Bart Van Assche wrote:
> On 2019-10-25 06:23, Honggang LI wrote:
> > +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");
>
> Since the approach of this patch requires to add one new kernel
> parameter every time a new login parameter is added, I don't think this
> approach is future-proof. Has it been considered to export a list of all
> supported login parameters to user space?
ok, I will drop this patch and usespace v2 srp_daemon patch.
thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-29 6:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-25 13:23 [linux-next patch] RDMA/srp: add module parameter 'has_max_it_iu_size' Honggang LI
2019-10-26 2:10 ` Bart Van Assche
2019-10-29 6:47 ` Honggang LI
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).