Re: [PATCH rdma-next v2 02/11] IB/core: Introduce FRMR pools
From: Michael Gur
Date: Mon Jan 26 2026 - 17:55:29 EST
On 1/20/2026 6:44 PM, Jason Gunthorpe wrote:
On Mon, Dec 22, 2025 at 02:40:37PM +0200, Edward Srouji wrote:
+static int compare_keys(struct ib_frmr_key *key1, struct ib_frmr_key *key2)This stuff should be using cmp_int().
+{
+static struct ib_frmr_pool *ib_frmr_pool_find(struct ib_frmr_pools *pools,I think this is rb_find_add() ?
+ struct ib_frmr_key *key)
+{
Use the rb_find() helper
+static struct ib_frmr_pool *create_frmr_pool(struct ib_device *device,
+ struct ib_frmr_key *key)
+{
Ack, thanks.
Moved all comparisons except dma_blocks to use cmp_int().
Moved the 'find' and 'create' paths to use the rb tree helpers.
While at it, changed compare_keys() to be inline.
Will send these with V3.
Michael