diff options
author | Neale Ranns <nranns@cisco.com> | 2017-02-02 02:18:18 -0800 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2017-02-02 14:27:13 +0000 |
commit | a9374df5f351d25e968f5f90a827796203cbafdd (patch) | |
tree | 7876e45e388ebc739722777c1cadcf666dda6439 /src/vnet/mfib/mfib_table.h | |
parent | ed0e49c51841e84c72a5bb2c6d538ee779b734d4 (diff) |
Fix SR multicast post mfib commit
1 - use the SR policy to construct the replicate DPO. Each bucket therein is a SR tunnel.
2 - install a special mfib entry that links via this replicate
3 - forwarding is now mfib-lookup -> replicate -> sr_rewrite (per-tunnel)
no need for a separate sr_replicate node.
4 - Stack the sr tunnel on the forwarding DPO of the first-hop FIB entry.
no need for a second lookup post SR encap.
5 - fix some path-list lock leaks in the MFIB entry.
Change-Id: I20de96ea4c4be4fae252625bde159d9c435c8315
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/mfib/mfib_table.h')
-rw-r--r-- | src/vnet/mfib/mfib_table.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/vnet/mfib/mfib_table.h b/src/vnet/mfib/mfib_table.h index 4faa69ee999..4c51b70fd72 100644 --- a/src/vnet/mfib/mfib_table.h +++ b/src/vnet/mfib/mfib_table.h @@ -18,6 +18,7 @@ #include <vnet/ip/ip.h> #include <vnet/adj/adj.h> +#include <vnet/dpo/replicate_dpo.h> #include <vnet/mfib/mfib_types.h> @@ -214,6 +215,37 @@ extern void mfib_table_entry_delete_index(fib_node_index_t entry_index, /** * @brief + * Add a 'special' entry to the mFIB that links to the DPO passed + * A special entry is an entry that the FIB is not expect to resolve + * via the usual mechanisms (i.e. recurisve or neighbour adj DB lookup). + * Instead the client/source provides the index of a replicate DPO to link to. + * + * @param fib_index + * The index of the FIB + * + * @param prefix + * The prefix to add + * + * @param source + * The ID of the client/source adding the entry. + * + * @param flags + * Flags for the entry. + * + * @param rep_dpo + * The replicate DPO index to link to. + * + * @return + * the index of the fib_entry_t that is created (or existed already). + */ +extern fib_node_index_t mfib_table_entry_special_add(u32 fib_index, + const mfib_prefix_t *prefix, + mfib_source_t source, + mfib_entry_flags_t flags, + index_t rep_dpo); + +/** + * @brief * Flush all entries from a table for the source * * @param fib_index |