mbox series

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

Message ID 20240726071910.626802-1-huangjunxian6@hisilicon.com (mailing list archive)
Headers show
Series RDMA: Provide an API for drivers to disassociate mmap pages | expand

Message

Junxian Huang July 26, 2024, 7:19 a.m. UTC
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

Comments

Leon Romanovsky Aug. 5, 2024, 11 a.m. UTC | #1
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 Aug. 11, 2024, 8:18 a.m. UTC | #2
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>
>