DPDK
20.11.10
|
Go to the source code of this file.
Data Structures | |
struct | rte_rib6_conf |
Enumerations | |
enum | { RTE_RIB6_GET_NXT_ALL, RTE_RIB6_GET_NXT_COVER } |
Functions | |
static void | rte_rib6_copy_addr (uint8_t *dst, const uint8_t *src) |
static int | rte_rib6_is_equal (const uint8_t *ip1, const uint8_t *ip2) |
static uint8_t | get_msk_part (uint8_t depth, int byte) |
__rte_experimental struct rte_rib6_node * | rte_rib6_lookup (struct rte_rib6 *rib, const uint8_t ip[RTE_RIB6_IPV6_ADDR_SIZE]) |
__rte_experimental struct rte_rib6_node * | rte_rib6_lookup_parent (struct rte_rib6_node *ent) |
__rte_experimental struct rte_rib6_node * | rte_rib6_lookup_exact (struct rte_rib6 *rib, const uint8_t ip[RTE_RIB6_IPV6_ADDR_SIZE], uint8_t depth) |
__rte_experimental struct rte_rib6_node * | rte_rib6_get_nxt (struct rte_rib6 *rib, const uint8_t ip[RTE_RIB6_IPV6_ADDR_SIZE], uint8_t depth, struct rte_rib6_node *last, int flag) |
__rte_experimental void | rte_rib6_remove (struct rte_rib6 *rib, const uint8_t ip[RTE_RIB6_IPV6_ADDR_SIZE], uint8_t depth) |
__rte_experimental struct rte_rib6_node * | rte_rib6_insert (struct rte_rib6 *rib, const uint8_t ip[RTE_RIB6_IPV6_ADDR_SIZE], uint8_t depth) |
__rte_experimental int | rte_rib6_get_ip (const struct rte_rib6_node *node, uint8_t ip[RTE_RIB6_IPV6_ADDR_SIZE]) |
__rte_experimental int | rte_rib6_get_depth (const struct rte_rib6_node *node, uint8_t *depth) |
__rte_experimental void * | rte_rib6_get_ext (struct rte_rib6_node *node) |
__rte_experimental int | rte_rib6_get_nh (const struct rte_rib6_node *node, uint64_t *nh) |
__rte_experimental int | rte_rib6_set_nh (struct rte_rib6_node *node, uint64_t nh) |
__rte_experimental struct rte_rib6 * | rte_rib6_create (const char *name, int socket_id, const struct rte_rib6_conf *conf) |
__rte_experimental struct rte_rib6 * | rte_rib6_find_existing (const char *name) |
__rte_experimental void | rte_rib6_free (struct rte_rib6 *rib) |
RTE rib6 library.
Level compressed tree implementation for IPv6 Longest Prefix Match
Definition in file rte_rib6.h.
anonymous enum |
rte_rib6_get_nxt() flags
Enumerator | |
---|---|
RTE_RIB6_GET_NXT_ALL | flag to get all subroutes in a RIB tree |
RTE_RIB6_GET_NXT_COVER | flag to get first matched subroutes in a RIB tree |
Definition at line 34 of file rte_rib6.h.
|
inlinestatic |
Copy IPv6 address from one location to another
dst | pointer to the place to copy |
src | pointer from where to copy |
Definition at line 65 of file rte_rib6.h.
|
inlinestatic |
Compare two IPv6 addresses
ip1 | pointer to the first ipv6 address |
ip2 | pointer to the second ipv6 address |
Definition at line 85 of file rte_rib6.h.
|
inlinestatic |
Get 8-bit part of 128-bit IPv6 mask
depth | ipv6 prefix length |
byte | position of a 8-bit chunk in the 128-bit mask |
Definition at line 109 of file rte_rib6.h.
__rte_experimental struct rte_rib6_node* rte_rib6_lookup | ( | struct rte_rib6 * | rib, |
const uint8_t | ip[RTE_RIB6_IPV6_ADDR_SIZE] | ||
) |
Lookup an IP into the RIB structure
rib | RIB object handle |
ip | IP to be looked up in the RIB |
__rte_experimental struct rte_rib6_node* rte_rib6_lookup_parent | ( | struct rte_rib6_node * | ent | ) |
Lookup less specific route into the RIB structure
ent | Pointer to struct rte_rib6_node that represents target route |
__rte_experimental struct rte_rib6_node* rte_rib6_lookup_exact | ( | struct rte_rib6 * | rib, |
const uint8_t | ip[RTE_RIB6_IPV6_ADDR_SIZE], | ||
uint8_t | depth | ||
) |
Provides exact mach lookup of the prefix into the RIB structure
rib | RIB object handle |
ip | net to be looked up in the RIB |
depth | prefix length |
__rte_experimental struct rte_rib6_node* rte_rib6_get_nxt | ( | struct rte_rib6 * | rib, |
const uint8_t | ip[RTE_RIB6_IPV6_ADDR_SIZE], | ||
uint8_t | depth, | ||
struct rte_rib6_node * | last, | ||
int | flag | ||
) |
Retrieve next more specific prefix from the RIB that is covered by ip/depth supernet in an ascending order
rib | RIB object handle |
ip | net address of supernet prefix that covers returned more specific prefixes |
depth | supernet prefix length |
last | pointer to the last returned prefix to get next prefix or NULL to get first more specific prefix |
flag | -RTE_RIB6_GET_NXT_ALL get all prefixes from subtrie -RTE_RIB6_GET_NXT_COVER get only first more specific prefix even if it have more specifics |
__rte_experimental void rte_rib6_remove | ( | struct rte_rib6 * | rib, |
const uint8_t | ip[RTE_RIB6_IPV6_ADDR_SIZE], | ||
uint8_t | depth | ||
) |
Remove prefix from the RIB
rib | RIB object handle |
ip | net to be removed from the RIB |
depth | prefix length |
__rte_experimental struct rte_rib6_node* rte_rib6_insert | ( | struct rte_rib6 * | rib, |
const uint8_t | ip[RTE_RIB6_IPV6_ADDR_SIZE], | ||
uint8_t | depth | ||
) |
Insert prefix into the RIB
rib | RIB object handle |
ip | net to be inserted to the RIB |
depth | prefix length |
__rte_experimental int rte_rib6_get_ip | ( | const struct rte_rib6_node * | node, |
uint8_t | ip[RTE_RIB6_IPV6_ADDR_SIZE] | ||
) |
Get an ip from rte_rib6_node
node | pointer to the rib6 node |
ip | pointer to the ipv6 to save |
__rte_experimental int rte_rib6_get_depth | ( | const struct rte_rib6_node * | node, |
uint8_t * | depth | ||
) |
Get a depth from rte_rib6_node
node | pointer to the rib6 node |
depth | pointer to the depth to save |
__rte_experimental void* rte_rib6_get_ext | ( | struct rte_rib6_node * | node | ) |
Get ext field from the rte_rib6_node It is caller responsibility to make sure there are necessary space for the ext field inside rib6 node.
node | pointer to the rte_rib6_node |
__rte_experimental int rte_rib6_get_nh | ( | const struct rte_rib6_node * | node, |
uint64_t * | nh | ||
) |
Get nexthop from the rte_rib6_node
node | pointer to the rib6 node |
nh | pointer to the nexthop to save |
__rte_experimental int rte_rib6_set_nh | ( | struct rte_rib6_node * | node, |
uint64_t | nh | ||
) |
Set nexthop into the rte_rib6_node
node | pointer to the rib6 node |
nh | nexthop value to set to the rib6 node |
__rte_experimental struct rte_rib6* rte_rib6_create | ( | const char * | name, |
int | socket_id, | ||
const struct rte_rib6_conf * | conf | ||
) |
Create RIB
name | RIB name |
socket_id | NUMA socket ID for RIB table memory allocation |
conf | Structure containing the configuration |
__rte_experimental struct rte_rib6* rte_rib6_find_existing | ( | const char * | name | ) |
Find an existing RIB object and return a pointer to it.
name | Name of the rib object as passed to rte_rib6_create() |
__rte_experimental void rte_rib6_free | ( | struct rte_rib6 * | rib | ) |
Free an RIB object.
rib | RIB object handle |