0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-01-03 07:31:54 +00:00

Kick settle timer when receiving updates in rt_notify()

This commit is contained in:
Igor Putovny 2024-06-13 16:36:12 +02:00
parent 701a9f5dd1
commit 4243f9db12
2 changed files with 15 additions and 7 deletions

View File

@ -1317,10 +1317,22 @@ aggregator_rt_notify(struct proto *P, struct channel *src_ch, net *net, rte *new
if (p->p.proto_state != PS_UP) if (p->p.proto_state != PS_UP)
return; return;
if (!p->root) if (PREFIX_AGGR == p->aggr_mode)
trie_init(p); {
assert(p->root == NULL);
channel_request_feeding(p->src); /*
* Don't kick settle timer during first run. That would cause
* repeated calls to rt_notify() without any new updates.
*/
if (!p->first_run)
{
log("rt notify: kick");
settle_kick(&p->notify_settle);
}
return;
}
/* Find the objects for the old route */ /* Find the objects for the old route */
if (old) if (old)
@ -1501,9 +1513,6 @@ aggregator_rt_notify(struct proto *P, struct channel *src_ch, net *net, rte *new
ASSERT_DIE(!old_bucket->rte && !old_bucket->count); ASSERT_DIE(!old_bucket->rte && !old_bucket->count);
HASH_REMOVE2(p->buckets, AGGR_BUCK, p->p.pool, old_bucket); HASH_REMOVE2(p->buckets, AGGR_BUCK, p->p.pool, old_bucket);
} }
assert(p->root != NULL);
settle_kick(&p->notify_settle);
} }
static int static int

View File

@ -81,7 +81,6 @@ struct aggregator_proto {
struct settle notify_settle; struct settle notify_settle;
int before_count; int before_count;
int after_count; int after_count;
int aggr_done;
}; };
enum aggr_item_type { enum aggr_item_type {