diff options
author | Christian Hopps <chopps@labn.net> | 2023-11-29 20:37:23 +0100 |
---|---|---|
committer | Christian Hopps <chopps@labn.net> | 2023-11-29 20:37:23 +0100 |
commit | 2c01083d35263fb3121340cc01f3b545075ae8e6 (patch) | |
tree | 9e0aa21dd96e59c7c4cbd24bd6b3f97f01deb75b /eigrpd/eigrp_northbound.c | |
parent | Merge pull request #14906 from Keelan10/bgp_confederation-leak (diff) | |
download | frr-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 'eigrpd/eigrp_northbound.c')
-rw-r--r-- | eigrpd/eigrp_northbound.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/eigrpd/eigrp_northbound.c b/eigrpd/eigrp_northbound.c index f50abb7e4..562c292e2 100644 --- a/eigrpd/eigrp_northbound.c +++ b/eigrpd/eigrp_northbound.c @@ -28,18 +28,18 @@ static void redistribute_get_metrics(const struct lyd_node *dnode, { memset(em, 0, sizeof(*em)); - if (yang_dnode_exists(dnode, "./bandwidth")) - em->bandwidth = yang_dnode_get_uint32(dnode, "./bandwidth"); - if (yang_dnode_exists(dnode, "./delay")) - em->delay = yang_dnode_get_uint32(dnode, "./delay"); + if (yang_dnode_exists(dnode, "bandwidth")) + em->bandwidth = yang_dnode_get_uint32(dnode, "bandwidth"); + if (yang_dnode_exists(dnode, "delay")) + em->delay = yang_dnode_get_uint32(dnode, "delay"); #if 0 /* TODO: How does MTU work? */ - if (yang_dnode_exists(dnode, "./mtu")) - em->mtu[0] = yang_dnode_get_uint32(dnode, "./mtu"); + if (yang_dnode_exists(dnode, "mtu")) + em->mtu[0] = yang_dnode_get_uint32(dnode, "mtu"); #endif - if (yang_dnode_exists(dnode, "./load")) - em->load = yang_dnode_get_uint32(dnode, "./load"); - if (yang_dnode_exists(dnode, "./reliability")) - em->reliability = yang_dnode_get_uint32(dnode, "./reliability"); + if (yang_dnode_exists(dnode, "load")) + em->load = yang_dnode_get_uint32(dnode, "load"); + if (yang_dnode_exists(dnode, "reliability")) + em->reliability = yang_dnode_get_uint32(dnode, "reliability"); } static struct eigrp_interface *eigrp_interface_lookup(const struct eigrp *eigrp, @@ -73,7 +73,7 @@ static int eigrpd_instance_create(struct nb_cb_create_args *args) /* NOTHING */ break; case NB_EV_PREPARE: - vrf = yang_dnode_get_string(args->dnode, "./vrf"); + vrf = yang_dnode_get_string(args->dnode, "vrf"); pVrf = vrf_lookup_by_name(vrf); if (pVrf) @@ -81,7 +81,7 @@ static int eigrpd_instance_create(struct nb_cb_create_args *args) else vrfid = VRF_DEFAULT; - eigrp = eigrp_get(yang_dnode_get_uint16(args->dnode, "./asn"), + eigrp = eigrp_get(yang_dnode_get_uint16(args->dnode, "asn"), vrfid); args->resource->ptr = eigrp; break; @@ -715,7 +715,7 @@ static int eigrpd_instance_redistribute_create(struct nb_cb_create_args *args) switch (args->event) { case NB_EV_VALIDATE: - proto = yang_dnode_get_enum(args->dnode, "./protocol"); + proto = yang_dnode_get_enum(args->dnode, "protocol"); vrfname = yang_dnode_get_string(args->dnode, "../vrf"); pVrf = vrf_lookup_by_name(vrfname); @@ -733,7 +733,7 @@ static int eigrpd_instance_redistribute_create(struct nb_cb_create_args *args) break; case NB_EV_APPLY: eigrp = nb_running_get_entry(args->dnode, NULL, true); - proto = yang_dnode_get_enum(args->dnode, "./protocol"); + proto = yang_dnode_get_enum(args->dnode, "protocol"); redistribute_get_metrics(args->dnode, &metrics); eigrp_redistribute_set(eigrp, proto, metrics); break; @@ -755,7 +755,7 @@ static int eigrpd_instance_redistribute_destroy(struct nb_cb_destroy_args *args) break; case NB_EV_APPLY: eigrp = nb_running_get_entry(args->dnode, NULL, true); - proto = yang_dnode_get_enum(args->dnode, "./protocol"); + proto = yang_dnode_get_enum(args->dnode, "protocol"); eigrp_redistribute_unset(eigrp, proto); break; } @@ -1120,7 +1120,7 @@ static int lib_interface_eigrp_instance_create(struct nb_cb_create_args *args) break; } - eigrp = eigrp_get(yang_dnode_get_uint16(args->dnode, "./asn"), + eigrp = eigrp_get(yang_dnode_get_uint16(args->dnode, "asn"), ifp->vrf->vrf_id); eif = eigrp_interface_lookup(eigrp, ifp->name); if (eif == NULL) @@ -1132,7 +1132,7 @@ static int lib_interface_eigrp_instance_create(struct nb_cb_create_args *args) break; case NB_EV_APPLY: ifp = nb_running_get_entry(args->dnode, NULL, true); - eigrp = eigrp_get(yang_dnode_get_uint16(args->dnode, "./asn"), + eigrp = eigrp_get(yang_dnode_get_uint16(args->dnode, "asn"), ifp->vrf->vrf_id); eif = eigrp_interface_lookup(eigrp, ifp->name); if (eif == NULL) |