Re: [PATCH] IB/mad: Use ID allocator routines to allocate agent number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On 30 May 2018, at 17:10, Jason Gunthorpe <jgg@xxxxxxxx> 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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux