summaryrefslogtreecommitdiffstats
path: root/zebra
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2023-11-29 20:37:23 +0100
committerChristian Hopps <chopps@labn.net>2023-11-29 20:37:23 +0100
commit2c01083d35263fb3121340cc01f3b545075ae8e6 (patch)
tree9e0aa21dd96e59c7c4cbd24bd6b3f97f01deb75b /zebra
parentMerge pull request #14906 from Keelan10/bgp_confederation-leak (diff)
downloadfrr-2c01083d35263fb3121340cc01f3b545075ae8e6.tar.xz
frr-2c01083d35263fb3121340cc01f3b545075ae8e6.zip
lib: all: remove './' from xpath 22% speedup
fixes #8299 Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'zebra')
-rw-r--r--zebra/interface.c8
-rw-r--r--zebra/zebra_nb_config.c14
2 files changed, 11 insertions, 11 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 58a28c607..c4a952e1a 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -4804,11 +4804,11 @@ static int ag_iter_cb(const struct lyd_node *dnode, void *arg)
void cli_show_legacy_admin_group(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
- if (!yang_dnode_exists(dnode, "./legacy-admin-group"))
+ if (!yang_dnode_exists(dnode, "legacy-admin-group"))
return;
vty_out(vty, " admin-group 0x%x\n",
- yang_dnode_get_uint32(dnode, "./legacy-admin-group"));
+ yang_dnode_get_uint32(dnode, "legacy-admin-group"));
}
void cli_show_affinity_mode(struct vty *vty, const struct lyd_node *dnode,
@@ -4825,11 +4825,11 @@ void cli_show_affinity_mode(struct vty *vty, const struct lyd_node *dnode,
void cli_show_affinity(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
- if (!yang_dnode_exists(dnode, "./affinity"))
+ if (!yang_dnode_exists(dnode, "affinity"))
return;
vty_out(vty, " affinity");
- yang_dnode_iterate(ag_iter_cb, vty, dnode, "./affinity");
+ yang_dnode_iterate(ag_iter_cb, vty, dnode, "affinity");
vty_out(vty, "\n");
}
diff --git a/zebra/zebra_nb_config.c b/zebra/zebra_nb_config.c
index 4d3e4c63e..50caaa819 100644
--- a/zebra/zebra_nb_config.c
+++ b/zebra/zebra_nb_config.c
@@ -830,8 +830,8 @@ int lib_interface_zebra_ip_addrs_create(struct nb_cb_create_args *args)
struct interface *ifp;
struct prefix prefix;
- // addr_family = yang_dnode_get_enum(dnode, "./address-family");
- yang_dnode_get_prefix(&prefix, args->dnode, "./ip-prefix");
+ // addr_family = yang_dnode_get_enum(dnode, "address-family");
+ yang_dnode_get_prefix(&prefix, args->dnode, "ip-prefix");
apply_mask(&prefix);
switch (args->event) {
@@ -870,7 +870,7 @@ int lib_interface_zebra_ip_addrs_destroy(struct nb_cb_destroy_args *args)
struct prefix prefix;
struct connected *ifc;
- yang_dnode_get_prefix(&prefix, args->dnode, "./ip-prefix");
+ yang_dnode_get_prefix(&prefix, args->dnode, "ip-prefix");
apply_mask(&prefix);
switch (args->event) {
@@ -1033,7 +1033,7 @@ int lib_interface_zebra_link_detect_modify(struct nb_cb_modify_args *args)
bool link_detect;
ifp = nb_running_get_entry(args->dnode, NULL, true);
- link_detect = yang_dnode_get_bool(args->dnode, "./link-detect");
+ link_detect = yang_dnode_get_bool(args->dnode, "link-detect");
if_linkdetect(ifp, link_detect);
@@ -1049,7 +1049,7 @@ int lib_interface_zebra_link_detect_destroy(struct nb_cb_destroy_args *args)
bool link_detect;
ifp = nb_running_get_entry(args->dnode, NULL, true);
- link_detect = yang_dnode_get_bool(args->dnode, "./link-detect");
+ link_detect = yang_dnode_get_bool(args->dnode, "link-detect");
if_linkdetect(ifp, link_detect);
@@ -1143,7 +1143,7 @@ int lib_interface_zebra_bandwidth_modify(struct nb_cb_modify_args *args)
uint32_t bandwidth;
ifp = nb_running_get_entry(args->dnode, NULL, true);
- bandwidth = yang_dnode_get_uint32(args->dnode, "./bandwidth");
+ bandwidth = yang_dnode_get_uint32(args->dnode, "bandwidth");
ifp->bandwidth = bandwidth;
@@ -1465,7 +1465,7 @@ int lib_vrf_zebra_l3vni_id_modify(struct nb_cb_modify_args *args)
* if zebra vrf already mapped to different vni id.
*/
pn_dnode = yang_dnode_get_parent(args->dnode, "vrf");
- vrfname = yang_dnode_get_string(pn_dnode, "./name");
+ vrfname = yang_dnode_get_string(pn_dnode, "name");
zvrf = zebra_vrf_lookup_by_name(vrfname);
if (!zvrf) {
snprintf(args->errmsg, args->errmsg_len,