FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
ip6_fib.h File Reference
+ Include dependency graph for ip6_fib.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ip6_fib_table_instance_t_
 A representation of a single IP6 table. More...
 

Macros

#define IP6_FIB_DEFAULT_HASH_NUM_BUCKETS   (64 * 1024)
 
#define IP6_FIB_DEFAULT_HASH_MEMORY_SIZE   (32<<20)
 
#define IP6_FIB_NUM_TABLES   (IP6_FIB_TABLE_NON_FWDING+1)
 

Typedefs

typedef enum ip6_fib_table_instance_type_t_ ip6_fib_table_instance_type_t
 Enumeration of the FIB table instance types. More...
 
typedef struct ip6_fib_table_instance_t_ ip6_fib_table_instance_t
 A representation of a single IP6 table. More...
 

Enumerations

enum  ip6_fib_table_instance_type_t_ { IP6_FIB_TABLE_FWDING, IP6_FIB_TABLE_NON_FWDING }
 Enumeration of the FIB table instance types. More...
 

Functions

fib_node_index_t ip6_fib_table_lookup (u32 fib_index, const ip6_address_t *addr, u32 len)
 
fib_node_index_t ip6_fib_table_lookup_exact_match (u32 fib_index, const ip6_address_t *addr, u32 len)
 
void ip6_fib_table_entry_remove (u32 fib_index, const ip6_address_t *addr, u32 len)
 
void ip6_fib_table_entry_insert (u32 fib_index, const ip6_address_t *addr, u32 len, fib_node_index_t fib_entry_index)
 
void ip6_fib_table_destroy (u32 fib_index)
 
void ip6_fib_table_fwding_dpo_update (u32 fib_index, const ip6_address_t *addr, u32 len, const dpo_id_t *dpo)
 
void ip6_fib_table_fwding_dpo_remove (u32 fib_index, const ip6_address_t *addr, u32 len, const dpo_id_t *dpo)
 
u32 ip6_fib_table_fwding_lookup_with_if_index (ip6_main_t *im, u32 sw_if_index, const ip6_address_t *dst)
 
void ip6_fib_table_walk (u32 fib_index, fib_table_walk_fn_t fn, void *ctx)
 Walk all entries in a FIB table N.B: This is NOT safe to deletes. More...
 
static u32 ip6_fib_table_fwding_lookup (u32 fib_index, const ip6_address_t *dst)
 
void ip6_fib_table_sub_tree_walk (u32 fib_index, const fib_prefix_t *root, fib_table_walk_fn_t fn, void *ctx)
 Walk all entries in a sub-tree of the FIB table N.B: This is NOT safe to deletes. More...
 
static u32 ip6_src_lookup_for_packet (ip6_main_t *im, vlib_buffer_t *b, ip6_header_t *i)
 return the DPO that the LB stacks on. More...
 
u32 ip6_fib_table_find_or_create_and_lock (u32 table_id, fib_source_t src)
 Get or create an IPv6 fib. More...
 
u32 ip6_fib_table_create_and_lock (fib_source_t src, fib_table_flags_t flags, u8 *desc)
 
u8format_ip6_fib_table_memory (u8 *s, va_list *args)
 
static ip6_fib_tip6_fib_get (fib_node_index_t index)
 
static u32 ip6_fib_index_from_table_id (u32 table_id)
 
u32 ip6_fib_table_get_index_for_sw_if_index (u32 sw_if_index)
 

Variables

ip6_fib_table_instance_t ip6_fib_table [IP6_FIB_NUM_TABLES]
 The two FIB tables; fwding and non-fwding. More...
 

Macro Definition Documentation

◆ IP6_FIB_DEFAULT_HASH_MEMORY_SIZE

#define IP6_FIB_DEFAULT_HASH_MEMORY_SIZE   (32<<20)

Definition at line 32 of file ip6_fib.h.

◆ IP6_FIB_DEFAULT_HASH_NUM_BUCKETS

#define IP6_FIB_DEFAULT_HASH_NUM_BUCKETS   (64 * 1024)

Definition at line 31 of file ip6_fib.h.

◆ IP6_FIB_NUM_TABLES

#define IP6_FIB_NUM_TABLES   (IP6_FIB_TABLE_NON_FWDING+1)

Definition at line 53 of file ip6_fib.h.

Typedef Documentation

◆ ip6_fib_table_instance_t

A representation of a single IP6 table.

◆ ip6_fib_table_instance_type_t

Enumeration of the FIB table instance types.

Enumeration Type Documentation

◆ ip6_fib_table_instance_type_t_

Enumeration of the FIB table instance types.

Enumerator
IP6_FIB_TABLE_FWDING 

This table stores the routes that are used to forward traffic.

The key is the prefix, the result the adjacency to forward on.

IP6_FIB_TABLE_NON_FWDING 

The table that stores ALL routes learned by the DP.

Some of these routes may not be ready to install in forwarding at a given time. The key in this table is the prefix, the result is the fib_entry_t

