public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Leon Romanovsky <leon@kernel.org>,
	Doug Ledford <dledford@redhat.com>,
	Avihai Horon <avihaih@nvidia.com>,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next v1 2/2] RDMA/mlx5: Allow modifying Relaxed Ordering via fast registration
Date: Thu, 27 May 2021 12:09:13 +0100	[thread overview]
Message-ID: <YK992cLoTRWG30H9@infradead.org> (raw)
In-Reply-To: <20210526194906.GA3646419@nvidia.com>

On Wed, May 26, 2021 at 04:49:06PM -0300, Jason Gunthorpe wrote:
> Nothing does a FRWR with IB_ACCESS_DISABLE_RELAXED_ORDERING set
> 
> So why not leave the relaxed ordering bits masked in the UMR for FWRW
> so that the UMR doesn't change them at all and fail/panic if the
> caller requests IB_ACCESS_DISABLE_RELAXED_ORDERING ?

Yeah.  In fact we should check for that in the core, or by going even
further than my previous proposal and split IB_ACCESS_* even more fine
grained.

AFAICS we have the following uses cases:

 1) qp_access_flags as a bitmask of possible operations on the queue pair
    The way I understood the queue pairs this should really be just bits
    for remote read, remote write and atomics, but a few places also
    mess with memory windows and local write, which seems to be some
    sort of iWarp cludge
 2) IB_UVERBS_ACCESS_*.  These just get checked using ib_check_mr_access
    and then passed into ->reg_user_mr, ->rereg_user_mr and
    ->reg_user_mr_dmabuf
 3) in-kernel FRWR uses IB_ACCESS_*, but all users seem to hardcode it
    to IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_READ |
    IB_ACCESS_REMOTE_WRITE anyway

In other words:  I wonder if we should just kill off the current from of
IB_ACCESS_* entirely, as it is a weird mess used in totally different
ways in different code paths.

  reply	other threads:[~2021-05-27 11:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20 10:13 [PATCH rdma-next v1 0/2] Enable relaxed ordering for ULPs Leon Romanovsky
2021-05-20 10:13 ` [PATCH rdma-next v1 1/2] RDMA: Enable Relaxed Ordering by default for kernel ULPs Leon Romanovsky
2021-05-27 10:28   ` Christoph Hellwig
2021-05-28 18:27   ` Jason Gunthorpe
2021-05-20 10:13 ` [PATCH rdma-next v1 2/2] RDMA/mlx5: Allow modifying Relaxed Ordering via fast registration Leon Romanovsky
2021-05-26 19:49   ` Jason Gunthorpe
2021-05-27 11:09     ` Christoph Hellwig [this message]
2021-05-27 14:57       ` Jason Gunthorpe
2021-05-27 15:06         ` Christoph Hellwig
2021-06-02 12:16     ` Leon Romanovsky
2021-05-26 19:30 ` [PATCH rdma-next v1 0/2] Enable relaxed ordering for ULPs Jason Gunthorpe
2021-05-27  8:11   ` David Laight
2021-05-31 18:13     ` Jason Gunthorpe
2021-05-31 21:45       ` David Laight
2021-05-31 22:44         ` Jason Gunthorpe

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=YK992cLoTRWG30H9@infradead.org \
    --to=hch@infradead.org \
    --cc=avihaih@nvidia.com \
    --cc=dledford@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.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