All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Aharon Landau <aharonl@nvidia.com>,
	linux-rdma@vger.kernel.org,
	Michael Guralnik <michaelgur@nvidia.com>
Subject: Re: [PATCH rdma-next 10/12] RDMA/mlx5: Use mlx5_umr_post_send_wait() to update MR pas
Date: Mon, 25 Apr 2022 14:43:50 -0300	[thread overview]
Message-ID: <20220425174350.GA2224482@nvidia.com> (raw)
In-Reply-To: <ed8f2ee6c64804072155d727149abf7105f92536.1649747695.git.leonro@nvidia.com>

On Tue, Apr 12, 2022 at 10:24:05AM +0300, Leon Romanovsky wrote:

> +/*
> + * Send the DMA list to the HW for a normal MR using UMR.
> + * Dmabuf MR is handled in a similar way, except that the MLX5_IB_UPD_XLT_ZAP
> + * flag may be used.
> + */
> +int mlx5r_umr_update_mr_pas(struct mlx5_ib_mr *mr, unsigned int flags)
> +{

I would prefer to see zap split into its own function, it shouldn't
call rdma_for_each_block at all - the only reason it was structured
this way in the first place was because everything had to be squeezed
into a WR struct.

Then all the places calling

mlx5r_umr_update_xlt(.. MLX5_IB_UPD_XLT_ZAP) 

should call this new function instead as well.

Zapping an ODP or zapping an normal mkey should just be the same
logic.

Also, looking at it, it would be futher nice if the duplication
between mlx5r_umr_update_xlt() and mlx5r_umr_update_mr_pas() could be
removed and perhaps organized into a way to make it logical to
eliminate the mlx5_odp_populate_xlt() "callback"

Which would give four entry points:

'umr fill xlt from sgl' (mlx5r_umr_update_mr_pas)
'umr fill xlt from dma_list' (populate_mtt)
'umr fill klm from xarray' (populate_klm)
'umr fill xlt/klm with zero' (zap)

I'd imagine a general construction to consolidate more stuff into
mlx5r_umr_create_xlt(), probably having it return a struct, including
setting up the initial wqe so the above are slimmer.

Maybe in a followup series though

Jason

  reply	other threads:[~2022-04-25 17:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12  7:23 [PATCH rdma-next 00/12] Refactor UMR post send logic Leon Romanovsky
2022-04-12  7:23 ` [PATCH rdma-next 01/12] RDMA/mlx5: Move init and cleanup of UMR to umr.c Leon Romanovsky
2022-04-12  7:23 ` [PATCH rdma-next 02/12] RDMA/mlx5: Move umr checks to umr.h Leon Romanovsky
2022-04-12  7:23 ` [PATCH rdma-next 03/12] RDMA/mlx5: Move mkey ctrl segment logic to umr.c Leon Romanovsky
2022-04-25 15:22   ` Jason Gunthorpe
2022-04-12  7:23 ` [PATCH rdma-next 04/12] RDMA/mlx5: Simplify get_umr_update_access_mask() Leon Romanovsky
2022-04-12  7:24 ` [PATCH rdma-next 05/12] RDMA/mlx5: Expose wqe posting helpers outside of wr.c Leon Romanovsky
2022-04-12  7:24 ` [PATCH rdma-next 06/12] RDMA/mlx5: Introduce mlx5_umr_post_send_wait() Leon Romanovsky
2022-04-12  7:24 ` [PATCH rdma-next 07/12] RDMA/mlx5: Use mlx5_umr_post_send_wait() to revoke MRs Leon Romanovsky
2022-04-12  7:24 ` [PATCH rdma-next 08/12] RDMA/mlx5: Use mlx5_umr_post_send_wait() to rereg pd access Leon Romanovsky
2022-04-12  7:24 ` [PATCH rdma-next 09/12] RDMA/mlx5: Move creation and free of translation tables to umr.c Leon Romanovsky
2022-04-25 15:11   ` Jason Gunthorpe
2022-04-12  7:24 ` [PATCH rdma-next 10/12] RDMA/mlx5: Use mlx5_umr_post_send_wait() to update MR pas Leon Romanovsky
2022-04-25 17:43   ` Jason Gunthorpe [this message]
2022-04-12  7:24 ` [PATCH rdma-next 11/12] RDMA/mlx5: Use mlx5_umr_post_send_wait() to update xlt Leon Romanovsky
2022-04-12  7:24 ` [PATCH rdma-next 12/12] RDMA/mlx5: Clean UMR QP type flow from mlx5_ib_post_send() Leon Romanovsky
2022-04-25 18:48 ` [PATCH rdma-next 00/12] Refactor UMR post send logic 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=20220425174350.GA2224482@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=aharonl@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=michaelgur@nvidia.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.