Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

staticd : northbound backend code #5996

Closed
wants to merge 124 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
0bdeb5e
lib: rewrite zlog lock-free & TLS-buffered
eqvinox May 6, 2017
767439c
lib: mark some allocations as "active at exit"
eqvinox Dec 2, 2019
149e0ba
lib/log: add valgrind suppression for zlog
eqvinox Dec 17, 2019
0eb5f93
doc: new logging subsystem
eqvinox Dec 2, 2019
1c40862
lib/log: re-add log filtering
eqvinox Dec 17, 2019
8d0a291
lib/hook: use static hook entry when possible
eqvinox Jan 20, 2020
6c19e55
doc: logging: clarify per-thread buffering
eqvinox Apr 7, 2020
8963e0c
ldpd: don't drop packets coming through a broken LSP
rwestphal Apr 3, 2020
339f769
pimd: Implement watermark warning for igmp group count and add igmp g…
sarav511 Apr 1, 2020
4d36096
pimd: show ip igmp groups json output - Make group array for each int…
sarav511 Apr 1, 2020
daeda8d
doc: Add 'ip igmp watermark-warn (10-60000)' command to pim user docu…
sarav511 Apr 1, 2020
e7cbe5e
bgpd: Force self-next-hop check in next-hop update.
NaveenThanikachalam Apr 9, 2020
1d3fdcc
bgpd: Enable rfc8212 by default except datacenter profile
ton31337 Apr 6, 2020
c7688a6
tests: Enable rfc8212 by default except datacenter profile
ton31337 Apr 6, 2020
74f852e
tests: Remove extra empty vertical spaces
ton31337 Apr 6, 2020
8955d9e
doc: Mention that rfc8212 is enabled by default
ton31337 Apr 13, 2020
8971c2d
tests: Describe each scenario for rfc8212 to ease debugging
ton31337 Apr 13, 2020
f2562d3
bgpd: Fix typos in `show bgp evpn route type`
Mar 10, 2020
8937a1e
bgpd: Add int args to `show bgp evpn route type`
Mar 10, 2020
6cfd16a
doc: Add doc for `show bgp l2vpn evpn route type`
Mar 5, 2020
fae0193
zebra: add ability to set hoplimit for IPv6 RAs
dslicenc Apr 15, 2020
2a3a983
doc: Documentation for ipv6 nd ra-hop-limit command
dslicenc Apr 15, 2020
62b346e
*: clean up cmd_node initializers
eqvinox Sep 8, 2018
249a771
*: remove cmd_node->vtysh
eqvinox Sep 8, 2018
612c2c1
*: remove second parameter on install_node()
eqvinox Sep 8, 2018
2438958
*: move CLI parent data to cmd_node->parent_node
eqvinox Sep 8, 2018
f4b8291
*: move CLI node names to cmd_node->name
eqvinox Sep 8, 2018
893d8be
zebra: fix FPM node reusing VTY_NODE
eqvinox Apr 15, 2020
791ded4
*: add ->node_exit to struct cmd_node
eqvinox Sep 8, 2018
d42eb10
vtysh: use parent_node for vtysh_exit()
eqvinox Apr 2, 2020
d1b221f
lib: #define FRR_CMD_NODE_20200416
eqvinox Apr 16, 2020
d3f6c58
bgpd, lib: Use bool instead of uint8_t for community/prefix-list "any"
ton31337 Apr 16, 2020
eb91f8d
bgpd: Add a sanitify check for bgp_nexthop_cache against NULL
ton31337 Apr 16, 2020
09133ff
Merge pull request #5451 from opensourcerouting/rcu-log
Spantik Apr 16, 2020
887a232
tests: add connected/recursive/duplicte/route-map NHG tests
sworleys Apr 13, 2020
4e0b5b3
lib,zebra: add a session id for zapi sessions
Apr 14, 2020
4cebdb9
zebra,ldpd: use zapi client session id in LM apis
Apr 15, 2020
c2c3db5
Merge pull request #6224 from mjstapp/zclient_session_id
odd22 Apr 16, 2020
45facd9
Merge pull request #5913 from taspelund/evpn_route_type_int
ton31337 Apr 16, 2020
edf7eff
Merge pull request #6239 from ton31337/fix/uint8_t_to_bool_for_any
qlyoung Apr 16, 2020
2ff9950
Merge pull request #6135 from opensourcerouting/cli-node-cleanup
donaldsharp Apr 16, 2020
a83014c
Merge pull request #6247 from FRRouting/nb_conversions
donaldsharp Apr 16, 2020
17e2f0b
zebra: in_addr_cmp and `struct prefix` are not happy
donaldsharp Apr 17, 2020
b2145a4
ospfd: Fix possible null deref
donaldsharp Apr 17, 2020
50cf524
lib: prefix must be a valid pointer at this point
donaldsharp Apr 17, 2020
85948e7
pimd: if_lookup_by_index can fail handle it appropriately
donaldsharp Apr 17, 2020
bece779
Merge pull request #6240 from ton31337/fix/null_bnc_bgp_show_hostname
srimohans Apr 17, 2020
4110aa2
Merge pull request #6248 from donaldsharp/zebra_snmp
ton31337 Apr 17, 2020
193848f
lib: clear data pointer in bf_free
Apr 17, 2020
9d73613
doc: update FPM documentation
rzalamena Apr 16, 2020
6ba8db2
zebra: notify data plane providers about shutdown
rzalamena Apr 17, 2020
98a8750
zebra: gracefully shutdown fpm module
rzalamena Apr 17, 2020
5920b3e
*: replace all random() calls
rzalamena Apr 17, 2020
96e4329
pimd: don't use strcpy
qlyoung Apr 17, 2020
1120b95
lib: don't use strcpy
qlyoung Apr 18, 2020
1be1ca3
Merge pull request #6255 from mjstapp/fix_bitfield_free
qlyoung Apr 18, 2020
1ac10b1
lib: dont null check bitfield pointer before free
qlyoung Apr 18, 2020
16167b3
isisd: Prevent use after free for isis_adj_state_change
donaldsharp Apr 18, 2020
744ba56
ospf6d: Prevent use after free
donaldsharp Apr 18, 2020
c8eb691
Merge pull request #6258 from donaldsharp/more_scan_more
eqvinox Apr 18, 2020
7eea88e
Merge pull request #6257 from qlyoung/bitfield-no-null-check-before-free
eqvinox Apr 18, 2020
034cb57
Merge pull request #6256 from qlyoung/pimd-no-strcpy
eqvinox Apr 18, 2020
8b1e4f3
Merge pull request #6164 from ton31337/feature/rfc8212_enabled_tradit…
donaldsharp Apr 18, 2020
b34b48c
Merge pull request #6231 from dslicenc/v6-ra-hoplimit
ton31337 Apr 18, 2020
7f972cd
bgpd: Use true/false for reject_as_sets
ton31337 Apr 20, 2020
3c2fdd6
Merge pull request #6260 from ton31337/fix/01_to_bool
donaldsharp Apr 20, 2020
0355b41
bgpd: Do not discard an UPDATE if the global nexthop is set to ::
ton31337 Apr 20, 2020
e4195c0
Merge pull request #6245 from sworleys/NHG-More-Topo
Apr 20, 2020
2d3d652
Merge pull request #6251 from opensourcerouting/cs-ignore
donaldsharp Apr 20, 2020
73f079b
Merge pull request #6261 from ton31337/fix/allow_nhlen_32
donaldsharp Apr 20, 2020
4105169
lib/zlog: fix coverity warning
eqvinox Apr 20, 2020
d35c30c
doc: remove mailing list patch submission
eqvinox Apr 20, 2020
70395c6
Merge pull request #6263 from opensourcerouting/zlog-coverity-20200420
qlyoung Apr 20, 2020
3f0cc3f
tools: add more macros to cocci.h
qlyoung Apr 20, 2020
772270f
*: sprintf -> snprintf
qlyoung Apr 20, 2020
fc746f1
*: manually remove some more sprintf
qlyoung Apr 20, 2020
2b7165e
*: use appropriate buffer sizes, specifiers
qlyoung Apr 20, 2020
4ced1a2
bgpd, isis, tools: style fixen
qlyoung Apr 20, 2020
08cffeb
doc: document strcpy & sprintf ban
eqvinox Apr 20, 2020
70aa675
doc: add some Github workflow notes
eqvinox Apr 20, 2020
e805a96
Merge pull request #6147 from opensourcerouting/ldpd-broken-lsps
riw777 Apr 21, 2020
4b0e09d
ospf6d: fix SA warnings
Apr 21, 2020
af4c004
Merge pull request #6264 from opensourcerouting/doc-workflow-20200420
donaldsharp Apr 21, 2020
e15361b
Merge pull request #6253 from opensourcerouting/fpm-extra
qlyoung Apr 21, 2020
0880854
pimd, lib: suppress compiler warnings on snprintf
qlyoung Apr 21, 2020
64fbc17
Merge pull request #6267 from mjstapp/fix_ospf6_unlock_sa
qlyoung Apr 21, 2020
5d6299d
lib/atomlist: make C++ compatible
eqvinox Apr 21, 2020
6127ec9
lib/frrcu: make C++ compatible
eqvinox Apr 21, 2020
bda96cd
Merge pull request #6126 from sarav511/watermark
donaldsharp Apr 21, 2020
4c60e50
Merge pull request #6191 from NaveenThanikachalam/ibgp_connected
ton31337 Apr 21, 2020
3255e75
bgpd: handle fs nlri over 240 bytes
pguibert6WIND Apr 6, 2020
7952857
Merge pull request #6268 from opensourcerouting/atomlist-cxx-compat
donaldsharp Apr 22, 2020
58c3cdb
zebra: Cleanup dead code
donaldsharp Apr 21, 2020
e1c511c
ospfd: Limit possible message read to our buffer size
donaldsharp Apr 21, 2020
0f90b81
Merge pull request #6269 from donaldsharp/coverity_likes_coverity
ton31337 Apr 22, 2020
026f7db
doc: remove duplicated command documentation
rzalamena Apr 22, 2020
6d8589d
doc: improve FPM clear command doc
rzalamena Apr 22, 2020
9d866c0
zebra: Expose vrf lookup by table id out of rt_netlink.c
donaldsharp Mar 9, 2020
5e03119
zebra: Prevent awful misconfiguration in vrf's
donaldsharp Mar 9, 2020
ac8e400
pimd: Added a new field "rpAddress" in "show ip pim rp-info json
patrasar Apr 14, 2020
e4306dc
Merge pull request #5944 from donaldsharp/vrf_stoppage
riw777 Apr 22, 2020
da78700
yang: Defining yang files for pim
patrasar Apr 21, 2020
cd3b8cd
Merge pull request #6265 from patrasar/pim-yang
qlyoung Apr 22, 2020
78891ca
yang: Convert to `FRRouting` for organization
donaldsharp Apr 22, 2020
c6615ab
Merge pull request #6272 from opensourcerouting/duplicated-fpm-doc
qlyoung Apr 22, 2020
86ac1fa
Merge pull request #6242 from pguibert6WIND/flowspec_nlri_too_big
qlyoung Apr 22, 2020
f55c9a4
bgpd: Configuring default-originate withdraws default route
kssoman Apr 8, 2020
17e3820
lib, zebra: add missing extern "C" {} blocks to new header files
rwestphal Apr 20, 2020
e252fc2
Merge pull request #6275 from donaldsharp/fix_frr
louberger Apr 23, 2020
5e20fb8
Merge pull request #6025 from patrasar/rp-info-igmp-group-json-fix
ton31337 Apr 23, 2020
776e7cf
bgpd: Show PfxSnt for `show bgp <afi> <safi>` command
ton31337 Apr 22, 2020
6e0f904
tests: Adopt some tests to PfxSnt counter
ton31337 Apr 23, 2020
37a816b
Merge pull request #6278 from opensourcerouting/cpp-extern-blocks
donaldsharp Apr 23, 2020
9d694b0
ldpd: use a timer instead of sleeping in LM init
Apr 22, 2020
e17316e
Merge pull request #6184 from kssoman/route
sworleys Apr 23, 2020
c334a16
Merge pull request #6262 from qlyoung/remove-sprintf
eqvinox Apr 23, 2020
7a54a2c
Merge pull request #6277 from ton31337/feature/show_bgp_afi_safi_sndpfx
srimohans Apr 24, 2020
814f6fc
Merge pull request #6274 from mjstapp/fix_lde_blocking_sleep
odd22 Apr 24, 2020
d88cee1
yang: staticd yang modification
vishaldhingra Apr 24, 2020
8d63389
yang : nexthop vrf is addded as a key along with nh-type, gateway, in…
vishaldhingra Apr 24, 2020
3c1783b
yang : removed leafref to run CI/CD
vishaldhingra Apr 24, 2020
8782f87
lib : Yang wrapper added to get the parent dnode
vishaldhingra Apr 24, 2020
e357fa3
lib : basic-routing backend configuration northbound code
vishaldhingra Apr 24, 2020
44c01a5
staticd : Configuration northbound implementation
vishaldhingra Apr 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pimd: Implement watermark warning for igmp group count and add igmp g…
…roup count

