X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ffib%2Ffib_entry.h;h=5f6ff31297ed33cc13f9ebbd2705f83f2a46558f;hb=f98bb74372410ed207891b744285cdb0618b560b;hp=f258b7557412e3f78cd67f3c723c6c7ede34d101;hpb=32e1c010b0c34fd0984f7fc45fae648a182025c5;p=vpp.git diff --git a/src/vnet/fib/fib_entry.h b/src/vnet/fib/fib_entry.h index f258b755741..5f6ff31297e 100644 --- a/src/vnet/fib/fib_entry.h +++ b/src/vnet/fib/fib_entry.h @@ -48,6 +48,10 @@ typedef enum fib_source_t_ { * that is from confiiguration on an interface, not a 'ip route' command */ FIB_SOURCE_INTERFACE, + /** + * SRv6 and SR-MPLS + */ + FIB_SOURCE_SR, /** * A high priority source a plugin can use */ @@ -64,10 +68,6 @@ typedef enum fib_source_t_ { * LISP */ FIB_SOURCE_LISP, - /** - * SRv6 - */ - FIB_SOURCE_SR, /** * IPv[46] Mapping */ @@ -80,6 +80,10 @@ typedef enum fib_source_t_ { * DHCP */ FIB_SOURCE_DHCP, + /** + * IPv6 Proxy ND + */ + FIB_SOURCE_IP6_ND_PROXY, /** * Adjacency source. * routes created as a result of ARP/ND entries. This is lower priority @@ -141,6 +145,7 @@ STATIC_ASSERT (sizeof(fib_source_t) == 1, [FIB_SOURCE_LISP] = "LISP", \ [FIB_SOURCE_CLASSIFY] = "classify", \ [FIB_SOURCE_DHCP] = "DHCP", \ + [FIB_SOURCE_IP6_ND_PROXY] = "IPv6-proxy-nd", \ [FIB_SOURCE_RR] = "recursive-resolution", \ [FIB_SOURCE_AE] = "attached_export", \ [FIB_SOURCE_MPLS] = "mpls", \ @@ -187,10 +192,20 @@ typedef enum fib_entry_attribute_t_ { * The prefix/address is local to this device */ FIB_ENTRY_ATTRIBUTE_LOCAL, + /** + * The prefix/address is a multicast prefix. + * this aplies only to MPLS. IP multicast is handled by mfib + */ + FIB_ENTRY_ATTRIBUTE_MULTICAST, + /** + * The prefix/address exempted from loose uRPF check + * To be used with caution + */ + FIB_ENTRY_ATTRIBUTE_URPF_EXEMPT, /** * Marker. add new entries before this one. */ - FIB_ENTRY_ATTRIBUTE_LAST = FIB_ENTRY_ATTRIBUTE_LOCAL, + FIB_ENTRY_ATTRIBUTE_LAST = FIB_ENTRY_ATTRIBUTE_MULTICAST, } fib_entry_attribute_t; /** @@ -205,6 +220,8 @@ typedef enum fib_entry_attribute_t_ { [FIB_ENTRY_ATTRIBUTE_DROP] = "drop", \ [FIB_ENTRY_ATTRIBUTE_EXCLUSIVE] = "exclusive", \ [FIB_ENTRY_ATTRIBUTE_LOCAL] = "local", \ + [FIB_ENTRY_ATTRIBUTE_URPF_EXEMPT] = "uRPF-exempt", \ + [FIB_ENTRY_ATTRIBUTE_MULTICAST] = "multicast", \ } #define FOR_EACH_FIB_ATTRIBUTE(_item) \ @@ -220,6 +237,8 @@ typedef enum fib_entry_flag_t_ { FIB_ENTRY_FLAG_EXCLUSIVE = (1 << FIB_ENTRY_ATTRIBUTE_EXCLUSIVE), FIB_ENTRY_FLAG_LOCAL = (1 << FIB_ENTRY_ATTRIBUTE_LOCAL), FIB_ENTRY_FLAG_IMPORT = (1 << FIB_ENTRY_ATTRIBUTE_IMPORT), + FIB_ENTRY_FLAG_LOOSE_URPF_EXEMPT = (1 << FIB_ENTRY_ATTRIBUTE_URPF_EXEMPT), + FIB_ENTRY_FLAG_MULTICAST = (1 << FIB_ENTRY_ATTRIBUTE_MULTICAST), } __attribute__((packed)) fib_entry_flag_t; /** @@ -271,7 +290,7 @@ typedef struct fib_entry_src_t_ { /** * A vector of path extensions */ - struct fib_path_ext_t_ *fes_path_exts; + fib_path_ext_list_t fes_path_exts; /** * The path-list created by the source @@ -384,7 +403,7 @@ typedef struct fib_entry_t_ { * paint the header straight on without the need to check the packet * type to derive the EOS bit value. */ - dpo_id_t fe_lb; // [FIB_FORW_CHAIN_MPLS_NUM]; + dpo_id_t fe_lb; /** * Vector of source infos. * Most entries will only have 1 source. So we optimise for memory usage, @@ -513,6 +532,9 @@ extern int fib_entry_is_sourced(fib_node_index_t fib_entry_index, fib_source_t source); extern fib_node_index_t fib_entry_get_path_list(fib_node_index_t fib_entry_index); +extern int fib_entry_is_resolved(fib_node_index_t fib_entry_index); +extern void fib_entry_set_flow_hash_config(fib_node_index_t fib_entry_index, + flow_hash_config_t hash_config); extern void fib_entry_module_init(void);