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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux