public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Zhu Yanjun <yanjun.zhu@linux.dev>
To: Li Zhijian <lizhijian@fujitsu.com>, linux-rdma@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, zyjzyj2000@gmail.com, jgg@ziepe.ca,
	leon@kernel.org
Subject: Re: [PATCH v2] RDMA/rxe: Remove unused page_offset member
Date: Thu, 15 Jan 2026 19:59:20 -0800	[thread overview]
Message-ID: <f4685558-4735-4e55-b05f-0c8b55580c17@linux.dev> (raw)
In-Reply-To: <20260116032833.2574627-1-lizhijian@fujitsu.com>


在 2026/1/15 19:28, Li Zhijian 写道:
> In rxe_map_mr_sg(), the `page_offset` member of the `rxe_mr` struct
> was initialized based on `ibmr.iova`, which will be updated inside
> ib_sg_to_pages() later.
>
> Consequently, the value assigned to `page_offset` was incorrect. However,
> since `page_offset` was never utilized throughout the code, it can be safely
> removed to clean up the codebase and avoid future confusion.
>
> Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>

Thanks a lot. I am fine with it.

Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>

Zhu Yanjun

> ---
> V2: make commit log more clear # Zhu
> ---
>   drivers/infiniband/sw/rxe/rxe_mr.c    | 1 -
>   drivers/infiniband/sw/rxe/rxe_odp.c   | 1 -
>   drivers/infiniband/sw/rxe/rxe_verbs.h | 1 -
>   3 files changed, 3 deletions(-)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
> index b1df05238848..05710d785a7e 100644
> --- a/drivers/infiniband/sw/rxe/rxe_mr.c
> +++ b/drivers/infiniband/sw/rxe/rxe_mr.c
> @@ -237,7 +237,6 @@ int rxe_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sgl,
>   	mr->nbuf = 0;
>   	mr->page_shift = ilog2(page_size);
>   	mr->page_mask = ~((u64)page_size - 1);
> -	mr->page_offset = mr->ibmr.iova & (page_size - 1);
>   
>   	return ib_sg_to_pages(ibmr, sgl, sg_nents, sg_offset, rxe_set_page);
>   }
> diff --git a/drivers/infiniband/sw/rxe/rxe_odp.c b/drivers/infiniband/sw/rxe/rxe_odp.c
> index c928cbf2e35f..d3a54bfaf92f 100644
> --- a/drivers/infiniband/sw/rxe/rxe_odp.c
> +++ b/drivers/infiniband/sw/rxe/rxe_odp.c
> @@ -110,7 +110,6 @@ int rxe_odp_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length,
>   	mr->access = access_flags;
>   	mr->ibmr.length = length;
>   	mr->ibmr.iova = iova;
> -	mr->page_offset = ib_umem_offset(&umem_odp->umem);
>   
>   	err = rxe_odp_init_pages(mr);
>   	if (err) {
> diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.h b/drivers/infiniband/sw/rxe/rxe_verbs.h
> index fd48075810dd..f94ce85eb807 100644
> --- a/drivers/infiniband/sw/rxe/rxe_verbs.h
> +++ b/drivers/infiniband/sw/rxe/rxe_verbs.h
> @@ -347,7 +347,6 @@ struct rxe_mr {
>   	int			access;
>   	atomic_t		num_mw;
>   
> -	unsigned int		page_offset;
>   	unsigned int		page_shift;
>   	u64			page_mask;
>   

-- 
Best Regards,
Yanjun.Zhu


  reply	other threads:[~2026-01-16  3:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-16  3:28 [PATCH v2] RDMA/rxe: Remove unused page_offset member Li Zhijian
2026-01-16  3:59 ` Zhu Yanjun [this message]
2026-01-18 16:46 ` Leon Romanovsky

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=f4685558-4735-4e55-b05f-0c8b55580c17@linux.dev \
    --to=yanjun.zhu@linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lizhijian@fujitsu.com \
    --cc=zyjzyj2000@gmail.com \
    /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