aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/udp/udp_encap.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-11-25 10:04:32 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-11-26 19:16:30 +0000
commit630b9741659b9a4b68c64ebbeb675761c6f26842 (patch)
treea47618e43d9b0598b1be3f8804fd5a139034c782 /src/vnet/udp/udp_encap.c
parent020df9a7a55ebf9e06db3f24982efe5fdd68ebb9 (diff)
FIB: store the node type not the function pointer.
Saves memory at no appreciable performance cost. before: DBGvpp# sh fib mem FIB memory Name Size in-use /allocated totals Entry 80 7 / 150 560/12000 after: DBGvpp# sh fib mem FIB memory Name Size in-use /allocated totals Entry 72 7 / 7 504/504 Change-Id: Ic5d3920ceb57b54260dc9af2078c26484335fef1 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/udp/udp_encap.c')
-rw-r--r--src/vnet/udp/udp_encap.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/vnet/udp/udp_encap.c b/src/vnet/udp/udp_encap.c
index 98b824ba866..2999d4a73ce 100644
--- a/src/vnet/udp/udp_encap.c
+++ b/src/vnet/udp/udp_encap.c
@@ -325,9 +325,7 @@ format_udp_encap (u8 * s, va_list * args)
static udp_encap_t *
udp_encap_from_fib_node (fib_node_t * node)
{
-#if (CLIB_DEBUG > 0)
ASSERT (FIB_NODE_TYPE_UDP_ENCAP == node->fn_type);
-#endif
return ((udp_encap_t *) (((char *) node) -
STRUCT_OFFSET_OF (udp_encap_t, ue_fib_node)));
}