From: Theo Buehler Subject: Re: bgpd: rework bitmap code to use max elements instead of bits To: tech@openbsd.org Date: Mon, 11 May 2026 13:49:29 +0200 On Thu, May 07, 2026 at 01:37:07PM +0200, Claudio Jeker wrote: > The bitmap code currently tracks the maximum number of bits allowed. > This is a bit tricky since BITMAP_ROUNDUP() could actually overflow for > very big bitmaps (other bgpd code will break before hitting such big maps) > In anycase I think moving the max from bits to number of elements in the > array makes the code nicer. > > On top of this add a bit of extra casts to BITMAP_SETPTR() and > BITMAP_GETPTR() to make 32bit archs happy and not warn about the > difference in size of uint64_t and a pointer value. Reads fine to me modulo the malloc(a * b) already fixed in your tree. ok tb