aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/fib_entry_src.h
AgeCommit message (Collapse)AuthorFilesLines
2019-07-28fib: add invalid source type and fix debug logBenoît Ganne1-2/+3
Add the FIB_SOURCE_INVALID fib source type. This allows to spot uninitialized fib source more easily (0 no longer means special) and we can use it as placeholder when no source is present. Use it to fix FIB_ENTRY_DBG() which was accessing the 1st source, even when no sources were present. Type: fix Fixes: 710071bf0e Change-Id: I980b6a6a07616d4a8d6f2db166a1dd335721c74d Signed-off-by: Benoît Ganne <bganne@cisco.com>
2018-10-16FIB: use vlib-log for debuggingNeale Ranns1-15/+12
Change-Id: I9052202b8cbcf656e61d635253d515f0f3a8d145 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-20FIB Interpose SourceNeale Ranns1-13/+55
The interpose source allows the source/provider to insert/interpose a DPO in the forwarding chain of the FIB entry ahead of the forwarding provided by the next best source. For example if the API source (i.e the 'control plane') has provided an adjacency for forwarding, then an interpose source (e.g. a monitoring service) couold interpose a replicatte DPO to copy the traffic to another location AND forward using the API's adjacency. To use the interose feature an existing source (i.e FIB_SOURCE_PLUGIN_HI) cn specifiy as a flag FIB_ENTRY_FLAG_INTERPOSE and provide a DPO to interpose. One might also consider using interpose in conjunction with FIB_ENTRY_FLAG_COVER_INHERIT to ensure the interpose object affects all prefixes in the sub-tree. Change-Id: I8b2737b985f8f7c08123406d0491881def347b52 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-01-18FIB Inherited SrouceNeale Ranns1-0/+18
forwarding provided by the source is pushed to all other entries it covers in the sub-tree Change-Id: I2a45222ef653358f55c2436de3e3c6353cfadba2 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-12-05Revert "FIB: optimise for src memory allocations"Neale Ranns1-48/+22
This reverts commit 84517cfd1508f6da24937f310f7fffe752f22584. Change-Id: Ic7eeffa2ed4607d3d653f34b93c20c833c789ee1 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-11-26FIB: optimise for src memory allocationsNeale Ranns1-22/+48
Most FIB entries will only ever have one source providing forwarding information. Currently the source infom is stored in a vector of sources on the FIB entry. Change this to a union of one source inline and a vector. This saves the need to alloc a vector of sources for each FIB entry. before: vpp# ip route add count 1500000 1.0.0.1/32 via 10.10.10.2 loop0 4.392857e5 routes/sec vpp# ip route del count 1500000 1.0.0.1/32 via 10.10.10.2 loop0 9.175464e5 routes/sec vpp# ip route add count 1500000 1.0.0.1/32 via 10.10.10.2 loop0 5.193375e5 routes/sec vpp# sh fib mem FIB memory Name Size in-use /allocated totals Entry 72 1500011/ 1500011 108000792/108000792 Entry Source 32 1500011/ 1500011 48000352/48000352 after: vpp# ip route add count 1500000 1.0.0.1/32 via 10.10.10.2 loop0 4.726560e5 routes/sec vpp# ip route del count 1500000 1.0.0.1/32 via 10.10.10.2 loop0 1.041629e6 routes/sec vpp# ip route add count 1500000 1.0.0.1/32 via 10.10.10.2 loop0 5.702895e5 routes/sec vpp# sh fib mem FIB memory Name Size in-use /allocated totals Entry 96 1500011/ 1500011 144001056/144001056 Entry Source 32 0 / 0 0/0 Change-Id: Ic71e413eaff1ec152656beda3b94186f7894ea49 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-08L2 over MPLSNeale Ranns1-1/+3
[support for VPWS/VPLS] - switch to using dpo_proto_t rather than fib_protocol_t in fib_paths so that we can describe L2 paths - VLIB nodes to handle pop/push of MPLS labels to L2 Change-Id: Id050d06a11fd2c9c1c81ce5a0654e6c5ae6afa6e Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+296
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>