vty_out(vty, "\n");
vty_out(vty, "Upstream Join Timer: %d secs\n", qpim_t_periodic);
vty_out(vty, "Join/Prune Holdtime: %d secs\n", PIM_JP_HOLDTIME);
- vty_out(vty, "PIM ECMP: %s\n", qpim_ecmp_enable ? "Enable" : "Disable");
+ vty_out(vty, "PIM ECMP: %s\n", pim->ecmp_enable ? "Enable" : "Disable");
vty_out(vty, "PIM ECMP Rebalance: %s\n",
- qpim_ecmp_rebalance_enable ? "Enable" : "Disable");
+ pim->ecmp_rebalance_enable ? "Enable" : "Disable");
vty_out(vty, "\n");
"Enable PIM ECMP \n")
{
PIM_DECLVAR_CONTEXT(vrf, pim);
- qpim_ecmp_enable = 1;
+ pim->ecmp_enable = true;
return CMD_SUCCESS;
}
"Disable PIM ECMP \n")
{
PIM_DECLVAR_CONTEXT(vrf, pim);
- qpim_ecmp_enable = 0;
+ pim->ecmp_enable = false;
return CMD_SUCCESS;
}
"Enable PIM ECMP Rebalance\n")
{
PIM_DECLVAR_CONTEXT(vrf, pim);
- qpim_ecmp_enable = 1;
- qpim_ecmp_rebalance_enable = 1;
+ pim->ecmp_enable = true;
+ pim->ecmp_rebalance_enable = true;
return CMD_SUCCESS;
}
"Disable PIM ECMP Rebalance\n")
{
PIM_DECLVAR_CONTEXT(vrf, pim);
- qpim_ecmp_rebalance_enable = 0;
+ pim->ecmp_rebalance_enable = false;
return CMD_SUCCESS;
}
pim->keep_alive_time = PIM_KEEPALIVE_PERIOD;
pim->rp_keep_alive_time = PIM_RP_KEEPALIVE_PERIOD;
+ pim->ecmp_enable = false;
+ pim->ecmp_rebalance_enable = false;
pim->vrf_id = vrf->vrf_id;
pim->vrf = vrf;
unsigned int keep_alive_time;
unsigned int rp_keep_alive_time;
+ bool ecmp_enable;
+ bool ecmp_rebalance_enable;
+
/* If we need to rescan all our upstreams */
struct thread *rpf_cache_refresher;
int64_t rpf_cache_refresh_requests;
metric is less than nexthop update.
*/
- if (qpim_ecmp_rebalance_enable == 0) {
+ if (pim->ecmp_rebalance_enable == 0) {
uint8_t curr_route_valid = 0;
// Check if current nexthop is present in new updated
// Nexthop list.
}
}
}
- if (qpim_ecmp_enable) {
+ if (pim->ecmp_enable) {
// PIM ECMP flag is enable then choose ECMP path.
hash_val = pim_compute_ecmp_hash(src, grp);
mod_val = hash_val % pnc->nexthop_num;
"%s: (%s,%s)(%s) selected nhop interface %s addr %s mod_val %u iter %d ecmp %d",
__PRETTY_FUNCTION__, buf2, buf3,
pim->vrf->name, ifp->name, buf, mod_val,
- nh_iter, qpim_ecmp_enable);
+ nh_iter, pim->ecmp_enable);
}
}
nh_iter++;
}
// If PIM ECMP enable then choose ECMP path.
- if (qpim_ecmp_enable) {
+ if (pim->ecmp_enable) {
hash_val = pim_compute_ecmp_hash(src, grp);
mod_val = hash_val % num_ifindex;
if (PIM_DEBUG_PIM_NHT_DETAIL)
}
// If PIM ECMP enable then choose ECMP path.
- if (qpim_ecmp_enable) {
+ if (pim->ecmp_enable) {
hash_val = pim_compute_ecmp_hash(src, grp);
mod_val = hash_val % num_ifindex;
if (PIM_DEBUG_PIM_NHT_DETAIL)
spaces);
++writes;
}
- if (qpim_ecmp_rebalance_enable) {
+ if (pim->ecmp_rebalance_enable) {
vty_out(vty, "%sip pim ecmp rebalance\n", spaces);
++writes;
- } else if (qpim_ecmp_enable) {
+ } else if (pim->ecmp_enable) {
vty_out(vty, "%sip pim ecmp\n", spaces);
++writes;
}
struct pim_assert_metric qpim_infinite_assert_metric;
long qpim_rpf_cache_refresh_delay_msec = 50;
int qpim_packet_process = PIM_DEFAULT_PACKET_PROCESS;
-uint8_t qpim_ecmp_enable = 0;
-uint8_t qpim_ecmp_rebalance_enable = 0;
struct pim_instance *pimg = NULL;
int32_t qpim_register_suppress_time = PIM_REGISTER_SUPPRESSION_TIME_DEFAULT;