fib: fib api updates 96/12296/42
authorNeale Ranns <neale.ranns@cisco.com>
Tue, 1 May 2018 12:17:55 +0000 (05:17 -0700)
committerOle Trøan <otroan@employees.org>
Tue, 18 Jun 2019 13:31:39 +0000 (13:31 +0000)
commit097fa66b986f06281f603767d321ab13ab6c88c3
treeed052819615d08ee4bd0afbc34de7e64e4598105
parent39baa32186fd3e4b20d9f58afbbfe7b8daebed62
fib: fib api updates

Enhance the route add/del APIs to take a set of paths rather than just one.
Most unicast routing protocols calcualte all the available paths in one
run of the algorithm so updating all the paths at once is beneficial for the client.
two knobs control the behaviour:
  is_multipath - if set the the set of paths passed will be added to those
                 that already exist, otherwise the set will replace them.
  is_add - add or remove the set

is_add=0, is_multipath=1 and an empty set, results in deleting the route.

It is also considerably faster to add multiple paths at once, than one at a time:

vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.11
100000 routes in .572240 secs, 174751.80 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.12
100000 routes in .528383 secs, 189256.54 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.13
100000 routes in .757131 secs, 132077.52 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.14
100000 routes in .878317 secs, 113854.12 routes/sec

vat# ip_route_add_del 1.1.1.1/32 count 100000 multipath via 10.10.10.11 via 10.10.10.12 via 10.10.10.13 via 10.10.10.14
100000 routes in .900212 secs, 111084.93 routes/sec

Change-Id: I416b93f7684745099c1adb0b33edac58c9339c1a
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
133 files changed:
extras/vom/vom/api_types.cpp
extras/vom/vom/api_types.hpp
extras/vom/vom/interface.cpp
extras/vom/vom/mroute_cmds.cpp
extras/vom/vom/mroute_cmds.hpp
extras/vom/vom/neighbour.hpp
extras/vom/vom/neighbour_cmds.cpp
extras/vom/vom/neighbour_cmds.hpp
extras/vom/vom/prefix.cpp
extras/vom/vom/prefix.hpp
extras/vom/vom/route.cpp
extras/vom/vom/route.hpp
extras/vom/vom/route_api_types.cpp
extras/vom/vom/route_api_types.hpp
extras/vom/vom/route_cmds.cpp
extras/vom/vom/route_cmds.hpp
extras/vom/vom/route_domain.cpp
extras/vom/vom/route_domain.hpp
extras/vom/vom/route_domain_cmds.cpp
extras/vom/vom/route_domain_cmds.hpp
extras/vom/vom/srpc_cmd.hpp [new file with mode: 0644]
src/plugins/abf/abf.api
src/plugins/abf/abf_api.c
src/plugins/abf/abf_error.def
src/plugins/abf/abf_itf_attach.c
src/plugins/gtpu/gtpu.c
src/plugins/igmp/igmp.c
src/plugins/igmp/igmp_proxy.c
src/plugins/l3xc/l3xc_api.c
src/plugins/unittest/bier_test.c
src/plugins/unittest/mfib_test.c
src/tools/vppapigen/vppapigen.py
src/vat/api_format.c
src/vnet/CMakeLists.txt
src/vnet/api_errno.h
src/vnet/bier/bier.api
src/vnet/bier/bier_api.c
src/vnet/bier/bier_entry.c
src/vnet/bier/bier_fmask.c
src/vnet/bier/bier_fmask.h
src/vnet/bier/bier_table.c
src/vnet/dhcp/dhcp6_proxy_node.c
src/vnet/dpo/mpls_disposition.c
src/vnet/fib/fib_api.c
src/vnet/fib/fib_api.h
src/vnet/fib/fib_entry.c
src/vnet/fib/fib_entry.h
src/vnet/fib/fib_entry_src.c
src/vnet/fib/fib_path.c
src/vnet/fib/fib_path.h
src/vnet/fib/fib_path_list.c
src/vnet/fib/fib_path_list.h
src/vnet/fib/fib_table.c
src/vnet/fib/fib_types.api
src/vnet/fib/fib_types.c
src/vnet/fib/fib_types.h
src/vnet/fib/mpls_fib.c
src/vnet/geneve/geneve.c
src/vnet/ip/ip.api
src/vnet/ip/ip_api.c
src/vnet/ip/ip_types_api.c
src/vnet/ip/lookup.c
src/vnet/mfib/ip6_mfib.c
src/vnet/mfib/mfib_api.c [new file with mode: 0644]
src/vnet/mfib/mfib_api.h [new file with mode: 0644]
src/vnet/mfib/mfib_entry.c
src/vnet/mfib/mfib_entry.h
src/vnet/mfib/mfib_table.c
src/vnet/mfib/mfib_table.h
src/vnet/mfib/mfib_types.api [new file with mode: 0644]
src/vnet/mpls/mpls.api
src/vnet/mpls/mpls_api.c
src/vnet/mpls/mpls_tunnel.c
src/vnet/udp/udp_encap.c
src/vnet/vxlan-gbp/vxlan_gbp.c
src/vnet/vxlan-gpe/vxlan_gpe.c
src/vnet/vxlan/vxlan.c
src/vpp/api/api.c
src/vpp/api/custom_dump.c
src/vpp/api/types.c
src/vpp/api/types.h
test/remote_test.py
test/test_abf.py
test/test_bfd.py
test/test_bier.py
test/test_classifier.py
test/test_dhcp6.py
test/test_dvr.py
test/test_gbp.py
test/test_geneve.py
test/test_gre.py
test/test_gtpu.py
test/test_interface_crud.py
test/test_ip4.py
test/test_ip4_vrf_multi_instance.py
test/test_ip6.py
test/test_ip6_vrf_multi_instance.py
test/test_ip_ecmp.py
test/test_ip_mcast.py
test/test_ipip.py
test/test_ipsec_ah.py
test/test_ipsec_esp.py
test/test_ipsec_nat.py
test/test_ipsec_tun_if_esp.py
test/test_l3xc.py
test/test_lb.py
test/test_map.py
test/test_memif.py
test/test_mpls.py
test/test_mtu.py
test/test_nat.py
test/test_neighbor.py
test/test_p2p_ethernet.py
test/test_punt.py
test/test_qos.py
test/test_reassembly.py
test/test_sixrd.py
test/test_srv6.py
test/test_srv6_ad.py
test/test_srv6_as.py
test/test_udp.py
test/test_vcl.py
test/test_vxlan.py
test/test_vxlan6.py
test/test_vxlan_gbp.py
test/test_vxlan_gpe.py
test/vpp_bier.py
test/vpp_interface.py
test/vpp_ip.py
test/vpp_ip_route.py
test/vpp_memif.py
test/vpp_mpls_tunnel_interface.py
test/vpp_papi_provider.py