public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Ariel Elior <aelior@marvell.com>,
	Anna Schumaker <anna@kernel.org>, Jens Axboe <axboe@fb.com>,
	Christian Benvenuti <benve@cisco.com>,
	Potnuri Bharat Teja <bharat@chelsio.com>,
	Bernard Metzler <bmt@zurich.ibm.com>,
	Bart Van Assche <bvanassche@acm.org>,
	Chuck Lever <chuck.lever@oracle.com>,
	"David S. Miller" <davem@davemloft.net>,
	Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>,
	Keith Busch <kbusch@kernel.org>,
	Chaitanya Kulkarni <kch@nvidia.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Leon Romanovsky <leon@kernel.org>,
	linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org,
	linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org,
	Max Gurtovoy <mgurtovoy@nvidia.com>,
	Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>,
	Michal Kalderon <mkalderon@marvell.com>,
	Mustafa Ismail <mustafa.ismail@intel.com>,
	Nelson Escobar <neescoba@cisco.com>,
	netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
	rds-devel@oss.oracle.com, Sagi Grimberg <sagi@grimberg.me>,
	samba-technical@lists.samba.org,
	Santosh Shilimkar <santosh.shilimkar@oracle.com>,
	Selvin Xavier <selvin.xavier@broadcom.com>,
	Steve French <sfrench@samba.org>,
	Shiraz Saleem <shiraz.saleem@intel.com>,
	target-devel@vger.kernel.org,
	Trond Myklebust <trond.myklebust@hammerspace.com>,
	Yishai Hadas <yishaih@nvidia.com>,
	Zhu Yanjun <zyjzyj2000@gmail.com>,
	Xiao Yang <yangx.jy@fujitsu.com>
Subject: Re: [PATCH] RDMA: Split kernel-only global device caps from uvers device caps
Date: Tue, 5 Apr 2022 20:37:25 -0300	[thread overview]
Message-ID: <20220405233725.GY2120790@nvidia.com> (raw)
In-Reply-To: <20220405044331.GA22322@lst.de>

On Tue, Apr 05, 2022 at 06:43:31AM +0200, Christoph Hellwig wrote:

> > -	if (!(device->attrs.device_cap_flags & IB_DEVICE_ALLOW_USER_UNREG)) {
> > +	if (!(device->attrs.kernel_cap_flags & IB_KDEVICE_ALLOW_USER_UNREG)) {
> 
> Maybe shorten the prefix to IBD_ ?

Sure
 
> > +enum ib_kernel_cap_flags {
> > +	/*
> > +	 * This device supports a per-device lkey or stag that can be
> > +	 * used without performing a memory registration for the local
> > +	 * memory.  Note that ULPs should never check this flag, but
> > +	 * instead of use the local_dma_lkey flag in the ib_pd structure,
> > +	 * which will always contain a usable lkey.
> > +	 */
> > +	IB_KDEVICE_LOCAL_DMA_LKEY = 1 << 0,
> > +	IB_KDEVICE_UD_TSO = 1 << 1,
> > +	IB_KDEVICE_BLOCK_MULTICAST_LOOPBACK = 1 << 2,
> > +	IB_KDEVICE_INTEGRITY_HANDOVER = 1 << 3,
> > +	IB_KDEVICE_ON_DEMAND_PAGING = 1ULL << 4,
> > +	IB_KDEVICE_SG_GAPS_REG = 1ULL << 5,
> > +	IB_KDEVICE_VIRTUAL_FUNCTION = 1ULL << 6,
> > +	IB_KDEVICE_RDMA_NETDEV_OPA = 1ULL << 7,
> > +	IB_KDEVICE_ALLOW_USER_UNREG = 1ULL << 8,
> > +};
> 
> And maybe not in this patch, but if you touch this anyway please add
> comments to document allthe flags.

Wouldn't that be nice.. I know what some of these do at least and can
try

The 'ULL' should go away too..

Jason


  parent reply	other threads:[~2022-04-06  4:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 16:18 [PATCH] RDMA: Split kernel-only global device caps from uvers device caps Jason Gunthorpe
2022-04-05  4:43 ` Christoph Hellwig
2022-04-05  5:45   ` Leon Romanovsky
2022-04-05 23:37   ` Jason Gunthorpe [this message]
2022-04-06 17:30 ` Jeff Johnson

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=20220405233725.GY2120790@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=aelior@marvell.com \
    --cc=anna@kernel.org \
    --cc=axboe@fb.com \
    --cc=benve@cisco.com \
    --cc=bharat@chelsio.com \
    --cc=bmt@zurich.ibm.com \
    --cc=bvanassche@acm.org \
    --cc=chuck.lever@oracle.com \
    --cc=davem@davemloft.net \
    --cc=dennis.dalessandro@cornelisnetworks.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=kch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mgurtovoy@nvidia.com \
    --cc=mike.marciniszyn@cornelisnetworks.com \
    --cc=mkalderon@marvell.com \
    --cc=mustafa.ismail@intel.com \
    --cc=neescoba@cisco.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rds-devel@oss.oracle.com \
    --cc=sagi@grimberg.me \
    --cc=samba-technical@lists.samba.org \
    --cc=santosh.shilimkar@oracle.com \
    --cc=selvin.xavier@broadcom.com \
    --cc=sfrench@samba.org \
    --cc=shiraz.saleem@intel.com \
    --cc=target-devel@vger.kernel.org \
    --cc=trond.myklebust@hammerspace.com \
    --cc=yangx.jy@fujitsu.com \
    --cc=yishaih@nvidia.com \
    --cc=zyjzyj2000@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox