Thread (22 messages) 22 messages, 2 authors, 2021-08-22

Re: [PATCH v4 for-next 09/12] RDMA/hns: Add a shared memory to sync DCA status

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2021-08-19 23:43:39

On Thu, Jul 29, 2021 at 10:19:20AM +0800, Wenpeng Liang wrote:
+static int hns_roce_mmap(struct ib_ucontext *uctx, struct vm_area_struct *vma)
+{
+	switch (hns_roce_mmap_get_command(vma->vm_pgoff)) {
+	case HNS_ROCE_MMAP_REGULAR_PAGE:
+		return mmap_uar(uctx, vma);
+	case HNS_ROCE_MMAP_DCA_PAGE:
+		return mmap_dca(uctx, vma);
+	default:
+		return -EINVAL;
+	}
+}
New code should not copy the vm_pgoff stuff from old mlx5.

New code needs to use the mmap infrastructure and new APIs with proper
mmap cookies for the things it is exporting.

See the newer stuff added to mlx5, the efa driver, etc.

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help