X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ffib%2Ffib_node.c;h=54c300aec1e45aca7a9cb0f504d297dfd16004c0;hb=630b9741659b9a4b68c64ebbeb675761c6f26842;hp=db3e22bb3b8cf4921ac6cacb7e91bdd950cd61db;hpb=020df9a7a55ebf9e06db3f24982efe5fdd68ebb9;p=vpp.git diff --git a/src/vnet/fib/fib_node.c b/src/vnet/fib/fib_node.c index db3e22bb3b8..54c300aec1e 100644 --- a/src/vnet/fib/fib_node.c +++ b/src/vnet/fib/fib_node.c @@ -183,14 +183,11 @@ void fib_node_init (fib_node_t *node, fib_node_type_t type) { -#if CLIB_DEBUG > 0 /** - * The node's type. make sure we are dynamic/down casting correctly + * The node's type. used to retrieve the VFT. */ node->fn_type = type; -#endif node->fn_locks = 0; - node->fn_vft = &fn_vfts[type]; node->fn_children = FIB_NODE_INDEX_INVALID; } @@ -213,7 +210,7 @@ fib_node_unlock (fib_node_t *node) if (0 == node->fn_locks) { - node->fn_vft->fnv_last_lock(node); + fn_vfts[node->fn_type].fnv_last_lock(node); } }