From: Leon Romanovsky <leon@kernel.org>
To: Edward Srouji <edwards@nvidia.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
Saeed Mahameed <saeedm@nvidia.com>,
Tariq Toukan <tariqt@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
netdev@vger.kernel.org, Michael Guralnik <michaelgur@nvidia.com>,
Yishai Hadas <yishaih@nvidia.com>
Subject: Re: [PATCH rdma-next v4 02/11] IB/core: Introduce FRMR pools
Date: Thu, 26 Feb 2026 16:11:43 +0200 [thread overview]
Message-ID: <20260226141143.GJ12611@unreal> (raw)
In-Reply-To: <20260226-frmr_pools-v4-2-95360b54f15e@nvidia.com>
On Thu, Feb 26, 2026 at 03:52:07PM +0200, Edward Srouji wrote:
> From: Michael Guralnik <michaelgur@nvidia.com>
>
> Add a generic Fast Registration Memory Region pools mechanism to allow
> drivers to optimize memory registration performance.
> Drivers that have the ability to reuse MRs or their underlying HW
> objects can take advantage of the mechanism to keep a 'handle' for those
> objects and use them upon user request.
> We assume that to achieve this goal a driver and its HW should implement
> a modify operation for the MRs that is able to at least clear and set the
> MRs and in more advanced implementations also support changing a subset
> of the MRs properties.
>
> The mechanism is built using an RB-tree consisting of pools, each pool
> represents a set of MR properties that are shared by all of the MRs
> residing in the pool and are unmodifiable by the vendor driver or HW.
>
> The exposed API from ib_core to the driver has 4 operations:
> Init and cleanup - handles data structs and locks for the pools.
> Push and pop - store and retrieve 'handle' for a memory registration
> or deregistrations request.
>
> The FRMR pools mechanism implements the logic to search the RB-tree for
> a pool with matching properties and create a new one when needed and
> requires the driver to implement creation and destruction of a 'handle'
> when pool is empty or a handle is requested or is being destroyed.
>
> Later patch will introduce Netlink API to interact with the FRMR pools
> mechanism to allow users to both configure and track its usage.
> A vendor wishing to configure FRMR pool without exposing it or without
> exposing internal MR properties to users, should use the
> kernel_vendor_key field in the pools key. This can be useful in a few
> cases, e.g, when the FRMR handle has a vendor-specific un-modifiable
> property that the user registering the memory might not be aware of.
>
> Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
> Reviewed-by: Yishai Hadas <yishaih@nvidia.com>
> Signed-off-by: Edward Srouji <edwards@nvidia.com>
> ---
> drivers/infiniband/core/Makefile | 2 +-
> drivers/infiniband/core/frmr_pools.c | 319 +++++++++++++++++++++++++++++++++++
> drivers/infiniband/core/frmr_pools.h | 48 ++++++
> include/rdma/frmr_pools.h | 37 ++++
> include/rdma/ib_verbs.h | 8 +
> 5 files changed, 413 insertions(+), 1 deletion(-)
<...>
> +// SPDX-License-Identifier: GPL-2.0-only
<...>
> +EXPORT_SYMBOL(ib_frmr_pools_init);
It is odd to see these two lines together. Either update the SPDX license to
'GPL-2.0 OR Linux-OpenIB', as we do for uverbs, and keep EXPORT_SYMBOL() as is,
or keep the current SPDX-License-Identifier and switch to EXPORT_SYMBOL_GPL().
Thanks
next prev parent reply other threads:[~2026-02-26 14:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 13:52 [PATCH rdma-next v4 00/11] RDMA/core: Introduce FRMR pools infrastructure Edward Srouji
2026-02-26 13:52 ` [PATCH rdma-next v4 01/11] RDMA/mlx5: Move device async_ctx initialization Edward Srouji
2026-02-26 13:52 ` [PATCH rdma-next v4 02/11] IB/core: Introduce FRMR pools Edward Srouji
2026-02-26 14:11 ` Leon Romanovsky [this message]
2026-02-26 17:39 ` Edward Srouji
2026-02-26 18:28 ` Leon Romanovsky
2026-02-26 13:52 ` [PATCH rdma-next v4 03/11] RDMA/core: Add aging to " Edward Srouji
2026-02-26 13:52 ` [PATCH rdma-next v4 04/11] RDMA/core: Add FRMR pools statistics Edward Srouji
2026-02-26 13:52 ` [PATCH rdma-next v4 05/11] RDMA/core: Add pinned handles to FRMR pools Edward Srouji
2026-02-26 13:52 ` [PATCH rdma-next v4 06/11] RDMA/mlx5: Switch from MR cache " Edward Srouji
2026-02-26 13:52 ` [PATCH rdma-next v4 07/11] net/mlx5: Drop MR cache related code Edward Srouji
2026-02-26 13:52 ` [PATCH rdma-next v4 08/11] RDMA/nldev: Add command to get FRMR pools Edward Srouji
2026-02-26 13:52 ` [PATCH rdma-next v4 09/11] RDMA/core: Add netlink command to modify FRMR aging Edward Srouji
2026-02-26 13:52 ` [PATCH rdma-next v4 10/11] RDMA/nldev: Add command to set pinned FRMR handles Edward Srouji
2026-02-26 13:52 ` [PATCH rdma-next v4 11/11] RDMA/nldev: Expose kernel-internal FRMR pools in netlink Edward Srouji
2026-03-02 13:57 ` [PATCH rdma-next v4 00/11] RDMA/core: Introduce FRMR pools infrastructure Leon Romanovsky
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=20260226141143.GJ12611@unreal \
--to=leon@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=edwards@nvidia.com \
--cc=jgg@ziepe.ca \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=michaelgur@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
--cc=yishaih@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox