All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Barry Song <21cnbao@gmail.com>
Cc: liangwenpeng@huawei.com, leon@kernel.org,
	linux-rdma@vger.kernel.org, linuxarm@huawei.com
Subject: Re: [PATCH v5 for-next 1/1] RDMA/hns: Support direct wqe of userspace'
Date: Mon, 6 Dec 2021 11:30:24 -0400	[thread overview]
Message-ID: <20211206153024.GG4670@nvidia.com> (raw)
In-Reply-To: <20211203101855.12598-1-21cnbao@gmail.com>

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

      parent reply	other threads:[~2021-12-06 15:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 13:57 [PATCH v5 for-next 0/1] RDMA/hns: Support direct WQE of userspace Wenpeng Liang
2021-11-30 13:57 ` [PATCH v5 for-next 1/1] RDMA/hns: Support direct wqe " Wenpeng Liang
2021-12-01  9:01   ` Leon Romanovsky
2021-12-03 10:18   ` [PATCH v5 for-next 1/1] RDMA/hns: Support direct wqe of userspace' Barry Song
2021-12-06 13:34     ` Wenpeng Liang
2021-12-06 15:30     ` Jason Gunthorpe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211206153024.GG4670@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=21cnbao@gmail.com \
    --cc=leon@kernel.org \
    --cc=liangwenpeng@huawei.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.