rte_fib6.h(3)
π rte_fib6.h β Library Functions Manual π
okay bestie, gather round, because today we're reading the man page for rte_fib6.h, straight out of the DPDK library functions manual β¨ it's giving "IPv6 routing but make it glamorous" and honestly? we're obsessed.
πΈ NAME πΈ
rte_fib6.h β the header itself, the moment, the icon π
β¨ SYNOPSIS β¨
first, the pregame. you gotta pull in the headers:
#include <stdint.h>
#include <rte_common.h>
#include <rte_ip6.h>
#include <rte_rcu_qsbr.h>
π Data Structures
struct rte_fib6_confstruct rte_fib6_rcu_config
π Macros
#define RTE_FIB6_MAXDEPTH (RTE_DEPRECATED(RTE_FIB6_MAXDEPTH)
RTE_IPV6_MAX_DEPTH)
π Typedefs
typedef int(* rte_fib6_modify_fn_t) (struct rte_fib6 *fib, const struct
rte_ipv6_addr *ip, uint8_t depth, uint64_t next_hop, int op)
typedef void(* rte_fib6_lookup_fn_t) (void *fib, const struct
rte_ipv6_addr *ips, uint64_t *next_hops, const unsigned int n)
π Enumerations
enum rte_fib6_qsbr_mode { RTE_FIB6_QSBR_MODE_DQ = 0,
RTE_FIB6_QSBR_MODE_SYNC }
enum rte_fib6_type { RTE_FIB6_DUMMY, RTE_FIB6_TRIE }
enum rte_fib_trie_nh_sz
enum rte_fib6_lookup_type { RTE_FIB6_LOOKUP_DEFAULT,
RTE_FIB6_LOOKUP_TRIE_SCALAR, RTE_FIB6_LOOKUP_TRIE_VECTOR_AVX512 }
π Functions
void rte_fib6_free (struct rte_fib6 *fib)
struct rte_fib6 * rte_fib6_create (const char *name, int socket_id,
struct rte_fib6_conf *conf) __rte_malloc __rte_dealloc(rte_fib6_free
struct rte_fib6 struct rte_fib6 * rte_fib6_find_existing (const char
*name)
int rte_fib6_add (struct rte_fib6 *fib, const struct rte_ipv6_addr *ip,
uint8_t depth, uint64_t next_hop)
int rte_fib6_delete (struct rte_fib6 *fib, const struct rte_ipv6_addr
*ip, uint8_t depth)
int rte_fib6_lookup_bulk (struct rte_fib6 *fib, const struct
rte_ipv6_addr *ips, uint64_t *next_hops, int n)
void * rte_fib6_get_dp (struct rte_fib6 *fib)
struct rte_rib6 * rte_fib6_get_rib (struct rte_fib6 *fib)
int rte_fib6_select_lookup (struct rte_fib6 *fib, enum
rte_fib6_lookup_type type)
__rte_experimental int rte_fib6_rcu_qsbr_add (struct rte_fib6 *fib,
struct rte_fib6_rcu_config *cfg)
π¦ Detailed Description π¦
the RTE FIB6 library, bestie π
it's the FIB (Forwarding information base) implementation for IPv6 Longest Prefix Match. yes that's a mouthful and yes it's iconic.
Definition in file rte_fib6.h.
π Macro Definition Documentation π
#define RTE_FIB6_MAXDEPTH (RTE_DEPRECATED(RTE_FIB6_MAXDEPTH) RTE_IPV6_MAX_DEPTH)
the maximum depth value possible for IPv6 FIB, fr fr.
Definition at line 30 of file rte_fib6.h.
π§ Typedef Documentation π§
typedef int(* rte_fib6_modify_fn_t) (struct rte_fib6 *fib, const struct rte_ipv6_addr *ip, uint8_t depth, uint64_t next_hop, int op)
the Modify FIB function π οΈ obviously.
Definition at line 58 of file rte_fib6.h.
typedef void(* rte_fib6_lookup_fn_t) (void *fib, const struct rte_ipv6_addr *ips, uint64_t *next_hops, const unsigned int n)
the FIB bulk lookup function, she's the one doing the heavy lifting π
Definition at line 62 of file rte_fib6.h.
π Enumeration Type Documentation π
enum rte_fib6_qsbr_mode
RCU reclamation modes π reclaim responsibly.
Enumerator
RTE_FIB6_QSBR_MODE_DQβ create a defer queue for reclaim.RTE_FIB6_QSBR_MODE_SYNCβ use blocking mode reclaim. no defer queue created. periodt.
Definition at line 44 of file rte_fib6.h.
enum rte_fib6_type
type of FIB struct, lowkey important.
Enumerator
RTE_FIB6_DUMMYβ RIB6 tree based FIB.RTE_FIB6_TRIEβ TRIE based fib β¨
Definition at line 52 of file rte_fib6.h.
enum rte_fib_trie_nh_sz
size of nexthop (1 << nh_sz) bits for TRIE based FIB. math? in my man page? more likely than you think π
Definition at line 72 of file rte_fib6.h.
enum rte_fib6_lookup_type
type of lookup function implementation π
Enumerator
RTE_FIB6_LOOKUP_DEFAULTβ selects the best implementation based on the max simd bitwidth. she's adaptive, she's flexible πRTE_FIB6_LOOKUP_TRIE_SCALARβ scalar lookup function implementation.RTE_FIB6_LOOKUP_TRIE_VECTOR_AVX512β vector implementation using AVX512 π₯
Definition at line 79 of file rte_fib6.h.
π«Ά Function Documentation π«Ά
void rte_fib6_free (struct rte_fib6 * fib)
free an FIB object and let it rest ποΈ
Parameters
fibβ FIB object handle created byrte_fib6_create(). if fib isNULL, no operation is performed. no cap, she just doesn't care.
struct rte_fib6 * rte_fib6_create (const char * name, int socket_id, struct rte_fib6_conf * conf)
create FIB. birth of an icon π±
Parameters
nameβ FIB namesocket_idβ NUMA socket ID for FIB table memory allocationconfβ structure containing the configuration
Returns
handle to FIB object on success, NULL otherwise with rte_errno set to an appropriate values. (yes "values", we're quoting the original, don't @ me π)
struct rte_fib6 struct rte_fib6 * rte_fib6_find_existing (const char * name)
find an existing FIB object and return a pointer to it, like spotting your bestie in a crowd π«
Parameters
nameβ name of the fib object as passed torte_fib6_create()
Returns
pointer to fib object or NULL if object not found with rte_errno set appropriately. possible rte_errno values include:
ENOENTβ required entry not available to return.
int rte_fib6_add (struct rte_fib6 * fib, const struct rte_ipv6_addr * ip, uint8_t depth, uint64_t next_hop)
add a route to the FIB β
Parameters
fibβ FIB object handleipβ IPv6 prefix address to be added to the FIBdepthβ prefix lengthnext_hopβ next hop to be added to the FIB
Returns
0 on success, negative value otherwise.
int rte_fib6_delete (struct rte_fib6 * fib, const struct rte_ipv6_addr * ip, uint8_t depth)
delete a rule from the FIB. we love a clean slate π
Parameters
fibβ FIB object handleipβ IPv6 prefix address to be deleted from the FIBdepthβ prefix length
Returns
0 on success, negative value otherwise.
int rte_fib6_lookup_bulk (struct rte_fib6 * fib, const struct rte_ipv6_addr * ips, uint64_t * next_hops, int n)
lookup multiple IP addresses in the FIB. bulk queen behavior π
Parameters
fibβ FIB object handleipsβ array of IPv6s to be looked up in the FIBnext_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.
Returns
-EINVAL for incorrect arguments, otherwise 0.
void * rte_fib6_get_dp (struct rte_fib6 * fib)
get pointer to the dataplane specific struct β¨
Parameters
fibβ FIB6 object handle
Returns
pointer on the dataplane struct on success, NULL otherwise.
struct rte_rib6 * rte_fib6_get_rib (struct rte_fib6 * fib)
get pointer to the RIB6 π
Parameters
fibβ FIB object handle
Returns
pointer on the RIB6 on success, NULL otherwise.
int rte_fib6_select_lookup (struct rte_fib6 * fib, enum rte_fib6_lookup_type type)
set lookup function based on type π―
Parameters
fibβ FIB object handletypeβ type of lookup function
Returns
0 on success, -EINVAL on failure.
__rte_experimental int rte_fib6_rcu_qsbr_add (struct rte_fib6 * fib, struct rte_fib6_rcu_config * cfg)
associate an RCU QSBR variable with a FIB object π
heads up bestie: this one is __rte_experimental, so it's giving "beta, use with care" energy π
Parameters
fibβ FIB object handlecfgβ RCU QSBR configuration
Returns
0 on success, -EINVAL β invalid pointer, -EEXIST β already added QSBR, -ENOMEM β memory allocation failure, -ENOTSUP β not supported by configured dataplane algorithm.
π Author π
generated automatically by Doxygen for DPDK from the source code. shoutout to the robots π€π
and that's the whole vibe check, bestie π«Ά this was rte_fib6.h(3) from DPDK, version 25.11.3 β go forth and route your IPv6 prefixes like the main character you are πΈβ¨π
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms