CNDP
22.08.0
|
Go to the source code of this file.
Data Structures | |
struct | cne_fib6_conf |
Macros | |
#define | CNE_FIB6_IPV6_ADDR_SIZE 16 |
Enumerations | |
enum | cne_fib6_type { CNE_FIB6_DUMMY , CNE_FIB6_TRIE } |
enum | cne_fib_trie_nh_sz |
enum | cne_fib6_lookup_type { CNE_FIB6_LOOKUP_DEFAULT , CNE_FIB6_LOOKUP_TRIE_SCALAR , CNE_FIB6_LOOKUP_TRIE_VECTOR_AVX512 } |
Functions | |
struct cne_fib6 * | cne_fib6_create (const char *name, struct cne_fib6_conf *conf) |
void | cne_fib6_free (struct cne_fib6 *fib) |
int | cne_fib6_add (struct cne_fib6 *fib, const uint8_t ip[CNE_FIB6_IPV6_ADDR_SIZE], uint8_t depth, uint64_t next_hop) |
int | cne_fib6_delete (struct cne_fib6 *fib, const uint8_t ip[CNE_FIB6_IPV6_ADDR_SIZE], uint8_t depth) |
int | cne_fib6_lookup_bulk (struct cne_fib6 *fib, uint8_t ips[][CNE_FIB6_IPV6_ADDR_SIZE], uint64_t *next_hops, int n) |
void * | cne_fib6_get_dp (struct cne_fib6 *fib) |
struct cne_rib6 * | cne_fib6_get_rib (struct cne_fib6 *fib) |
int | cne_fib6_select_lookup (struct cne_fib6 *fib, enum cne_fib6_lookup_type type) |
CNE FIB6 library.
FIB (Forwarding information base) implementation for IPv6 Longest Prefix Match
Definition in file cne_fib6.h.
#define CNE_FIB6_IPV6_ADDR_SIZE 16 |
Maximum FIB6 IPv6 address size
Definition at line 30 of file cne_fib6.h.
enum cne_fib6_type |
Type of FIB struct
Enumerator | |
---|---|
CNE_FIB6_DUMMY | RIB6 tree based FIB |
CNE_FIB6_TRIE | TRIE based fib |
Definition at line 33 of file cne_fib6.h.
enum cne_fib_trie_nh_sz |
Size of nexthop (1 << nh_sz) bits for TRIE based FIB
Definition at line 39 of file cne_fib6.h.
enum cne_fib6_lookup_type |
Type of lookup function implementation
Definition at line 42 of file cne_fib6.h.
struct cne_fib6* cne_fib6_create | ( | const char * | name, |
struct cne_fib6_conf * | conf | ||
) |
Create FIB
name | FIB name |
conf | Structure containing the configuration |
void cne_fib6_free | ( | struct cne_fib6 * | fib | ) |
Free an FIB object.
fib | FIB object handle |
int cne_fib6_add | ( | struct cne_fib6 * | fib, |
const uint8_t | ip[CNE_FIB6_IPV6_ADDR_SIZE], | ||
uint8_t | depth, | ||
uint64_t | next_hop | ||
) |
Add a route to the FIB.
fib | FIB object handle |
ip | IPv6 prefix address to be added to the FIB |
depth | Prefix length |
next_hop | Next hop to be added to the FIB |
int cne_fib6_delete | ( | struct cne_fib6 * | fib, |
const uint8_t | ip[CNE_FIB6_IPV6_ADDR_SIZE], | ||
uint8_t | depth | ||
) |
Delete a rule from the FIB.
fib | FIB object handle |
ip | IPv6 prefix address to be deleted from the FIB |
depth | Prefix length |
int cne_fib6_lookup_bulk | ( | struct cne_fib6 * | fib, |
uint8_t | ips[][CNE_FIB6_IPV6_ADDR_SIZE], | ||
uint64_t * | next_hops, | ||
int | n | ||
) |
Lookup multiple IP addresses in the FIB.
fib | FIB object handle |
ips | Array of IPv6s to be looked up in the FIB |
next_hops | Next hop of the most specific rule found for IP. This is an array of eight byte values. If the lookup for the given IP failed, then corresponding element would contain default nexthop value configured for a FIB. |
n | Number of elements in ips (and next_hops) array to lookup. |
void* cne_fib6_get_dp | ( | struct cne_fib6 * | fib | ) |
Get pointer to the dataplane specific struct
fib | FIB6 object handle |
struct cne_rib6* cne_fib6_get_rib | ( | struct cne_fib6 * | fib | ) |
Get pointer to the RIB6
fib | FIB object handle |
int cne_fib6_select_lookup | ( | struct cne_fib6 * | fib, |
enum cne_fib6_lookup_type | type | ||
) |
Set lookup function based on type
fib | FIB object handle |
type | type of lookup function |