pimd,pim6d: Modifying IGMP to GM in PIM_DEBUG_IGMP_EVENTS to PIM_DEBUG_GM_EVENTS

Changing the macros to common so that it can be used for pimv6 debugs as well
to be used for both IGMP and MLD debugs.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
This commit is contained in:
Sai Gomathi N 2022-09-02 04:00:10 -07:00
parent 7139b1aeae
commit 95b13dc512
7 changed files with 12 additions and 12 deletions

View File

@ -401,7 +401,7 @@ static void gm_sg_update(struct gm_sg *sg, bool has_expired)
desired = GM_SG_NOINFO;
if (desired != sg->state && !gm_ifp->stopping) {
if (PIM_DEBUG_IGMP_EVENTS)
if (PIM_DEBUG_GM_EVENTS)
zlog_debug(log_sg(sg, "%s => %s"), gm_states[sg->state],
gm_states[desired]);
@ -1049,7 +1049,7 @@ static void gm_t_expire(struct thread *t)
remain_ms = monotime_until(&pend->expiry, &remain);
if (remain_ms > 0) {
if (PIM_DEBUG_IGMP_EVENTS)
if (PIM_DEBUG_GM_EVENTS)
zlog_debug(
log_ifp("next general expiry in %" PRId64 "ms"),
remain_ms / 1000);
@ -1073,7 +1073,7 @@ static void gm_t_expire(struct thread *t)
gm_ifp->n_pending * sizeof(gm_ifp->pending[0]));
}
if (PIM_DEBUG_IGMP_EVENTS)
if (PIM_DEBUG_GM_EVENTS)
zlog_debug(log_ifp("next general expiry waiting for query"));
}
@ -1250,7 +1250,7 @@ static void gm_t_grp_expire(struct thread *t)
struct gm_if *gm_ifp = pend->iface;
struct gm_sg *sg, *sg_start, sg_ref = {};
if (PIM_DEBUG_IGMP_EVENTS)
if (PIM_DEBUG_GM_EVENTS)
zlog_debug(log_ifp("*,%pPAs S,G timer expired"), &pend->grp);
/* gteq lookup - try to find *,G or S,G (S,G is > *,G)
@ -1442,7 +1442,7 @@ static void gm_handle_query(struct gm_if *gm_ifp,
}
if (IPV6_ADDR_CMP(&pkt_src->sin6_addr, &gm_ifp->querier) < 0) {
if (PIM_DEBUG_IGMP_EVENTS)
if (PIM_DEBUG_GM_EVENTS)
zlog_debug(
log_pkt_src("replacing elected querier %pPA"),
&gm_ifp->querier);
@ -2137,7 +2137,7 @@ void gm_ifp_teardown(struct interface *ifp)
gm_ifp = pim_ifp->mld;
gm_ifp->stopping = true;
if (PIM_DEBUG_IGMP_EVENTS)
if (PIM_DEBUG_GM_EVENTS)
zlog_debug(log_ifp("MLD stop"));
THREAD_OFF(gm_ifp->t_query);

View File

@ -1345,7 +1345,7 @@ ferr_r pim_if_igmp_join_add(struct interface *ifp, struct in_addr group_addr,
(void)igmp_join_new(ifp, group_addr, source_addr);
if (PIM_DEBUG_IGMP_EVENTS) {
if (PIM_DEBUG_GM_EVENTS) {
char group_str[INET_ADDRSTRLEN];
char source_str[INET_ADDRSTRLEN];
pim_inet4_dump("<grp?>", group_addr, group_str,

View File

@ -1362,7 +1362,7 @@ void igmp_group_timer_on(struct gm_group *group, long interval_msec,
{
group_timer_off(group);
if (PIM_DEBUG_IGMP_EVENTS) {
if (PIM_DEBUG_GM_EVENTS) {
char group_str[INET_ADDRSTRLEN];
pim_inet4_dump("<group?>", group->group_addr, group_str,
sizeof(group_str));

View File

@ -237,7 +237,7 @@ int igmp_v2_recv_leave(struct gm_sock *igmp, struct ip *ip_hdr,
*/
if ((ntohl(ip_hdr->ip_dst.s_addr) != INADDR_ALLRTRS_GROUP)
&& (ip_hdr->ip_dst.s_addr != group_addr.s_addr)) {
if (PIM_DEBUG_IGMP_EVENTS)
if (PIM_DEBUG_GM_EVENTS)
zlog_debug(
"IGMPv2 Leave message is ignored since received on address other than ALL-ROUTERS or Group-address");
return -1;

View File

@ -209,7 +209,7 @@ static void igmp_source_timer_on(struct gm_group *group,
source_timer_off(group, source);
struct pim_interface *pim_ifp = group->interface->info;
if (PIM_DEBUG_IGMP_EVENTS) {
if (PIM_DEBUG_GM_EVENTS) {
char group_str[INET_ADDRSTRLEN];
char source_str[INET_ADDRSTRLEN];
pim_inet4_dump("<group?>", group->group_addr, group_str,

View File

@ -58,7 +58,7 @@ int pim_debug_config_write(struct vty *vty)
vty_out(vty, "debug msdp internal\n");
++writes;
}
if (PIM_DEBUG_IGMP_EVENTS) {
if (PIM_DEBUG_GM_EVENTS) {
vty_out(vty, "debug igmp events\n");
++writes;
}

View File

@ -160,7 +160,7 @@ extern uint8_t qpim_ecmp_rebalance_enable;
(router->debugs & (PIM_MASK_PIM_TRACE | PIM_MASK_PIM_TRACE_DETAIL))
#define PIM_DEBUG_PIM_TRACE_DETAIL \
(router->debugs & PIM_MASK_PIM_TRACE_DETAIL)
#define PIM_DEBUG_IGMP_EVENTS (router->debugs & PIM_MASK_IGMP_EVENTS)
#define PIM_DEBUG_GM_EVENTS (router->debugs & PIM_MASK_IGMP_EVENTS)
#define PIM_DEBUG_IGMP_PACKETS (router->debugs & PIM_MASK_IGMP_PACKETS)
#define PIM_DEBUG_IGMP_TRACE \
(router->debugs & (PIM_MASK_IGMP_TRACE | PIM_MASK_IGMP_TRACE_DETAIL))