From: Maria Matejka Date: Wed, 9 Mar 2022 12:49:31 +0000 (+0100) Subject: Merge commit '56c8f2f0' into haugesund X-Git-Tag: v3.0-alpha1~171^2~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4eeae48214bde9807e8b3312f5a7a5de9f2f1b42;p=thirdparty%2Fbird.git Merge commit '56c8f2f0' into haugesund Conflicts: nest/route.h nest/rt-table.c --- 4eeae48214bde9807e8b3312f5a7a5de9f2f1b42 diff --cc nest/route.h index c7fb67aa2,9baaeda09..98d030a90 --- a/nest/route.h +++ b/nest/route.h @@@ -191,10 -184,7 +190,11 @@@ typedef struct rtable 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 */ + struct f_trie *trie_new; /* New prefix trie defined during pruning */ + struct f_trie *trie_old; /* Old prefix trie waiting to be freed */ + u32 trie_lock_count; /* Prefix trie locked by walks */ + u32 trie_old_lock_count; /* Old prefix trie locked by walks */ + struct tbf rl_pipe; /* Rate limiting token buffer for pipe collisions */ list subscribers; /* Subscribers for notifications */ struct timer *settle_timer; /* Settle time for notifications */ @@@ -373,22 -349,11 +376,23 @@@ int rt_feed_channel(struct channel *c) void rt_feed_channel_abort(struct channel *c); int rt_reload_channel(struct channel *c); void rt_reload_channel_abort(struct channel *c); + void rt_refeed_channel(struct channel *c); void rt_prune_sync(rtable *t, int all); - int rte_update_out(struct channel *c, const net_addr *n, rte *new, rte *old, struct rte_storage **old_exported, int refeed); + int rte_update_out(struct channel *c, const net_addr *n, rte *new, rte *old, struct rte_storage **old_exported); struct rtable_config *rt_new_table(struct symbol *s, uint addr_type); +static inline int rt_is_ip(rtable *tab) +{ return (tab->addr_type == NET_IP4) || (tab->addr_type == NET_IP6); } + +static inline int rt_is_vpn(rtable *tab) +{ return (tab->addr_type == NET_VPN4) || (tab->addr_type == NET_VPN6); } + +static inline int rt_is_roa(rtable *tab) +{ return (tab->addr_type == NET_ROA4) || (tab->addr_type == NET_ROA6); } + +static inline int rt_is_flow(rtable *tab) +{ return (tab->addr_type == NET_FLOW4) || (tab->addr_type == NET_FLOW6); } + /* Default limit for ECMP next hops, defined in sysdep code */ extern const int rt_default_ecmp; diff --cc nest/rt-table.c index 2fa4f5160,6851b4bce..36414ed45 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@@ -1978,11 -1593,9 +1980,13 @@@ rt_setup(pool *pp, struct rtable_confi t->rt_event = ev_new_init(p, rt_event, t); t->last_rt_change = t->gc_time = current_time(); + t->rl_pipe = (struct tbf) TBF_DEFAULT_LOG_LIMITS; ++ + if (rt_is_flow(t)) + { + t->flowspec_trie = f_new_trie(lp_new_default(p), 0); + t->flowspec_trie->ipv4 = (t->addr_type == NET_FLOW4); + } } return t;