lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E67F0098-C2BC-49F6-AC55-3F9195712D4B@oracle.com>
Date:   Wed, 30 May 2018 22:07:16 +0200
From:   Håkon Bugge <haakon.bugge@...cle.com>
To:     Jason Gunthorpe <jgg@...pe.ca>
Cc:     Hans Westgaard Ry <hans.westgaard.ry@...cle.com>,
        jackm <jackm@....mellanox.co.il>,
        Doug Ledford <dledford@...hat.com>,
        Daniel Jurgens <danielj@...lanox.com>,
        Parav Pandit <parav@...lanox.com>,
        Pravin Shedge <pravin.shedge4linux@...il.com>,
        OFED mailing list <linux-rdma@...r.kernel.org>,
        linux-kernel@...r.kernel.org, Leon Romanovsky <leon@...nel.org>
Subject: Re: [PATCH] IB/mad: Use ID allocator routines to allocate agent
 number



> On 30 May 2018, at 17:10, Jason Gunthorpe <jgg@...pe.ca> wrote:
> 
> On Wed, May 30, 2018 at 02:22:56PM +0200, Hans Westgaard Ry wrote:
> 
>> We came up with this code snippet which we think handles both preventing
>> immediate re-use and too big/wrapping...
> 
> Isn't this basically the same as idr_alloc_cyclic ?

I draw my statement back. The idr_alloc_cyclic() is the family of idr's that associates a pointer with the bit. Hence, each bit is a bit + 64b.

That's why we ended up with Hans' pseudo code.


Thxs, Håkon


> 
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