diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-12-20 16:45:33 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-01-04 18:23:39 +0100 |
commit | 5b45753eff8c6c65393a54ecfdb36f31bb4b3bcc (patch) | |
tree | 57a184f7413d36444047dc88c4a694852e6c9c4d /pimd | |
parent | pimd: Move debugs into pim_router structure (diff) | |
download | frr-5b45753eff8c6c65393a54ecfdb36f31bb4b3bcc.tar.xz frr-5b45753eff8c6c65393a54ecfdb36f31bb4b3bcc.zip |
pimd: Convert qpim_t_periodic into the `struct pim_router` structure
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd')
-rw-r--r-- | pimd/pim_cmd.c | 6 | ||||
-rw-r--r-- | pimd/pim_iface.c | 2 | ||||
-rw-r--r-- | pimd/pim_instance.h | 2 | ||||
-rw-r--r-- | pimd/pim_neighbor.c | 4 | ||||
-rw-r--r-- | pimd/pim_upstream.c | 4 | ||||
-rw-r--r-- | pimd/pim_vty.c | 4 | ||||
-rw-r--r-- | pimd/pimd.c | 3 | ||||
-rw-r--r-- | pimd/pimd.h | 3 |
8 files changed, 14 insertions, 14 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 26932eea2..2d69d4155 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -4428,7 +4428,7 @@ static void pim_cmd_show_ip_multicast_helper(struct pim_instance *pim, vty_out(vty, "Maximum highest VifIndex: %d\n", PIM_MAX_USABLE_VIFS); vty_out(vty, "\n"); - vty_out(vty, "Upstream Join Timer: %d secs\n", qpim_t_periodic); + vty_out(vty, "Upstream Join Timer: %d secs\n", router->t_periodic); vty_out(vty, "Join/Prune Holdtime: %d secs\n", PIM_JP_HOLDTIME); vty_out(vty, "PIM ECMP: %s\n", pim->ecmp_enable ? "Enable" : "Disable"); vty_out(vty, "PIM ECMP Rebalance: %s\n", @@ -5229,7 +5229,7 @@ DEFUN (ip_pim_joinprune_time, "Seconds\n") { PIM_DECLVAR_CONTEXT(vrf, pim); - qpim_t_periodic = atoi(argv[3]->arg); + router->t_periodic = atoi(argv[3]->arg); return CMD_SUCCESS; } @@ -5243,7 +5243,7 @@ DEFUN (no_ip_pim_joinprune_time, "Seconds\n") { PIM_DECLVAR_CONTEXT(vrf, pim); - qpim_t_periodic = PIM_DEFAULT_T_PERIODIC; + router->t_periodic = PIM_DEFAULT_T_PERIODIC; return CMD_SUCCESS; } diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index 1ad71823b..0451ab1e7 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -1157,7 +1157,7 @@ long pim_if_t_suppressed_msec(struct interface *ifp) /* t_suppressed = t_periodic * rand(1.1, 1.4) */ ramount = 1100 + (random() % (1400 - 1100 + 1)); - t_suppressed_msec = qpim_t_periodic * ramount; + t_suppressed_msec = router->t_periodic * ramount; return t_suppressed_msec; } diff --git a/pimd/pim_instance.h b/pimd/pim_instance.h index 5ff83e65e..ed8ecdcaa 100644 --- a/pimd/pim_instance.h +++ b/pimd/pim_instance.h @@ -46,6 +46,8 @@ struct pim_router { struct thread_master *master; uint32_t debugs; + + int t_periodic; }; /* Per VRF PIM DB */ diff --git a/pimd/pim_neighbor.c b/pimd/pim_neighbor.c index 4f06daf31..436f2dec2 100644 --- a/pimd/pim_neighbor.c +++ b/pimd/pim_neighbor.c @@ -278,7 +278,7 @@ static int on_neighbor_jp_timer(struct thread *t) pim_joinprune_send(&rpf, neigh->upstream_jp_agg); thread_add_timer(router->master, on_neighbor_jp_timer, neigh, - qpim_t_periodic, &neigh->jp_timer); + router->t_periodic, &neigh->jp_timer); return 0; } @@ -287,7 +287,7 @@ static void pim_neighbor_start_jp_timer(struct pim_neighbor *neigh) { THREAD_TIMER_OFF(neigh->jp_timer); thread_add_timer(router->master, on_neighbor_jp_timer, neigh, - qpim_t_periodic, &neigh->jp_timer); + router->t_periodic, &neigh->jp_timer); } static struct pim_neighbor * diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index 59a7e27cf..8cb6c0c17 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -308,7 +308,7 @@ void join_timer_start(struct pim_upstream *up) if (PIM_DEBUG_PIM_EVENTS) { zlog_debug( "%s: starting %d sec timer for upstream (S,G)=%s", - __PRETTY_FUNCTION__, qpim_t_periodic, + __PRETTY_FUNCTION__, router->t_periodic, up->sg_str); } } @@ -318,7 +318,7 @@ void join_timer_start(struct pim_upstream *up) else { THREAD_OFF(up->t_join_timer); thread_add_timer(router->master, on_join_timer, up, - qpim_t_periodic, &up->t_join_timer); + router->t_periodic, &up->t_join_timer); } pim_jp_agg_upstream_verification(up, true); } diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c index a4aec710e..6c837e2a3 100644 --- a/pimd/pim_vty.c +++ b/pimd/pim_vty.c @@ -178,9 +178,9 @@ int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty) qpim_register_suppress_time); ++writes; } - if (qpim_t_periodic != PIM_DEFAULT_T_PERIODIC) { + if (router->t_periodic != PIM_DEFAULT_T_PERIODIC) { vty_out(vty, "%sip pim join-prune-interval %d\n", spaces, - qpim_t_periodic); + router->t_periodic); ++writes; } if (pim->keep_alive_time != PIM_KEEPALIVE_PERIOD) { diff --git a/pimd/pimd.c b/pimd/pimd.c index 461ce1ba5..33aac5a26 100644 --- a/pimd/pimd.c +++ b/pimd/pimd.c @@ -51,8 +51,6 @@ DEFINE_MTYPE_STATIC(PIMD, ROUTER, "PIM Router information"); struct pim_router *router = NULL; -int qpim_t_periodic = - PIM_DEFAULT_T_PERIODIC; /* Period between Join/Prune Messages */ struct pim_assert_metric qpim_infinite_assert_metric; long qpim_rpf_cache_refresh_delay_msec = 50; int qpim_packet_process = PIM_DEFAULT_PACKET_PROCESS; @@ -90,6 +88,7 @@ void pim_router_init(void) router->debugs = 0; router->master = frr_init(); + router->t_periodic = PIM_DEFAULT_T_PERIODIC; } void pim_router_terminate(void) diff --git a/pimd/pimd.h b/pimd/pimd.h index dabb42ea8..84d3b4021 100644 --- a/pimd/pimd.h +++ b/pimd/pimd.h @@ -135,7 +135,6 @@ const char *const PIM_ALL_IGMP_ROUTERS; extern struct pim_router *router; extern struct zebra_privs_t pimd_privs; struct in_addr qpim_all_pim_routers_addr; -int qpim_t_periodic; /* Period between Join/Prune Messages */ struct pim_assert_metric qpim_infinite_assert_metric; long qpim_rpf_cache_refresh_delay_msec; extern int qpim_packet_process; @@ -144,7 +143,7 @@ extern uint8_t qpim_ecmp_rebalance_enable; #define PIM_DEFAULT_PACKET_PROCESS 3 -#define PIM_JP_HOLDTIME (qpim_t_periodic * 7 / 2) +#define PIM_JP_HOLDTIME (router->t_periodic * 7 / 2) /* * Register-Stop Timer (RST(S,G)) |