diff options
author | Maria Matejka <mq@ucw.cz> | 2022-07-12 12:40:18 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-07-12 14:45:27 +0200 |
commit | bc2ce4aaa8d1e4d56776ee35352c5e2caa09a0e5 (patch) | |
tree | 95c9224efba38da51c3464810a7007f8d70a4e3d /proto/bgp/bgp.h | |
parent | 080cbd1219ba86dd44712d0d24ceae884b34ec4b (diff) |
Removing the rte_modify API
For BGP LLGR purposes, there was an API allowing a protocol to directly
modify their stale routes in table before flushing them. This API was
called by the table prune routine which violates the future locking
requirements.
Instead of this, BGP now requests a special route export and reimports
these routes into the table, allowing for asynchronous execution without
locking the table on export.
Diffstat (limited to 'proto/bgp/bgp.h')
-rw-r--r-- | proto/bgp/bgp.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h index 003893e0..2e7615ea 100644 --- a/proto/bgp/bgp.h +++ b/proto/bgp/bgp.h @@ -371,6 +371,7 @@ struct bgp_channel { timer *stale_timer; /* Long-lived stale timer for LLGR */ u32 stale_time; /* Stored LLGR stale time from last session */ + struct rt_export_request stale_feed; /* Feeder request for stale route modification */ u8 add_path_rx; /* Session expects receive of ADD-PATH extended NLRI */ u8 add_path_tx; /* Session expects transmit of ADD-PATH extended NLRI */ @@ -576,7 +577,7 @@ void bgp_done_prefix(struct bgp_channel *c, struct bgp_prefix *px, struct bgp_bu int bgp_rte_better(struct rte *, struct rte *); int bgp_rte_mergable(rte *pri, rte *sec); int bgp_rte_recalculate(rtable *table, net *net, rte *new, rte *old, rte *old_best); -struct rte *bgp_rte_modify_stale(struct rte *r, struct linpool *pool); +void bgp_rte_modify_stale(struct rt_export_request *req, const net_addr *n, struct rt_pending_export *rpe UNUSED, rte **feed, uint count); u32 bgp_rte_igp_metric(const rte *); void bgp_rt_notify(struct proto *P, struct channel *C, const net_addr *n, rte *new, const rte *old); int bgp_preexport(struct channel *, struct rte *); |