Re: [PATCH v5 for-next 1/1] RDMA/hns: Support direct wqe of userspace'

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

 



On Fri, Dec 03, 2021 at 06:18:55PM +0800, Barry Song wrote:
> > +	switch (entry->mmap_type) {
> > +	case HNS_ROCE_MMAP_TYPE_DB:
> > +		prot = pgprot_noncached(vma->vm_page_prot);
> > +		break;
> > +	case HNS_ROCE_MMAP_TYPE_TPTR:
> > +		prot = vma->vm_page_prot;
> > +		break;
> > +	/*
> > +	 * The BAR region of direct WQE supports Early Write Ack,
> > +	 * so pgprot_device is used to improve performance.
> > +	 */
> > +	case HNS_ROCE_MMAP_TYPE_DWQE:
> > +		prot = pgprot_device(vma->vm_page_prot);
> > +		break;
> > +	default:
> > +		return -EINVAL;
> > +	}
> 
> i am still not convinced why HNS_ROCE_MMAP_TYPE_DB needs nocache and
> HNS_ROCE_MMAP_TYPE_DWQE needs device. generally people use ioremap()
> to map pci bar spaces in pci device drivers, and ioremap() is pretty
> much nGnRE:

Me too, please confirm with your HW that the device really cannot
handle device for the DB, and it is better to put the comment on the
noncached case as that is the obnormal thing here.

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