From: Leon Romanovsky <leon@kernel.org>
To: Md Haris Iqbal <haris.iqbal@ionos.com>
Cc: linux-rdma@vger.kernel.org, Jason Gunthorpe <jgg@ziepe.ca>,
Danil Kipnis <danil.kipnis1@ionos.com>,
Jack Wang <jinpu.wang@ionos.com>
Subject: Re: [PATCH 1/9] RDMA/rtrs-clt: Add mpath_policy module parameter
Date: Thu, 26 Nov 2026 13:59:41 +0200 [thread overview]
Message-ID: <20261126115941.GH774860@unreal> (raw)
In-Reply-To: <20261123143719.938876-2-haris.iqbal@ionos.com>
On Mon, Nov 23, 2026 at 03:37:11PM +0100, Md Haris Iqbal wrote:
> From: Danil Kipnis <danil.kipnis1@ionos.com>
>
> Add a module parameter to set the default multipath policy for newly
> created sessions. This simplifies configuration when all sessions should
> use the same policy, allowing administrators to set the default at module
> load time or boot time via kernel parameters.
>
> The parameter accepts numeric values 0-2:
> - 0: Round-robin (MP_POLICY_RR)
> - 1: Minimum inflight requests (MP_POLICY_MIN_INFLIGHT) - default
> - 2: Minimum latency (MP_POLICY_MIN_LATENCY)
>
> Invalid values are clamped to the valid range. The parameter is runtime
> adjustable via /sys/module/rtrs_client/parameters/mpath_policy, affecting
> only newly created sessions. Existing sessions retain their current policy.
>
> The per-session sysfs interface remains fully functional for session-
> specific overrides, maintaining backward compatibility.
Your AI tool merely restated what this patch implements and provided
general information about module parameters.
It does not explain why this parameter is needed, especially given that
IONOS is the only user of RTRS.
Thanks
>
> Signed-off-by: Danil Kipnis <danil.kipnis1@ionos.com>
> Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
> Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
> ---
> drivers/infiniband/ulp/rtrs/rtrs-clt.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
> index bf3a0377da3f..573beb5ccdf0 100644
> --- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c
> +++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
> @@ -39,6 +39,13 @@
> MODULE_DESCRIPTION("RDMA Transport Client");
> MODULE_LICENSE("GPL");
>
> +static int mpath_policy = MP_POLICY_MIN_INFLIGHT;
> +module_param_named(mpath_policy, mpath_policy, int, 0644);
> +MODULE_PARM_DESC(mpath_policy,
> + "Default multipath policy for new sessions (default: "
> + __stringify(MP_POLICY_MIN_INFLIGHT)
> + " (min-inflight), 0: round-robin, 1: min-inflight, 2: min-latency)");
> +
> static const struct rtrs_rdma_dev_pd_ops dev_pd_ops;
> static struct rtrs_rdma_dev_pd dev_pd = {
> .ops = &dev_pd_ops
> @@ -2758,7 +2765,7 @@ static struct rtrs_clt_sess *alloc_clt(const char *sessname, size_t paths_num,
> clt->max_reconnect_attempts = max_reconnect_attempts;
> clt->priv = priv;
> clt->link_ev = link_ev;
> - clt->mp_policy = MP_POLICY_MIN_INFLIGHT;
> + clt->mp_policy = mpath_policy;
> strscpy(clt->sessname, sessname, sizeof(clt->sessname));
> init_waitqueue_head(&clt->permits_wait);
> mutex_init(&clt->paths_ev_mutex);
> @@ -3220,6 +3227,10 @@ static int __init rtrs_client_init(void)
> int ret = 0;
>
> rtrs_rdma_dev_pd_init(0, &dev_pd);
> +
> + /* Validate and clamp mpath_policy to valid range */
> + mpath_policy = clamp(mpath_policy, MP_POLICY_RR, MP_POLICY_MIN_LATENCY);
> +
> ret = class_register(&rtrs_clt_dev_class);
> if (ret) {
> pr_err("Failed to create rtrs-client dev class\n");
> --
> 2.43.0
>
>
next prev parent reply other threads:[~2026-11-26 11:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 14:37 [PATCH 0/9] Misc patches for RTRS Md Haris Iqbal
2026-11-23 14:37 ` [PATCH 1/9] RDMA/rtrs-clt: Add mpath_policy module parameter Md Haris Iqbal
2026-11-23 14:44 ` sashiko-bot
2026-11-26 11:59 ` Leon Romanovsky [this message]
2026-11-23 14:37 ` [PATCH 2/9] RDMA/rtrs-clt: Fix refcount imbalance in rtrs_clt_write_req error path Md Haris Iqbal
2026-11-23 14:37 ` [PATCH 3/9] RDMA/rtrs-clt: Trigger error recovery when posting LOCAL_INV fails Md Haris Iqbal
2026-11-23 15:02 ` sashiko-bot
2026-11-24 14:44 ` Haris Iqbal
2026-11-23 14:37 ` [PATCH 4/9] RDMA/rtrs-srv: Fix processing messages for Big-Endian archs Md Haris Iqbal
2026-11-23 14:37 ` [PATCH 5/9] RDMA/rtrs-clt: rename pathname parameter to sessname in rtrs_clt_open() Md Haris Iqbal
2026-11-23 14:42 ` sashiko-bot
2026-11-24 15:03 ` Haris Iqbal
2026-11-23 14:37 ` [PATCH 6/9] RDMA/rtrs-clt: Fix reconnect jitter being applied in milliseconds Md Haris Iqbal
2026-11-23 14:37 ` [PATCH 7/9] RDMA/rtrs-clt: Back off the reconnect delay exponentially Md Haris Iqbal
2026-11-26 12:03 ` Leon Romanovsky
2026-11-23 14:37 ` [PATCH 8/9] RDMA/rtrs-srv: Snapshot the READ request header instead of reusing it Md Haris Iqbal
2026-11-23 14:37 ` [PATCH 9/9] RDMA/rtrs-clt: Close all paths before freeing any in rtrs_clt_close() Md Haris Iqbal
2026-11-26 12:04 ` Leon Romanovsky
2026-11-23 15:02 ` [PATCH 0/9] Misc patches for RTRS sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261126115941.GH774860@unreal \
--to=leon@kernel.org \
--cc=danil.kipnis1@ionos.com \
--cc=haris.iqbal@ionos.com \
--cc=jgg@ziepe.ca \
--cc=jinpu.wang@ionos.com \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox