DPDK
20.05.0
|
#include <rte_compat.h>
Go to the source code of this file.
Data Structures | |
struct | rte_fib_conf |
Macros | |
#define | RTE_FIB_MAXDEPTH 32 |
Typedefs | |
typedef int(* | rte_fib_modify_fn_t) (struct rte_fib *fib, uint32_t ip, uint8_t depth, uint64_t next_hop, int op) |
typedef void(* | rte_fib_lookup_fn_t) (void *fib, const uint32_t *ips, uint64_t *next_hops, const unsigned int n) |
Enumerations | |
enum | rte_fib_type { RTE_FIB_DUMMY, RTE_FIB_DIR24_8 } |
enum | rte_fib_dir24_8_nh_sz |
Functions | |
__rte_experimental struct rte_fib * | rte_fib_create (const char *name, int socket_id, struct rte_fib_conf *conf) |
__rte_experimental struct rte_fib * | rte_fib_find_existing (const char *name) |
__rte_experimental void | rte_fib_free (struct rte_fib *fib) |
__rte_experimental int | rte_fib_add (struct rte_fib *fib, uint32_t ip, uint8_t depth, uint64_t next_hop) |
__rte_experimental int | rte_fib_delete (struct rte_fib *fib, uint32_t ip, uint8_t depth) |
__rte_experimental int | rte_fib_lookup_bulk (struct rte_fib *fib, uint32_t *ips, uint64_t *next_hops, int n) |
__rte_experimental void * | rte_fib_get_dp (struct rte_fib *fib) |
__rte_experimental struct rte_rib * | rte_fib_get_rib (struct rte_fib *fib) |
FIB (Forwarding information base) implementation for IPv4 Longest Prefix Match
Definition in file rte_fib.h.
#define RTE_FIB_MAXDEPTH 32 |
typedef int(* rte_fib_modify_fn_t) (struct rte_fib *fib, uint32_t ip, uint8_t depth, uint64_t next_hop, int op) |
typedef void(* rte_fib_lookup_fn_t) (void *fib, const uint32_t *ips, uint64_t *next_hops, const unsigned int n) |
enum rte_fib_type |
__rte_experimental struct rte_fib* rte_fib_create | ( | const char * | name, |
int | socket_id, | ||
struct rte_fib_conf * | conf | ||
) |
Create FIB
name | FIB name |
socket_id | NUMA socket ID for FIB table memory allocation |
conf | Structure containing the configuration |
__rte_experimental struct rte_fib* rte_fib_find_existing | ( | const char * | name | ) |
Find an existing FIB object and return a pointer to it.
name | Name of the fib object as passed to rte_fib_create() |
__rte_experimental void rte_fib_free | ( | struct rte_fib * | fib | ) |
Free an FIB object.
fib | FIB object handle |
__rte_experimental int rte_fib_add | ( | struct rte_fib * | fib, |
uint32_t | ip, | ||
uint8_t | depth, | ||
uint64_t | next_hop | ||
) |
Add a route to the FIB.
fib | FIB object handle |
ip | IPv4 prefix address to be added to the FIB |
depth | Prefix length |
next_hop | Next hop to be added to the FIB |
__rte_experimental int rte_fib_delete | ( | struct rte_fib * | fib, |
uint32_t | ip, | ||
uint8_t | depth | ||
) |
Delete a rule from the FIB.
fib | FIB object handle |
ip | IPv4 prefix address to be deleted from the FIB |
depth | Prefix length |
__rte_experimental int rte_fib_lookup_bulk | ( | struct rte_fib * | fib, |
uint32_t * | ips, | ||
uint64_t * | next_hops, | ||
int | n | ||
) |
Lookup multiple IP addresses in the FIB.
fib | FIB object handle |
ips | Array of IPs 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. |
__rte_experimental void* rte_fib_get_dp | ( | struct rte_fib * | fib | ) |
Get pointer to the dataplane specific struct
fib | FIB object handle |
__rte_experimental struct rte_rib* rte_fib_get_rib | ( | struct rte_fib * | fib | ) |
Get pointer to the RIB
fib | FIB object handle |