public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org>
To: oulijun <oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH rdma-core] libhns: Add rereg mr interface in userspace
Date: Fri, 24 Nov 2017 09:03:47 -0700	[thread overview]
Message-ID: <20171124160347.GA3552@ziepe.ca> (raw)
In-Reply-To: <facbc654-30ad-1bb7-f066-6dff2d5deaca-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

On Fri, Nov 24, 2017 at 04:38:28PM +0800, oulijun wrote:

> >> +int hns_roce_u_rereg_mr(struct ibv_mr *mr, int flags, struct ibv_pd *pd,
> >> +			void *addr, size_t length, int access)
> >> +{
> >> +	struct ibv_rereg_mr cmd;
> >> +	struct ibv_rereg_mr_resp resp;
> >> +
> >> +	if (flags & IBV_REREG_MR_KEEP_VALID)
> >> +		return ENOTSUP;
> > 
> > You need to write the supported flags here, so the people will
> > be able to extend ibv_rereg_mr_flags without worries about your driver.
> > 
> > Thanks
> I think that it maybe not write. if the hw is not supported, the user will
> not call ibv_rereg_mr and don't configure flags for IBV_REREG_MR_KEEP_VALID
> besides, the kernel will check the flags.

Since the kernel checks it just get rid of the if statement.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-11-24 16:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21 12:20 [PATCH rdma-core] libhns: Add rereg mr interface in userspace Lijun Ou
     [not found] ` <1511266846-137693-1-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-11-21 13:53   ` Leon Romanovsky
     [not found]     ` <20171121135310.GV18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-21 15:18       ` Jason Gunthorpe
2017-11-24  8:38       ` oulijun
     [not found]         ` <facbc654-30ad-1bb7-f066-6dff2d5deaca-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-11-24 16:03           ` Jason Gunthorpe [this message]
     [not found]             ` <20171124160347.GA3552-uk2M96/98Pc@public.gmane.org>
2017-11-25  1:23               ` oulijun

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=20171124160347.GA3552@ziepe.ca \
    --to=jgg-uk2m96/98pc@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    /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