linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Haggai Eran <haggaie@mellanox.com>
Cc: linux-rdma@vger.kernel.org, Yishai Hadas <yishaih@mellanox.com>,
	michaelgur@mellanox.com
Subject: Re: [PATCH RFC rdma-core] verbs: relaxed ordering memory regions
Date: Tue, 19 Nov 2019 15:29:19 -0400	[thread overview]
Message-ID: <20191119192919.GA16030@ziepe.ca> (raw)
In-Reply-To: <1573976488-24301-1-git-send-email-haggaie@mellanox.com>

On Sun, Nov 17, 2019 at 09:41:28AM +0200, Haggai Eran wrote:
> +/* Use the new version of ibv_reg_mr only if flags that require it are used. */
> +#define ibv_reg_mr(pd, addr, length, access) ({\
> +	const int optional_access_flags = IBV_ACCESS_RELAXED_ORDERING;
> \

We need to set aside more bits for optional as we can't keep revising
this

> +	struct ibv_mr *__mr; \
> +	\
> +	if (__builtin_constant_p(access) && \
> +	    !((access) & optional_access_flags)) \
> +		__mr = ibv_reg_mr(pd, addr, length, access); \
> +	else \
> +		__mr = ibv_reg_mr_iova2(pd, addr, length, (uintptr_t)addr, \
> +					access); \

Missing brackets around addr

This also wants to be a ?: expression to avoid the ({}) extension

Jason

  reply	other threads:[~2019-11-19 19:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-17  7:41 [PATCH RFC rdma-core] verbs: relaxed ordering memory regions Haggai Eran
2019-11-19 19:29 ` Jason Gunthorpe [this message]
2019-11-21 13:38   ` Haggai Eran

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=20191119192919.GA16030@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=haggaie@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=michaelgur@mellanox.com \
    --cc=yishaih@mellanox.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;
as well as URLs for NNTP newsgroup(s).