From: Simon Horman <horms@kernel.org>
To: longli@linuxonhyperv.com
Cc: Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
Ajay Sharma <sharmaajay@microsoft.com>,
Konstantin Taranov <kotaranov@microsoft.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-rdma@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Long Li <longli@microsoft.com>,
stable@vger.kernel.org
Subject: Re: [PATCH net] RDMA/mana_ib: use the correct page size for mapping user-mode doorbell page
Date: Thu, 29 Aug 2024 14:53:58 +0100 [thread overview]
Message-ID: <20240829135358.GA2923441@kernel.org> (raw)
In-Reply-To: <1724875569-12912-2-git-send-email-longli@linuxonhyperv.com>
On Wed, Aug 28, 2024 at 01:06:09PM -0700, longli@linuxonhyperv.com wrote:
> From: Long Li <longli@microsoft.com>
>
> When mapping doorbell page from user-mode, the driver should use the system
> page size as the doorbell is allocated via mmap() from user-mode.
>
> Cc: stable@vger.kernel.org
> Fixes: 0266a177631d ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter")
> Signed-off-by: Long Li <longli@microsoft.com>
> ---
> drivers/infiniband/hw/mana/main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/hw/mana/main.c b/drivers/infiniband/hw/mana/main.c
> index f68f54aea820..b26c4ebec2e0 100644
> --- a/drivers/infiniband/hw/mana/main.c
> +++ b/drivers/infiniband/hw/mana/main.c
> @@ -511,13 +511,13 @@ int mana_ib_mmap(struct ib_ucontext *ibcontext, struct vm_area_struct *vma)
> PAGE_SHIFT;
> prot = pgprot_writecombine(vma->vm_page_prot);
>
> - ret = rdma_user_mmap_io(ibcontext, vma, pfn, gc->db_page_size, prot,
> + ret = rdma_user_mmap_io(ibcontext, vma, pfn, PAGE_SIZE, prot,
> NULL);
> if (ret)
> ibdev_dbg(ibdev, "can't rdma_user_mmap_io ret %d\n", ret);
> else
> ibdev_dbg(ibdev, "mapped I/O pfn 0x%llx page_size %u, ret %d\n",
> - pfn, gc->db_page_size, ret);
> + pfn, PAGE_SIZE, ret);
This is not a full review, but according to both clang-18 and gcc-14,
this patch should also update the format specifier from %u to %lu.
>
> return ret;
> }
> --
> 2.17.1
>
>
next prev parent reply other threads:[~2024-08-29 13:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 20:06 [PATCH net] RDMA/mana_ib: fix a bug in calculating the wrong page table index when 64kb page table is used longli
2024-08-28 20:06 ` [PATCH net] RDMA/mana_ib: use the correct page size for mapping user-mode doorbell page longli
2024-08-29 13:53 ` Simon Horman [this message]
2024-08-30 0:54 ` Long Li
2024-08-29 10:24 ` [PATCH net] RDMA/mana_ib: fix a bug in calculating the wrong page table index when 64kb page table is used Leon Romanovsky
2024-08-30 0:56 ` Long Li
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=20240829135358.GA2923441@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jgg@ziepe.ca \
--cc=kotaranov@microsoft.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=longli@linuxonhyperv.com \
--cc=longli@microsoft.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sharmaajay@microsoft.com \
--cc=stable@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.