diff options
author | Maria Matejka <mq@ucw.cz> | 2022-07-13 12:02:34 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-07-13 12:02:34 +0200 |
commit | 5be34f5ab4aa0c8852db6bf19cad5e81f46640e3 (patch) | |
tree | 8a935db40e88b3e79200bc6a8b1b730ea8fe1439 /nest/rt.h | |
parent | 4ec443b5c283fc4f37629bc38ef3730e0a7cc932 (diff) | |
parent | 7e9cede1fd1878fb4c00e793bccd0ca6c18ad452 (diff) |
Merge commit '7e9cede1fd1878fb4c00e793bccd0ca6c18ad452' into thread-next
Diffstat (limited to 'nest/rt.h')
-rw-r--r-- | nest/rt.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -47,8 +47,8 @@ struct rtable_config { struct rtable *table; struct proto_config *krt_attached; /* Kernel syncer attached to this table */ uint addr_type; /* Type of address data stored in table (NET_*) */ - int gc_max_ops; /* Maximum number of operations before GC is run */ - int gc_min_time; /* Minimum time between two consecutive GC runs */ + uint gc_threshold; /* Maximum number of operations before GC is run */ + uint gc_period; /* Approximate time between two consecutive GC runs */ byte sorted; /* Routes of network are sorted according to rte_better() */ byte trie_used; /* Rtable has attached trie */ btime min_settle_time; /* Minimum settle time for notifications */ @@ -89,10 +89,11 @@ typedef struct rtable { * obstacle from this routing table. */ struct event *rt_event; /* Routing table event */ + struct timer *prune_timer; /* Timer for periodic pruning / GC */ btime last_rt_change; /* Last time when route changed */ btime base_settle_time; /* Start time of rtable settling interval */ btime gc_time; /* Time of last GC */ - int gc_counter; /* Number of operations since last GC */ + uint gc_counter; /* Number of operations since last GC */ byte prune_state; /* Table prune state, 1 -> scheduled, 2-> running */ byte prune_trie; /* Prune prefix trie during next table prune */ byte hcu_scheduled; /* Hostcache update is scheduled */ @@ -364,6 +365,7 @@ struct config; void rt_init(void); void rt_preconfig(struct config *); +void rt_postconfig(struct config *); void rt_commit(struct config *new, struct config *old); void rt_lock_table(rtable *); void rt_unlock_table(rtable *); |