/**
* @file
+ *
+ * RTE FIB6 library.
+ *
+ * @warning
+ * @b EXPERIMENTAL:
+ * All functions in this file may be changed or removed without prior notice.
+ *
* FIB (Forwarding information base) implementation
* for IPv6 Longest Prefix Match
*/
#include <rte_compat.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define RTE_FIB6_IPV6_ADDR_SIZE 16
/** Maximum depth value possible for IPv6 FIB. */
#define RTE_FIB6_MAXDEPTH 128
struct rte_fib6;
+struct rte_rib6;
/** Type of FIB struct */
enum rte_fib6_type {
RTE_FIB6_DUMMY, /**< RIB6 tree based FIB */
+ RTE_FIB6_TRIE, /**< TRIE based fib */
RTE_FIB6_TYPE_MAX
};
RTE_FIB6_DEL,
};
+enum rte_fib_trie_nh_sz {
+ RTE_FIB6_TRIE_2B = 1,
+ RTE_FIB6_TRIE_4B,
+ RTE_FIB6_TRIE_8B
+};
+
/** FIB configuration structure */
struct rte_fib6_conf {
enum rte_fib6_type type; /**< Type of FIB struct */
/** Default value returned on lookup if there is no route */
uint64_t default_nh;
int max_routes;
+ union {
+ struct {
+ enum rte_fib_trie_nh_sz nh_sz;
+ uint32_t num_tbl8;
+ } trie;
+ };
};
/**
struct rte_rib6 *
rte_fib6_get_rib(struct rte_fib6 *fib);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_FIB6_H_ */