diff options
author | Maria Matejka <mq@ucw.cz> | 2021-09-27 14:08:03 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2021-11-22 19:05:43 +0100 |
commit | 3b20722a1fc777c27ab2e0451d0ea3fee7fa81a2 (patch) | |
tree | 8f7a2fc0403a788c04a3a0b5b2a83a142440496e /nest/route.h | |
parent | 445eeaf3df126af2c7b61e71c4f08a583eb4fa60 (diff) |
Table cork: Stop creating updates when there are too many pending.
The corked procedure gets a callback when uncorked. Supported by table
maintenance routines and also BGP.
Diffstat (limited to 'nest/route.h')
-rw-r--r-- | nest/route.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nest/route.h b/nest/route.h index 88a56073..310cea92 100644 --- a/nest/route.h +++ b/nest/route.h @@ -157,6 +157,7 @@ struct rtable_config { btime min_settle_time; /* Minimum settle time for notifications */ btime max_settle_time; /* Maximum settle time for notifications */ btime export_settle_time; /* Delay before exports are announced */ + uint cork_limit; /* Amount of routes to be pending on export to cork imports */ }; typedef struct rtable { @@ -187,6 +188,9 @@ typedef struct rtable { int gc_counter; /* Number of operations since last GC */ byte prune_state; /* Table prune state, 1 -> scheduled, 2-> running */ byte nhu_state; /* Next Hop Update state */ + + byte cork_active; /* Congestion control activated */ + struct fib_iterator prune_fit; /* Rtable prune FIB iterator */ struct fib_iterator nhu_fit; /* Next Hop Update FIB iterator */ struct tbf rl_pipe; /* Rate limiting token buffer for pipe collisions */ @@ -378,6 +382,8 @@ struct rt_export_hook { void (*stopped)(struct rt_export_request *); /* Stored callback when export is stopped */ }; +extern struct event_cork rt_cork; + #define TIS_DOWN 0 #define TIS_UP 1 #define TIS_STOP 2 |