|
DPDK 25.03.0
|
Go to the source code of this file.
Data Structures | |
| struct | rte_rib_conf |
Enumerations | |
| enum | { RTE_RIB_GET_NXT_ALL , RTE_RIB_GET_NXT_COVER } |
Functions | |
| static uint32_t | rte_rib_depth_to_mask (uint8_t depth) |
| struct rte_rib_node * | rte_rib_lookup (struct rte_rib *rib, uint32_t ip) |
| struct rte_rib_node * | rte_rib_lookup_parent (struct rte_rib_node *ent) |
| struct rte_rib_node * | rte_rib_lookup_exact (struct rte_rib *rib, uint32_t ip, uint8_t depth) |
| struct rte_rib_node * | rte_rib_get_nxt (struct rte_rib *rib, uint32_t ip, uint8_t depth, struct rte_rib_node *last, int flag) |
| void | rte_rib_remove (struct rte_rib *rib, uint32_t ip, uint8_t depth) |
| struct rte_rib_node * | rte_rib_insert (struct rte_rib *rib, uint32_t ip, uint8_t depth) |
| int | rte_rib_get_ip (const struct rte_rib_node *node, uint32_t *ip) |
| int | rte_rib_get_depth (const struct rte_rib_node *node, uint8_t *depth) |
| void * | rte_rib_get_ext (struct rte_rib_node *node) |
| int | rte_rib_get_nh (const struct rte_rib_node *node, uint64_t *nh) |
| int | rte_rib_set_nh (struct rte_rib_node *node, uint64_t nh) |
| void | rte_rib_free (struct rte_rib *rib) |
| struct rte_rib * | rte_rib_create (const char *name, int socket_id, const struct rte_rib_conf *conf) __rte_malloc __rte_dealloc(rte_rib_free |
| struct rte_rib struct rte_rib * | rte_rib_find_existing (const char *name) |
RTE RIB library.
Level compressed tree implementation for IPv4 Longest Prefix Match
Definition in file rte_rib.h.
| anonymous enum |
rte_rib_get_nxt() flags
| Enumerator | |
|---|---|
| RTE_RIB_GET_NXT_ALL | flag to get all subroutes in a RIB tree |
| RTE_RIB_GET_NXT_COVER | flag to get first matched subroutes in a RIB tree |
|
inlinestatic |
| struct rte_rib_node * rte_rib_lookup | ( | struct rte_rib * | rib, |
| uint32_t | ip | ||
| ) |
Lookup an IP into the RIB structure
| rib | RIB object handle |
| ip | IP to be looked up in the RIB |
| struct rte_rib_node * rte_rib_lookup_parent | ( | struct rte_rib_node * | ent | ) |
Lookup less specific route into the RIB structure
| ent | Pointer to struct rte_rib_node that represents target route |
| struct rte_rib_node * rte_rib_lookup_exact | ( | struct rte_rib * | rib, |
| uint32_t | ip, | ||
| uint8_t | depth | ||
| ) |
Lookup prefix into the RIB structure
| rib | RIB object handle |
| ip | net to be looked up in the RIB |
| depth | prefix length |
| struct rte_rib_node * rte_rib_get_nxt | ( | struct rte_rib * | rib, |
| uint32_t | ip, | ||
| uint8_t | depth, | ||
| struct rte_rib_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_RIB_GET_NXT_ALL get all prefixes from subtrie -RTE_RIB_GET_NXT_COVER get only first more specific prefix even if it have more specifics |
| void rte_rib_remove | ( | struct rte_rib * | rib, |
| uint32_t | ip, | ||
| uint8_t | depth | ||
| ) |
Remove prefix from the RIB
| rib | RIB object handle |
| ip | net to be removed from the RIB |
| depth | prefix length |
| struct rte_rib_node * rte_rib_insert | ( | struct rte_rib * | rib, |
| uint32_t | ip, | ||
| uint8_t | depth | ||
| ) |
Insert prefix into the RIB
| rib | RIB object handle |
| ip | net to be inserted to the RIB |
| depth | prefix length |
| int rte_rib_get_ip | ( | const struct rte_rib_node * | node, |
| uint32_t * | ip | ||
| ) |
Get an ip from rte_rib_node
| node | pointer to the rib node |
| ip | pointer to the ip to save |
| int rte_rib_get_depth | ( | const struct rte_rib_node * | node, |
| uint8_t * | depth | ||
| ) |
Get a depth from rte_rib_node
| node | pointer to the rib node |
| depth | pointer to the depth to save |
| void * rte_rib_get_ext | ( | struct rte_rib_node * | node | ) |
Get ext field from the rib node It is caller responsibility to make sure there are necessary space for the ext field inside rib node.
| node | pointer to the rib node |
| int rte_rib_get_nh | ( | const struct rte_rib_node * | node, |
| uint64_t * | nh | ||
| ) |
Get nexthop from the rib node
| node | pointer to the rib node |
| nh | pointer to the nexthop to save |
| int rte_rib_set_nh | ( | struct rte_rib_node * | node, |
| uint64_t | nh | ||
| ) |
Set nexthop into the rib node
| node | pointer to the rib node |
| nh | nexthop value to set to the rib node |
| void rte_rib_free | ( | struct rte_rib * | rib | ) |
Free an RIB object.
| rib | RIB object handle created with rte_rib_create(). If rib is NULL, no operation is performed. |
| struct rte_rib * rte_rib_create | ( | const char * | name, |
| int | socket_id, | ||
| const struct rte_rib_conf * | conf | ||
| ) |
Create RIB
| name | RIB name |
| socket_id | NUMA socket ID for RIB table memory allocation |
| conf | Structure containing the configuration |
| struct rte_rib struct rte_rib * rte_rib_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_rib_create() |