]> git.puffer.fish Git - mirror/frr.git/commit
lib: optimize vrf_id_to_name(VRF_DEFAULT) case
authorChristophe Gouault <christophe.gouault@6wind.com>
Wed, 26 Aug 2020 14:26:49 +0000 (16:26 +0200)
committerIgor Ryzhov <iryzhov@nfware.com>
Tue, 6 Oct 2020 12:54:25 +0000 (15:54 +0300)
commitb33d3f486c66e83cb60786689897e6d5ea6d943d
tree37987c332e18dc5053af7302c67c48be2d3380e5
parent59a390f4eb92ee69a2e533e3bac1f7228d37ccc4
lib: optimize vrf_id_to_name(VRF_DEFAULT) case

vrf_id_to_name() looks up in a RB_TREE to find the VRF entry, then
reads the name.

Avoid it for VRF_DEFAULT, which always exists and for which the
translation is straightforward.

Signed-off-by: Christophe Gouault <christophe.gouault@6wind.com>
lib/vrf.c