]> git.puffer.fish Git - matthieu/frr.git/commit
yang: use relative path instead of absolute one for route-map
authorLoïc Sang <loic.sang@6wind.com>
Tue, 28 May 2024 16:27:40 +0000 (18:27 +0200)
committerLoïc Sang <loic.sang@6wind.com>
Wed, 29 May 2024 11:11:03 +0000 (13:11 +0200)
commitf1ea52bee98c03daaefc0fb35aaa64566759160e
tree83919160748788dacd973fb099a649dea90f8240
parentf8abf9644063aa8817dc434bc70a6a505672a6eb
yang: use relative path instead of absolute one for route-map

Using absolute xpath is not optimal for finding the target node. As the
route map configuration grows, the yang validation will take more time
to complete. Relative paths are much faster.

Tested with a config file that contains ~3k route map config lines.
- before:
time cat conf | vtysh
configure
log syslog errors
router bgp 65000
!
route-map RM:BGP:VPNV4:PEER:VRR9:IN10001 permit 101
 match community CL:HCC:PATH_PRIO1_EAST1
  set local-preference 15200
!
...
route-map RM:BGP:VPNV4:PEER:VRR9:IN10001 permit 1182
 match community CL:HCC:PATH_PRIO1_EAST1082
 set local-preference 16281
!

real    13m51.500s
user    0m0.522s
sys     0m4.854s

- after:
time cat conf | vtysh
...
real    0m48.390s
user    0m0.384s
sys     0m1.245s

Signed-off-by: Loïc Sang <loic.sang@6wind.com>
yang/frr-bgp-route-map.yang
yang/frr-ospf-route-map.yang
yang/frr-ospf6-route-map.yang