Re: bgpd switch communities to RB tree

2022-08-29 Thread Claudio Jeker
On Mon, Aug 29, 2022 at 05:45:58PM +0200, Claudio Jeker wrote: > On Mon, Aug 29, 2022 at 05:36:49PM +0200, Theo Buehler wrote: > > On Mon, Aug 29, 2022 at 05:05:59PM +0200, Claudio Jeker wrote: > > > The hash table for communities is not great. Instead of implementing > > > dynamic hash resize use

Re: bgpd switch communities to RB tree

2022-08-29 Thread Claudio Jeker
On Mon, Aug 29, 2022 at 05:36:49PM +0200, Theo Buehler wrote: > On Mon, Aug 29, 2022 at 05:05:59PM +0200, Claudio Jeker wrote: > > The hash table for communities is not great. Instead of implementing > > dynamic hash resize use a RB tree. Also drop the hash calculation and > > just use memcmp() for

Re: bgpd switch communities to RB tree

2022-08-29 Thread Theo Buehler
On Mon, Aug 29, 2022 at 05:05:59PM +0200, Claudio Jeker wrote: > The hash table for communities is not great. Instead of implementing > dynamic hash resize use a RB tree. Also drop the hash calculation and > just use memcmp() for now. My non scientific test seems to indicate that > the overhead of

bgpd switch communities to RB tree

2022-08-29 Thread Claudio Jeker
The hash table for communities is not great. Instead of implementing dynamic hash resize use a RB tree. Also drop the hash calculation and just use memcmp() for now. My non scientific test seems to indicate that the overhead of SipHash is about the same as the memcmp(). -- :wq Claudio Index: bgp