diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2012-03-28 18:40:04 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2012-03-28 18:40:04 +0200 |
commit | fb829de69052755a31d76d73e17525d050e5ff4d (patch) | |
tree | 6ab6a130758b328e4d254698c82ca64a62334bd6 /nest/route.h | |
parent | cb3cf95859d81c711337738f004675f43c8bbb0e (diff) |
Fixes responsiveness for protocol shutdown.
When a protocol went down, all its routes were flushed in one step, that
may block BIRD for too much time. The patch fixes that by limiting
maximum number of routes flushed in one step.
Diffstat (limited to 'nest/route.h')
-rw-r--r-- | nest/route.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nest/route.h b/nest/route.h index ea948838..ce68017d 100644 --- a/nest/route.h +++ b/nest/route.h @@ -139,8 +139,10 @@ typedef struct rtable { int gc_counter; /* Number of operations since last GC */ bird_clock_t gc_time; /* Time of last GC */ byte gc_scheduled; /* GC is scheduled */ + byte prune_state; /* Table prune state, 1 -> prune is running */ byte hcu_scheduled; /* Hostcache update is scheduled */ byte nhu_state; /* Next Hop Update state */ + struct fib_iterator prune_fit; /* Rtable prune FIB iterator */ struct fib_iterator nhu_fit; /* Next Hop Update FIB iterator */ } rtable; @@ -244,7 +246,8 @@ void rt_dump(rtable *); void rt_dump_all(void); int rt_feed_baby(struct proto *p); void rt_feed_baby_abort(struct proto *p); -void rt_prune_all(void); +void rt_schedule_prune_all(void); +int rt_prune_loop(void); struct rtable_config *rt_new_table(struct symbol *s); struct rt_show_data { |