summaryrefslogtreecommitdiffstats
path: root/staticd/static_nb.c
diff options
context:
space:
mode:
authorChirag Shah <chirag@nvidia.com>2021-01-13 18:02:32 +0100
committerChirag Shah <chirag@nvidia.com>2021-01-13 18:24:25 +0100
commit6dfc022ff2a16614541f801e8539c6f785eea1ff (patch)
treeccf1cdf8c72b15d489c20b6cf7a826c425a8c0bb /staticd/static_nb.c
parentyang: remove when condition from static nexthop om (diff)
downloadfrr-6dfc022ff2a16614541f801e8539c6f785eea1ff.tar.xz
frr-6dfc022ff2a16614541f801e8539c6f785eea1ff.zip
staticd: handle when condition check in nb callbacks
At present, libyang validate api takes longer time to complete for a transaction to complete if the same config is re-applied. For instance if set of static routes are reapplied the config completion takes longer than it took initial time. One of the solution is to remove when statement from staticd nexthop yang OM. When condition adds peformance toll on libyang's validate api. The same when condition checks are done in frr northbound validation phase (which are must faster). With this change, if the same static routes are configured agian and again, the time to completion does not go up and perfomance does not degrade. Ticket:CM-32530 Testing Done: Configure 400 static routes across two vrfs and keep re-applying them. The time to complete the config remains in few seconds. Before: root@bharat:~/stash/frr4# time vtysh -f static_route_cfg real 0m19.877s user 0m0.263s sys 0m0.014s After: root@bharat:~/stash/frr4# time vtysh -f static_route_cfg real 0m3.857s user 0m0.239s sys 0m0.034s Co-developed-by: VishalDhingra <vdhingra@vmware.com> Signed-off-by: Chirag Shah <chirag@nvidia.com>
Diffstat (limited to 'staticd/static_nb.c')
-rw-r--r--staticd/static_nb.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/staticd/static_nb.c b/staticd/static_nb.c
index 51704426f..201002036 100644
--- a/staticd/static_nb.c
+++ b/staticd/static_nb.c
@@ -72,7 +72,6 @@ const struct frr_yang_module_info frr_staticd_info = {
.xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/onlink",
.cbs = {
.modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_onlink_modify,
- .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_onlink_destroy,
}
},
{
@@ -157,7 +156,6 @@ const struct frr_yang_module_info frr_staticd_info = {
.xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/onlink",
.cbs = {
.modify = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_onlink_modify,
- .destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_onlink_destroy,
}
},
{