Definition at line 37 of file ip6_fib.h.

Function Documentation

◆ format_ip6_fib_table_memory()

u8* format_ip6_fib_table_memory ( u8 s,
va_list *  args 
)

Definition at line 600 of file ip6_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip6_fib_get()

static ip6_fib_t* ip6_fib_get ( fib_node_index_t  index)
inlinestatic

Definition at line 213 of file ip6_fib.h.

◆ ip6_fib_index_from_table_id()

static u32 ip6_fib_index_from_table_id ( u32  table_id)
inlinestatic

Definition at line 220 of file ip6_fib.h.

+ Here is the caller graph for this function:

◆ ip6_fib_table_create_and_lock()

u32 ip6_fib_table_create_and_lock ( fib_source_t  src,
fib_table_flags_t  flags,
u8 desc 
)

Definition at line 119 of file ip6_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip6_fib_table_destroy()

void ip6_fib_table_destroy ( u32  fib_index)

Definition at line 127 of file ip6_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip6_fib_table_entry_insert()

void ip6_fib_table_entry_insert ( u32  fib_index,
const ip6_address_t *  addr,
u32  len,
fib_node_index_t  fib_entry_index 
)

Definition at line 314 of file ip6_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip6_fib_table_entry_remove()

void ip6_fib_table_entry_remove ( u32  fib_index,
const ip6_address_t *  addr,
u32  len 
)

Definition at line 283 of file ip6_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip6_fib_table_find_or_create_and_lock()

u32 ip6_fib_table_find_or_create_and_lock ( u32  table_id,
fib_source_t  src 
)

Get or create an IPv6 fib.

Get or create an IPv4 fib with the provided table ID.

Parameters
imip4_main pointer.
table_idWhen set to ~0, an arbitrary and unused fib ID is picked and can be retrieved with ret->table_id. Otherwise, the fib ID to be used to retrieve or create the desired fib.
Returns
A pointer to the retrieved or created fib.

Definition at line 102 of file ip6_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip6_fib_table_fwding_dpo_remove()

void ip6_fib_table_fwding_dpo_remove ( u32  fib_index,
const ip6_address_t *  addr,
u32  len,
const dpo_id_t dpo 
)

Definition at line 398 of file ip6_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip6_fib_table_fwding_dpo_update()

void ip6_fib_table_fwding_dpo_update ( u32  fib_index,
const ip6_address_t *  addr,
u32  len,
const dpo_id_t dpo 
)

Definition at line 367 of file ip6_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip6_fib_table_fwding_lookup()

static u32 ip6_fib_table_fwding_lookup ( u32  fib_index,
const ip6_address_t *  dst 
)
inlinestatic

Definition at line 115 of file ip6_fib.h.

+ Here is the caller graph for this function:

◆ ip6_fib_table_fwding_lookup_with_if_index()

u32 ip6_fib_table_fwding_lookup_with_if_index ( ip6_main_t im,
u32  sw_if_index,
const ip6_address_t *  dst 
)

Definition at line 344 of file ip6_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip6_fib_table_get_index_for_sw_if_index()

u32 ip6_fib_table_get_index_for_sw_if_index ( u32  sw_if_index)

Definition at line 353 of file ip6_fib.c.

+ Here is the caller graph for this function:

◆ ip6_fib_table_lookup()

fib_node_index_t ip6_fib_table_lookup ( u32  fib_index,
const ip6_address_t *  addr,
u32  len 
)

Definition at line 183 of file ip6_fib.c.

+ Here is the caller graph for this function:

◆ ip6_fib_table_lookup_exact_match()

fib_node_index_t ip6_fib_table_lookup_exact_match ( u32  fib_index,
const ip6_address_t *  addr,
u32  len 
)

Definition at line 229 of file ip6_fib.c.

+ Here is the caller graph for this function:

◆ ip6_fib_table_sub_tree_walk()

void ip6_fib_table_sub_tree_walk ( u32  fib_index,
const fib_prefix_t root,
fib_table_walk_fn_t  fn,
void *  ctx 
)

Walk all entries in a sub-tree of the FIB table N.B: This is NOT safe to deletes.

If you need to delete walk the whole table and store elements in a vector, then delete the elements

Definition at line 528 of file ip6_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip6_fib_table_walk()

void ip6_fib_table_walk ( u32  fib_index,
fib_table_walk_fn_t  fn,
void *  ctx 
)

Walk all entries in a FIB table N.B: This is NOT safe to deletes.

If you need to delete walk the whole table and store elements in a vector, then delete the elements

Definition at line 505 of file ip6_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip6_src_lookup_for_packet()

static u32 ip6_src_lookup_for_packet ( ip6_main_t im,
vlib_buffer_t b,
ip6_header_t i 
)
inlinestatic

return the DPO that the LB stacks on.

Definition at line 166 of file ip6_fib.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ ip6_fib_table

The two FIB tables; fwding and non-fwding.

Definition at line 23 of file ip6_fib.c.