FIB: store the node type not the function pointer. 68/9568/2
authorNeale Ranns <nranns@cisco.com>
Sat, 25 Nov 2017 18:04:32 +0000 (10:04 -0800)
committerDamjan Marion <dmarion.lists@gmail.com>
Sun, 26 Nov 2017 19:16:30 +0000 (19:16 +0000)
commit630b9741659b9a4b68c64ebbeb675761c6f26842
treea47618e43d9b0598b1be3f8804fd5a139034c782
parent020df9a7a55ebf9e06db3f24982efe5fdd68ebb9
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>
13 files changed:
src/vnet/fib/fib_entry.c
src/vnet/fib/fib_node.c
src/vnet/fib/fib_node.h
src/vnet/fib/fib_path.c
src/vnet/fib/fib_path_list.c
src/vnet/geneve/geneve.c
src/vnet/gre/interface.c
src/vnet/map/map.c
src/vnet/mfib/mfib_entry.c
src/vnet/mpls/mpls_tunnel.c
src/vnet/udp/udp_encap.c
src/vnet/vxlan-gpe/vxlan_gpe.c
src/vnet/vxlan/vxlan.c