[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f0b1bc8f-8b3b-4e4a-9043-3b80ede3ac12@nvidia.com>
Date: Tue, 27 Jan 2026 00:55:04 +0200
From: Michael Gur <michaelgur@...dia.com>
To: Jason Gunthorpe <jgg@...pe.ca>, Edward Srouji <edwards@...dia.com>
Cc: Leon Romanovsky <leon@...nel.org>, Saeed Mahameed <saeedm@...dia.com>,
Tariq Toukan <tariqt@...dia.com>, Mark Bloch <mbloch@...dia.com>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
linux-kernel@...r.kernel.org, linux-rdma@...r.kernel.org,
netdev@...r.kernel.org, Yishai Hadas <yishaih@...dia.com>
Subject: Re: [PATCH rdma-next v2 02/11] IB/core: Introduce FRMR pools
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,
>> + 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)
>> +{
>>
> I think this is rb_find_add() ?
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
Powered by blists - more mailing lists