From: Jinpu Wang <jinpu.wang@ionos.com>
To: Guoqing Jiang <guoqing.jiang@linux.dev>
Cc: haris.iqbal@ionos.com, jgg@ziepe.ca, leon@kernel.org,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH 3/8] RDMA/rtrs-srv: Correct the checking of ib_map_mr_sg
Date: Thu, 17 Nov 2022 06:55:59 +0100 [thread overview]
Message-ID: <CAMGffEnSWffmPVzMkKx02s30-odEmqGPeUc2YYapAxAP+T21FQ@mail.gmail.com> (raw)
In-Reply-To: <20221116111400.7203-4-guoqing.jiang@linux.dev>
On Wed, Nov 16, 2022 at 12:14 PM Guoqing Jiang <guoqing.jiang@linux.dev> wrote:
>
> We should check with nr_sgt, also the only successful case is that
> all sg elements are mapped, so make it explict.
typo, s/explicit/explicitly.
>
> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
> ---
> drivers/infiniband/ulp/rtrs/rtrs-srv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/ulp/rtrs/rtrs-srv.c b/drivers/infiniband/ulp/rtrs/rtrs-srv.c
> index b877dd57b6b9..581c850e71d6 100644
> --- a/drivers/infiniband/ulp/rtrs/rtrs-srv.c
> +++ b/drivers/infiniband/ulp/rtrs/rtrs-srv.c
> @@ -622,7 +622,7 @@ static int map_cont_bufs(struct rtrs_srv_path *srv_path)
> }
> nr = ib_map_mr_sg(mr, sgt->sgl, nr_sgt,
> NULL, max_chunk_size);
> - if (nr < 0 || nr < sgt->nents) {
> + if (nr != nr_sgt) {
> err = nr < 0 ? nr : -EINVAL;
> goto dereg_mr;
> }
> --
> 2.31.1
>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
next prev parent reply other threads:[~2022-11-17 5:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 11:13 [PATCH 0/8] Misc patches for rtrs Guoqing Jiang
2022-11-16 11:13 ` [PATCH 1/8] RDMA/rtrs-srv: Refactor rtrs_srv_rdma_cm_handler Guoqing Jiang
2022-11-17 5:52 ` Jinpu Wang
2022-11-17 7:11 ` Guoqing Jiang
2022-11-16 11:13 ` [PATCH 2/8] RDMA/rtrs-srv: Refactor the handling of failure case in map_cont_bufs Guoqing Jiang
2022-11-16 11:13 ` [PATCH 3/8] RDMA/rtrs-srv: Correct the checking of ib_map_mr_sg Guoqing Jiang
2022-11-17 5:55 ` Jinpu Wang [this message]
2022-11-16 11:13 ` [PATCH 4/8] RDMA/rtrs-clt: " Guoqing Jiang
2022-11-17 5:56 ` Jinpu Wang
2022-11-16 11:13 ` [PATCH 5/8] RDMA/rtrs-srv: Remove outdated comments from create_con Guoqing Jiang
2022-11-16 11:13 ` [PATCH 6/8] RDMA/rtrs: Clean up rtrs_rdma_dev_pd_ops Guoqing Jiang
2022-11-16 11:13 ` [PATCH 7/8] RDMA/rtrs-srv: Fix several issues in rtrs_srv_destroy_path_files Guoqing Jiang
2022-11-16 11:14 ` [PATCH 8/8] RDMA/rtrs-srv: Remove kobject_del from rtrs_srv_destroy_once_sysfs_root_folders Guoqing Jiang
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=CAMGffEnSWffmPVzMkKx02s30-odEmqGPeUc2YYapAxAP+T21FQ@mail.gmail.com \
--to=jinpu.wang@ionos.com \
--cc=guoqing.jiang@linux.dev \
--cc=haris.iqbal@ionos.com \
--cc=jgg@ziepe.ca \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox