summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-07-02 20:36:42 +0200
committerGitHub <noreply@github.com>2022-07-02 20:36:42 +0200
commit1db8b179e499e32a7cd218d6acaba3244c5efaa9 (patch)
treef01ffc1c8657708e93e3dcf8511c914d4f3e2032 /pimd
parentMerge pull request #11516 from opensourcerouting/freebsd-rtsock-enobufs (diff)
parentpim6d: Implementing mld watermark-warn CLI completely (diff)
downloadfrr-1db8b179e499e32a7cd218d6acaba3244c5efaa9.tar.xz
frr-1db8b179e499e32a7cd218d6acaba3244c5efaa9.zip
Merge pull request #11505 from SaiGomathiN/watermark
pim6d: Fix the todo items in ipv6 watermark limit CLI
Diffstat (limited to 'pimd')
-rw-r--r--pimd/pim6_cmd.c8
-rw-r--r--pimd/pim_cmd.c10
-rw-r--r--pimd/pim_igmp.c4
-rw-r--r--pimd/pim_instance.h2
-rw-r--r--pimd/pim_vty.c11
5 files changed, 18 insertions, 17 deletions
diff --git a/pimd/pim6_cmd.c b/pimd/pim6_cmd.c
index 4f0758cf6..1a2829f96 100644
--- a/pimd/pim6_cmd.c
+++ b/pimd/pim6_cmd.c
@@ -686,9 +686,7 @@ DEFPY (ipv6_mld_group_watermark,
"Group count to generate watermark warning\n")
{
PIM_DECLVAR_CONTEXT_VRF(vrf, pim);
-
- /* TBD Depends on MLD data structure changes */
- (void)pim;
+ pim->gm_watermark_limit = limit;
return CMD_SUCCESS;
}
@@ -703,9 +701,7 @@ DEFPY (no_ipv6_mld_group_watermark,
IGNORED_IN_NO_STR)
{
PIM_DECLVAR_CONTEXT_VRF(vrf, pim);
-
- /* TBD Depends on MLD data structure changes */
- (void)pim;
+ pim->gm_watermark_limit = 0;
return CMD_SUCCESS;
}
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 817ebcc25..91cc3aa79 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -1135,12 +1135,12 @@ static void igmp_show_groups(struct pim_instance *pim, struct vty *vty, bool uj)
json = json_object_new_object();
json_object_int_add(json, "totalGroups", pim->igmp_group_count);
json_object_int_add(json, "watermarkLimit",
- pim->igmp_watermark_limit);
+ pim->gm_watermark_limit);
} else {
vty_out(vty, "Total IGMP groups: %u\n", pim->igmp_group_count);
vty_out(vty, "Watermark warn limit(%s): %u\n",
- pim->igmp_watermark_limit ? "Set" : "Not Set",
- pim->igmp_watermark_limit);
+ pim->gm_watermark_limit ? "Set" : "Not Set",
+ pim->gm_watermark_limit);
vty_out(vty,
"Interface Group Mode Timer Srcs V Uptime \n");
}
@@ -3334,7 +3334,7 @@ DEFPY (ip_igmp_group_watermark,
"Group count to generate watermark warning\n")
{
PIM_DECLVAR_CONTEXT_VRF(vrf, pim);
- pim->igmp_watermark_limit = limit;
+ pim->gm_watermark_limit = limit;
return CMD_SUCCESS;
}
@@ -3349,7 +3349,7 @@ DEFPY (no_ip_igmp_group_watermark,
IGNORED_IN_NO_STR)
{
PIM_DECLVAR_CONTEXT_VRF(vrf, pim);
- pim->igmp_watermark_limit = 0;
+ pim->gm_watermark_limit = 0;
return CMD_SUCCESS;
}
diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c
index 849216af6..6ffeeb965 100644
--- a/pimd/pim_igmp.c
+++ b/pimd/pim_igmp.c
@@ -1009,8 +1009,8 @@ static void igmp_group_count_incr(struct pim_interface *pim_ifp)
uint32_t group_count = listcount(pim_ifp->gm_group_list);
++pim_ifp->pim->igmp_group_count;
- if (pim_ifp->pim->igmp_group_count
- == pim_ifp->pim->igmp_watermark_limit) {
+ if (pim_ifp->pim->igmp_group_count ==
+ pim_ifp->pim->gm_watermark_limit) {
zlog_warn(
"IGMP group count reached watermark limit: %u(vrf: %s)",
pim_ifp->pim->igmp_group_count,
diff --git a/pimd/pim_instance.h b/pimd/pim_instance.h
index 23b9df4af..684785dd1 100644
--- a/pimd/pim_instance.h
+++ b/pimd/pim_instance.h
@@ -173,7 +173,7 @@ struct pim_instance {
struct thread *t_gm_recv;
unsigned int igmp_group_count;
- unsigned int igmp_watermark_limit;
+ unsigned int gm_watermark_limit;
unsigned int keep_alive_time;
unsigned int rp_keep_alive_time;
diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c
index 4dd139873..43d9c2927 100644
--- a/pimd/pim_vty.c
+++ b/pimd/pim_vty.c
@@ -260,9 +260,14 @@ int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty)
++writes;
}
- if (pim->igmp_watermark_limit != 0) {
- vty_out(vty, "%sip igmp watermark-warn %u\n", spaces,
- pim->igmp_watermark_limit);
+ if (pim->gm_watermark_limit != 0) {
+#if PIM_IPV == 4
+ vty_out(vty, "%s" PIM_AF_NAME " igmp watermark-warn %u\n",
+ spaces, pim->gm_watermark_limit);
+#else
+ vty_out(vty, "%s" PIM_AF_NAME " mld watermark-warn %u\n",
+ spaces, pim->gm_watermark_limit);
+#endif
++writes;
}