mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 21:47:15 +02:00
pimd: Convert qpim_t_periodic into the struct pim_router
structure
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
046b1aa7d4
commit
5b45753eff
|
@ -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, "Maximum highest VifIndex: %d\n", PIM_MAX_USABLE_VIFS);
|
||||||
|
|
||||||
vty_out(vty, "\n");
|
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, "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: %s\n", pim->ecmp_enable ? "Enable" : "Disable");
|
||||||
vty_out(vty, "PIM ECMP Rebalance: %s\n",
|
vty_out(vty, "PIM ECMP Rebalance: %s\n",
|
||||||
|
@ -5229,7 +5229,7 @@ DEFUN (ip_pim_joinprune_time,
|
||||||
"Seconds\n")
|
"Seconds\n")
|
||||||
{
|
{
|
||||||
PIM_DECLVAR_CONTEXT(vrf, pim);
|
PIM_DECLVAR_CONTEXT(vrf, pim);
|
||||||
qpim_t_periodic = atoi(argv[3]->arg);
|
router->t_periodic = atoi(argv[3]->arg);
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5243,7 +5243,7 @@ DEFUN (no_ip_pim_joinprune_time,
|
||||||
"Seconds\n")
|
"Seconds\n")
|
||||||
{
|
{
|
||||||
PIM_DECLVAR_CONTEXT(vrf, pim);
|
PIM_DECLVAR_CONTEXT(vrf, pim);
|
||||||
qpim_t_periodic = PIM_DEFAULT_T_PERIODIC;
|
router->t_periodic = PIM_DEFAULT_T_PERIODIC;
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1157,7 +1157,7 @@ long pim_if_t_suppressed_msec(struct interface *ifp)
|
||||||
|
|
||||||
/* t_suppressed = t_periodic * rand(1.1, 1.4) */
|
/* t_suppressed = t_periodic * rand(1.1, 1.4) */
|
||||||
ramount = 1100 + (random() % (1400 - 1100 + 1));
|
ramount = 1100 + (random() % (1400 - 1100 + 1));
|
||||||
t_suppressed_msec = qpim_t_periodic * ramount;
|
t_suppressed_msec = router->t_periodic * ramount;
|
||||||
|
|
||||||
return t_suppressed_msec;
|
return t_suppressed_msec;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,8 @@ struct pim_router {
|
||||||
struct thread_master *master;
|
struct thread_master *master;
|
||||||
|
|
||||||
uint32_t debugs;
|
uint32_t debugs;
|
||||||
|
|
||||||
|
int t_periodic;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Per VRF PIM DB */
|
/* Per VRF PIM DB */
|
||||||
|
|
|
@ -278,7 +278,7 @@ static int on_neighbor_jp_timer(struct thread *t)
|
||||||
pim_joinprune_send(&rpf, neigh->upstream_jp_agg);
|
pim_joinprune_send(&rpf, neigh->upstream_jp_agg);
|
||||||
|
|
||||||
thread_add_timer(router->master, on_neighbor_jp_timer, neigh,
|
thread_add_timer(router->master, on_neighbor_jp_timer, neigh,
|
||||||
qpim_t_periodic, &neigh->jp_timer);
|
router->t_periodic, &neigh->jp_timer);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -287,7 +287,7 @@ static void pim_neighbor_start_jp_timer(struct pim_neighbor *neigh)
|
||||||
{
|
{
|
||||||
THREAD_TIMER_OFF(neigh->jp_timer);
|
THREAD_TIMER_OFF(neigh->jp_timer);
|
||||||
thread_add_timer(router->master, on_neighbor_jp_timer, neigh,
|
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 *
|
static struct pim_neighbor *
|
||||||
|
|
|
@ -308,7 +308,7 @@ void join_timer_start(struct pim_upstream *up)
|
||||||
if (PIM_DEBUG_PIM_EVENTS) {
|
if (PIM_DEBUG_PIM_EVENTS) {
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"%s: starting %d sec timer for upstream (S,G)=%s",
|
"%s: starting %d sec timer for upstream (S,G)=%s",
|
||||||
__PRETTY_FUNCTION__, qpim_t_periodic,
|
__PRETTY_FUNCTION__, router->t_periodic,
|
||||||
up->sg_str);
|
up->sg_str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -318,7 +318,7 @@ void join_timer_start(struct pim_upstream *up)
|
||||||
else {
|
else {
|
||||||
THREAD_OFF(up->t_join_timer);
|
THREAD_OFF(up->t_join_timer);
|
||||||
thread_add_timer(router->master, on_join_timer, up,
|
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);
|
pim_jp_agg_upstream_verification(up, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,9 +178,9 @@ int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty)
|
||||||
qpim_register_suppress_time);
|
qpim_register_suppress_time);
|
||||||
++writes;
|
++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,
|
vty_out(vty, "%sip pim join-prune-interval %d\n", spaces,
|
||||||
qpim_t_periodic);
|
router->t_periodic);
|
||||||
++writes;
|
++writes;
|
||||||
}
|
}
|
||||||
if (pim->keep_alive_time != PIM_KEEPALIVE_PERIOD) {
|
if (pim->keep_alive_time != PIM_KEEPALIVE_PERIOD) {
|
||||||
|
|
|
@ -51,8 +51,6 @@ DEFINE_MTYPE_STATIC(PIMD, ROUTER, "PIM Router information");
|
||||||
|
|
||||||
struct pim_router *router = NULL;
|
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;
|
struct pim_assert_metric qpim_infinite_assert_metric;
|
||||||
long qpim_rpf_cache_refresh_delay_msec = 50;
|
long qpim_rpf_cache_refresh_delay_msec = 50;
|
||||||
int qpim_packet_process = PIM_DEFAULT_PACKET_PROCESS;
|
int qpim_packet_process = PIM_DEFAULT_PACKET_PROCESS;
|
||||||
|
@ -90,6 +88,7 @@ void pim_router_init(void)
|
||||||
|
|
||||||
router->debugs = 0;
|
router->debugs = 0;
|
||||||
router->master = frr_init();
|
router->master = frr_init();
|
||||||
|
router->t_periodic = PIM_DEFAULT_T_PERIODIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
void pim_router_terminate(void)
|
void pim_router_terminate(void)
|
||||||
|
|
|
@ -135,7 +135,6 @@ const char *const PIM_ALL_IGMP_ROUTERS;
|
||||||
extern struct pim_router *router;
|
extern struct pim_router *router;
|
||||||
extern struct zebra_privs_t pimd_privs;
|
extern struct zebra_privs_t pimd_privs;
|
||||||
struct in_addr qpim_all_pim_routers_addr;
|
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;
|
struct pim_assert_metric qpim_infinite_assert_metric;
|
||||||
long qpim_rpf_cache_refresh_delay_msec;
|
long qpim_rpf_cache_refresh_delay_msec;
|
||||||
extern int qpim_packet_process;
|
extern int qpim_packet_process;
|
||||||
|
@ -144,7 +143,7 @@ extern uint8_t qpim_ecmp_rebalance_enable;
|
||||||
|
|
||||||
#define PIM_DEFAULT_PACKET_PROCESS 3
|
#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))
|
* Register-Stop Timer (RST(S,G))
|
||||||
|
|
Loading…
Reference in a new issue