All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: Jack Wang <jinpu.wang@ionos.com>, linux-rdma@vger.kernel.org
Cc: bvanassche@acm.org, leon@kernel.org, dledford@redhat.com,
	jgg@ziepe.ca, haris.iqbal@ionos.com
Subject: Re: [PATCH] RDMA/rtrs-clt: Fix the initial value of min_latency
Date: Wed, 24 Nov 2021 16:56:31 +0800	[thread overview]
Message-ID: <d358046c-ce09-596a-6b6a-327e785b090d@linux.dev> (raw)
In-Reply-To: <20211124081040.19533-1-jinpu.wang@ionos.com>



On 11/24/21 4:10 PM, Jack Wang wrote:
> The type of min_latency is ktime_t, so use KTIME_MAX to initialize
> the initial value.
>
> Fixes: dc3b66a0ce70 ("RDMA/rtrs-clt: Add a minimum latency multipath policy")
> Signed-off-by: Jack Wang<jinpu.wang@ionos.com>
> ---
>   drivers/infiniband/ulp/rtrs/rtrs-clt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
> index 15c0077dd27e..e39709dee179 100644
> --- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c
> +++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
> @@ -867,7 +867,7 @@ static struct rtrs_clt_sess *get_next_path_min_latency(struct path_it *it)
>   	struct rtrs_clt_sess *min_path = NULL;
>   	struct rtrs_clt *clt = it->clt;
>   	struct rtrs_clt_sess *sess;
> -	ktime_t min_latency = INT_MAX;
> +	ktime_t min_latency = KTIME_MAX;
>   	ktime_t latency;
>   
>   	list_for_each_entry_rcu(sess, &clt->paths_list, s.entry) {

LGTM.

Reviewed-by: Guoqing Jiang <Guoqing.Jiang@linux.dev>

Thanks,
Guoqing

  reply	other threads:[~2021-11-24  8:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24  8:10 [PATCH] RDMA/rtrs-clt: Fix the initial value of min_latency Jack Wang
2021-11-24  8:56 ` Guoqing Jiang [this message]
2021-11-24  9:05   ` Jinpu Wang
2021-11-25 17:37 ` Jason Gunthorpe

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=d358046c-ce09-596a-6b6a-327e785b090d@linux.dev \
    --to=guoqing.jiang@linux.dev \
    --cc=bvanassche@acm.org \
    --cc=dledford@redhat.com \
    --cc=haris.iqbal@ionos.com \
    --cc=jgg@ziepe.ca \
    --cc=jinpu.wang@ionos.com \
    --cc=leon@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.