diff options
author | Neale Ranns <nranns@cisco.com> | 2016-11-22 17:07:28 +0000 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2017-01-27 19:53:46 +0000 |
commit | 32e1c010b0c34fd0984f7fc45fae648a182025c5 (patch) | |
tree | 06a440bdc9dc039ad0dcf866acc9e10a6ea5e2e7 /src/vnet/ip/ip4.h | |
parent | 6f692d6e5a8ffc920a728372ef773199bc5466c0 (diff) |
IP Multicast FIB (mfib)
- IPv[46] mfib tables with support for (*,G/m), (*,G) and (S,G) exact and longest prefix match
- Replication represented via a new replicate DPO.
- RPF configuration and data-plane checking
- data-plane signals sent to listening control planes.
The functions of multicast forwarding entries differ from their unicast conterparts, so we introduce a new mfib_table_t and mfib_entry_t objects. However, we re-use the fib_path_list to resolve and build the entry's output list. the fib_path_list provides the service to construct a replicate DPO for multicast.
'make tests' is added to with two new suites; TEST=mfib, this is invocation of the CLI command 'test mfib' which deals with many path add/remove, flag set/unset scenarios, TEST=ip-mcast, data-plane forwarding tests.
Updated applications to use the new MIFB functions;
- IPv6 NS/RA.
- DHCPv6
unit tests for these are undated accordingly.
Change-Id: I49ec37b01f1b170335a5697541c8fd30e6d3a961
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip4.h')
-rw-r--r-- | src/vnet/ip/ip4.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/vnet/ip/ip4.h b/src/vnet/ip/ip4.h index cc33dff468f..b184fbaef42 100644 --- a/src/vnet/ip/ip4.h +++ b/src/vnet/ip/ip4.h @@ -68,6 +68,18 @@ typedef struct ip4_fib_t } ip4_fib_t; +typedef struct ip4_mfib_t +{ + /* Hash table for each prefix length mapping. */ + uword *fib_entry_by_dst_address[65]; + + /* Table ID (hash key) for this FIB. */ + u32 table_id; + + /* Index into FIB vector. */ + u32 index; +} ip4_mfib_t; + struct ip4_main_t; typedef void (ip4_add_del_interface_address_function_t) @@ -99,11 +111,17 @@ typedef struct ip4_main_t /** Vector of FIBs. */ struct fib_table_t_ *fibs; + /** Vector of MFIBs. */ + struct mfib_table_t_ *mfibs; + u32 fib_masks[33]; /** Table index indexed by software interface. */ u32 *fib_index_by_sw_if_index; + /** Table index indexed by software interface. */ + u32 *mfib_index_by_sw_if_index; + /* IP4 enabled count by software interface */ u8 *ip_enabled_by_sw_if_index; @@ -111,6 +129,10 @@ typedef struct ip4_main_t ID space is not necessarily dense; index space is dense. */ uword *fib_index_by_table_id; + /** Hash table mapping table id to multicast fib index. + ID space is not necessarily dense; index space is dense. */ + uword *mfib_index_by_table_id; + /** Functions to call when interface address changes. */ ip4_add_del_interface_address_callback_t * add_del_interface_address_callbacks; @@ -140,7 +162,9 @@ extern ip4_main_t ip4_main; /** Global ip4 input node. Errors get attached to ip4 input node. */ extern vlib_node_registration_t ip4_input_node; extern vlib_node_registration_t ip4_lookup_node; +extern vlib_node_registration_t ip4_local_node; extern vlib_node_registration_t ip4_rewrite_node; +extern vlib_node_registration_t ip4_rewrite_mcast_node; extern vlib_node_registration_t ip4_rewrite_local_node; extern vlib_node_registration_t ip4_arp_node; extern vlib_node_registration_t ip4_glean_node; |