mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 21:10:28 +00:00
Merge pull request #4817 from NaveenThanikachalam/652
bgpd: Optimizing route-map's processing of dependencies.
This commit is contained in:
commit
3a6a0888f0
@ -3406,31 +3406,34 @@ int bgp_route_map_update_timer(struct thread *thread)
|
|||||||
|
|
||||||
static void bgp_route_map_mark_update(const char *rmap_name)
|
static void bgp_route_map_mark_update(const char *rmap_name)
|
||||||
{
|
{
|
||||||
if (bm->t_rmap_update == NULL) {
|
struct listnode *node, *nnode;
|
||||||
struct listnode *node, *nnode;
|
struct bgp *bgp;
|
||||||
struct bgp *bgp;
|
|
||||||
|
|
||||||
/* rmap_update_timer of 0 means don't do route updates */
|
/* If new update is received before the current timer timed out,
|
||||||
if (bm->rmap_update_timer) {
|
* turn it off and start a new timer.
|
||||||
bm->t_rmap_update = NULL;
|
*/
|
||||||
thread_add_timer(bm->master, bgp_route_map_update_timer,
|
if (bm->t_rmap_update != NULL)
|
||||||
NULL, bm->rmap_update_timer,
|
THREAD_OFF(bm->t_rmap_update);
|
||||||
&bm->t_rmap_update);
|
|
||||||
|
|
||||||
/* Signal the groups that a route-map update event has
|
/* rmap_update_timer of 0 means don't do route updates */
|
||||||
* started */
|
if (bm->rmap_update_timer) {
|
||||||
for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp))
|
thread_add_timer(bm->master, bgp_route_map_update_timer,
|
||||||
update_group_policy_update(bgp,
|
NULL, bm->rmap_update_timer,
|
||||||
BGP_POLICY_ROUTE_MAP,
|
&bm->t_rmap_update);
|
||||||
rmap_name, 1, 1);
|
|
||||||
} else {
|
/* Signal the groups that a route-map update event has
|
||||||
for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp))
|
* started */
|
||||||
bgp_route_map_process_update(bgp, rmap_name, 0);
|
for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp))
|
||||||
|
update_group_policy_update(bgp,
|
||||||
|
BGP_POLICY_ROUTE_MAP,
|
||||||
|
rmap_name, 1, 1);
|
||||||
|
} else {
|
||||||
|
for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp))
|
||||||
|
bgp_route_map_process_update(bgp, rmap_name, 0);
|
||||||
#if ENABLE_BGP_VNC
|
#if ENABLE_BGP_VNC
|
||||||
zlog_debug("%s: calling vnc_routemap_update", __func__);
|
zlog_debug("%s: calling vnc_routemap_update", __func__);
|
||||||
vnc_routemap_update(bgp, __func__);
|
vnc_routemap_update(bgp, __func__);
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user