This CLI will allow user to configure a igmp group limit which will generate
a watermark warning when reached.
Though watermark may not make sense without setting a limit, this
implementation shall serve as a base to implementing limit in future and helps
tracking a particular scale currently.

Testing:
=======

ip igmp watermark-warn <10-60000>

on reaching the configured number of group, pim will issue warning

2019/09/18 18:30:55 PIM: SCALE ALERT: igmp group count reached watermak limit: 210(vrf: default)

Also added group count and watermark limit configured on cli - show ip igmp groups [json]

<snip>

Sw3# sh ip igmp groups json
{
  "Total Groups":221,  <=====
  "Watermark limit":210, <=========
  "ens224":{
    "name":"ens224",
    "state":"up",
    "address":"40.0.0.1",
    "index":6,
    "flagMulticast":true,
    "flagBroadcast":true,
    "lanDelayEnabled":true,
    "groups":[
      {
        "source":"40.0.0.1",
        "group":"225.1.1.122",
        "timer":"00:03:56",
        "sourcesCount":1,
        "version":2,
        "uptime":"00:00:24"

<\snip>

<snip>

Sw3(config)# do sh ip igmp group
Total IGMP groups: 221
Watermark warn limit(Set) : 210
Interface        Address         Group           Mode Timer    Srcs V Uptime
ens224           40.0.0.1        225.1.1.122     ---- 00:04:06    1 2 00:13:22
ens224           40.0.0.1        225.1.1.144     ---- 00:04:02    1 2 00:13:22
ens224           40.0.0.1        225.1.1.57      ---- 00:04:01    1 2 00:13:22
ens224           40.0.0.1        225.1.1.210     ---- 00:04:06    1 2 00:13:22

<\snip>

Signed-off-by: Saravanan K <saravanank@vmware.com>
  • Loading branch information
sarav511 committed Apr 9, 2020
commit 339f76953034064934df5ff02702138f2d039803
45 changes: 43 additions & 2 deletions pimd/pim_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3419,11 +3419,19 @@ static void igmp_show_groups(struct pim_instance *pim, struct vty *vty, bool uj)

now = pim_time_monotonic_sec();

if (uj)
if (uj) {
json = json_object_new_object();
else
json_object_int_add(json, "totalGroups", pim->igmp_group_count);
json_object_int_add(json, "watermarkLimit",
pim->igmp_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);
vty_out(vty,
"Interface Address Group Mode Timer Srcs V Uptime \n");
}

/* scan interfaces */
FOR_ALL_INTERFACES (pim->vrf, ifp) {
Expand Down Expand Up @@ -6861,6 +6869,35 @@ DEFUN (no_ip_pim_packets,
return CMD_SUCCESS;
}

DEFPY (igmp_group_watermark,
igmp_group_watermark_cmd,
"ip igmp watermark-warn (10-60000)$limit",
IP_STR
IGMP_STR
"Configure group limit for watermark warning\n"
"Group count to generate watermark warning\n")
{
PIM_DECLVAR_CONTEXT(vrf, pim);
pim->igmp_watermark_limit = limit;

return CMD_SUCCESS;
}

DEFPY (no_igmp_group_watermark,
no_igmp_group_watermark_cmd,
"no ip igmp watermark-warn [(10-60000)$limit]",
NO_STR
IP_STR
IGMP_STR
"Unconfigure group limit for watermark warning\n"
"Group count to generate watermark warning\n")
{
PIM_DECLVAR_CONTEXT(vrf, pim);
pim->igmp_watermark_limit = 0;

return CMD_SUCCESS;
}

DEFUN (ip_pim_v6_secondary,
ip_pim_v6_secondary_cmd,
"ip pim send-v6-secondary",
Expand Down Expand Up @@ -10893,6 +10930,10 @@ void pim_cmd_init(void)
install_element(VRF_NODE, &no_ip_pim_ecmp_rebalance_cmd);
install_element(CONFIG_NODE, &ip_pim_mlag_cmd);
install_element(CONFIG_NODE, &no_ip_pim_mlag_cmd);
install_element(CONFIG_NODE, &igmp_group_watermark_cmd);
install_element(VRF_NODE, &igmp_group_watermark_cmd);
install_element(CONFIG_NODE, &no_igmp_group_watermark_cmd);
install_element(VRF_NODE, &no_igmp_group_watermark_cmd);

install_element(INTERFACE_NODE, &interface_ip_igmp_cmd);
install_element(INTERFACE_NODE, &interface_no_ip_igmp_cmd);
Expand Down
36 changes: 36 additions & 0 deletions pimd/pim_igmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,39 @@ static void igmp_group_free(struct igmp_group *group)
XFREE(MTYPE_PIM_IGMP_GROUP, group);
}

static void igmp_group_count_incr(struct igmp_sock *igmp)
{
struct pim_interface *pim_ifp = igmp->interface->info;

if (!pim_ifp)
return;

++pim_ifp->pim->igmp_group_count;
if (pim_ifp->pim->igmp_group_count
== pim_ifp->pim->igmp_watermark_limit) {
zlog_warn(
"IGMP group count reached watermark limit: %u(vrf: %s)",
pim_ifp->pim->igmp_group_count,
VRF_LOGNAME(pim_ifp->pim->vrf));
}
}

static void igmp_group_count_decr(struct igmp_sock *igmp)
{
struct pim_interface *pim_ifp = igmp->interface->info;

if (!pim_ifp)
return;

if (pim_ifp->pim->igmp_group_count == 0) {
zlog_warn("Cannot decrement igmp group count below 0(vrf: %s)",
VRF_LOGNAME(pim_ifp->pim->vrf));
return;
}

--pim_ifp->pim->igmp_group_count;
}

void igmp_group_delete(struct igmp_group *group)
{
struct listnode *src_node;
Expand All @@ -778,6 +811,7 @@ void igmp_group_delete(struct igmp_group *group)
}

group_timer_off(group);
igmp_group_count_decr(group->group_igmp_sock);
listnode_delete(group->group_igmp_sock->igmp_group_list, group);
hash_release(group->group_igmp_sock->igmp_group_hash, group);

Expand Down Expand Up @@ -1158,6 +1192,8 @@ struct igmp_group *igmp_add_group_by_addr(struct igmp_sock *igmp,
group_str, igmp->fd, igmp->interface->name);
}

igmp_group_count_incr(igmp);

/*
RFC 3376: 6.2.2. Definition of Group Timers

Expand Down
2 changes: 2 additions & 0 deletions pimd/pim_instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ struct pim_instance {
struct list *ssmpingd_list;
struct in_addr ssmpingd_group_addr;

unsigned int igmp_group_count;
unsigned int igmp_watermark_limit;
unsigned int keep_alive_time;
unsigned int rp_keep_alive_time;

Expand Down
7 changes: 7 additions & 0 deletions pimd/pim_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,13 @@ int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty)
vty_out(vty, "%sip pim ecmp\n", spaces);
++writes;
}

if (pim->igmp_watermark_limit != 0) {
vty_out(vty, "%sip igmp watermark-warn %u\n", spaces,
pim->igmp_watermark_limit);
++writes;
}

if (pim->ssmpingd_list) {
struct listnode *node;
struct ssmpingd_sock *ss;
Expand Down