[PATCH for-next 0/3] RDMA: Provide an API for drivers to disassociate mmap pages

Junxian Huang posted 3 patches 1 month, 1 week ago
There is a newer version of this series
drivers/infiniband/core/ib_core_uverbs.c    | 85 +++++++++++++++++++++
drivers/infiniband/core/rdma_core.h         |  1 -
drivers/infiniband/core/uverbs_main.c       | 64 ----------------
drivers/infiniband/hw/hns/hns_roce_device.h |  4 +
drivers/infiniband/hw/hns/hns_roce_hw_v2.c  | 15 ++++
drivers/infiniband/hw/hns/hns_roce_main.c   | 13 ++++
include/rdma/ib_verbs.h                     |  3 +
7 files changed, 120 insertions(+), 65 deletions(-)
[PATCH for-next 0/3] RDMA: Provide an API for drivers to disassociate mmap pages
Posted by Junxian Huang 1 month, 1 week ago
Provide an API rdma_user_mmap_disassociate() for drivers to disassociate
mmap pages. Use this API in hns to prevent userspace from ringing doorbell
when HW is reset.

Chengchang Tang (3):
  RDMA/core: Provide rdma_user_mmap_disassociate() to disassociate mmap
    pages
  RDMA/hns: Link all uctx to uctx_list on a device
  RDMA/hns: Disassociate mmap pages for all uctx when HW is being reset

 drivers/infiniband/core/ib_core_uverbs.c    | 85 +++++++++++++++++++++
 drivers/infiniband/core/rdma_core.h         |  1 -
 drivers/infiniband/core/uverbs_main.c       | 64 ----------------
 drivers/infiniband/hw/hns/hns_roce_device.h |  4 +
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c  | 15 ++++
 drivers/infiniband/hw/hns/hns_roce_main.c   | 13 ++++
 include/rdma/ib_verbs.h                     |  3 +
 7 files changed, 120 insertions(+), 65 deletions(-)

--
2.33.0
Re: [PATCH for-next 0/3] RDMA: Provide an API for drivers to disassociate mmap pages
Posted by Leon Romanovsky 1 month ago
On Fri, 26 Jul 2024 15:19:07 +0800, Junxian Huang wrote:
> Provide an API rdma_user_mmap_disassociate() for drivers to disassociate
> mmap pages. Use this API in hns to prevent userspace from ringing doorbell
> when HW is reset.
> 
> Chengchang Tang (3):
>   RDMA/core: Provide rdma_user_mmap_disassociate() to disassociate mmap
>     pages
>   RDMA/hns: Link all uctx to uctx_list on a device
>   RDMA/hns: Disassociate mmap pages for all uctx when HW is being reset
> 
> [...]

Applied, thanks!

[1/3] RDMA/core: Provide rdma_user_mmap_disassociate() to disassociate mmap pages
      https://git.kernel.org/rdma/rdma/c/29df39ce0a64f0
[2/3] RDMA/hns: Link all uctx to uctx_list on a device
      https://git.kernel.org/rdma/rdma/c/bb5b2b25624fa9
[3/3] RDMA/hns: Disassociate mmap pages for all uctx when HW is being reset
      https://git.kernel.org/rdma/rdma/c/e60457876e3223

Best regards,
-- 
Leon Romanovsky <leon@kernel.org>
Re: [PATCH for-next 0/3] RDMA: Provide an API for drivers to disassociate mmap pages
Posted by Leon Romanovsky 3 weeks, 6 days ago
On Mon, Aug 05, 2024 at 02:00:36PM +0300, Leon Romanovsky wrote:
> 
> On Fri, 26 Jul 2024 15:19:07 +0800, Junxian Huang wrote:
> > Provide an API rdma_user_mmap_disassociate() for drivers to disassociate
> > mmap pages. Use this API in hns to prevent userspace from ringing doorbell
> > when HW is reset.
> > 
> > Chengchang Tang (3):
> >   RDMA/core: Provide rdma_user_mmap_disassociate() to disassociate mmap
> >     pages
> >   RDMA/hns: Link all uctx to uctx_list on a device
> >   RDMA/hns: Disassociate mmap pages for all uctx when HW is being reset
> > 
> > [...]
> 
> Applied, thanks!
> 
> [1/3] RDMA/core: Provide rdma_user_mmap_disassociate() to disassociate mmap pages
>       https://git.kernel.org/rdma/rdma/c/29df39ce0a64f0

Junxian, sorry but I had to drop this series from my wip branch,

The more kbuilds reports I got the more I realized that this series
needs more work.

My main concern is that in first patch, you put uverbs_user_mmap_disassociate() function in
ib_core_verbs.c, which is not the right place for it. This function should stay in uverbs_main.c
which is protected by right "depends on" in Kconfig.

Please fix this and resend the series.

Thanks

> [2/3] RDMA/hns: Link all uctx to uctx_list on a device
>       https://git.kernel.org/rdma/rdma/c/bb5b2b25624fa9
> [3/3] RDMA/hns: Disassociate mmap pages for all uctx when HW is being reset
>       https://git.kernel.org/rdma/rdma/c/e60457876e3223
> 
> Best regards,
> -- 
> Leon Romanovsky <leon@kernel.org>
>