On Wed, Mar 02, 2022 at 02:46:55PM +0100, Claudio Jeker wrote:
> I forgot to mention that. So during reconfigure rde_up_flush_upcall()
> walks over the full adj_rib_out tree. This includes pending withdraws and
> we need to properly handle them. I decided it is best to revert this back
> to the way it was.

That makes sense.

> The current code is actually incorrect.  The RB_INSERT() at the end of
> prefix_adjout_withdraw() would try re-insert the prefix that is already in
> the tree.

Indeed.

> Looking at this again, I realized that the accounting is not quite right.
> When prefix_adjout_withdraw is called on a PREFIX_FLAG_DEAD prefix the
> prefix_out_cnt is lowered but it should not. Again this is a very uncommon
> case but it is wrong none the less.
> up_wcnt and up_nlricnt need to be lowered where the corresponding RB_REMOVE()
> calls are. The prefix_out_cnt() needs to be lowered when prefix_unlink()
> is called. A similar change should be done for prefix_adjout_update() but
> I will do that as a next step.

The accounting changes make sense and seem consistent. Go ahead!

ok

Reply via email to