NDN-DPDK
High-Speed Named Data Networking Forwarder
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
fib.c File Reference
#include "fib.h"

Functions

void Fib_Clear (Fib *fib)
 Delete all entries. More...
 
bool Fib_AllocBulk (struct rte_mempool *fibMp, FibEntry *entries[], unsigned count)
 Allocate and zero entries. More...
 
void Fib_Write (Fib *fib, FibEntry *entry)
 Insert or replace a FIB entry. More...
 
void Fib_Erase (Fib *fib, FibEntry *entry)
 Erase given FIB entry. More...
 
FibEntryFib_Get (Fib *fib, LName name, uint64_t hash)
 Retrieve FIB entry. More...
 
FibEntryFib_Lpm (Fib *fib, const PName *name)
 Perform longest prefix match. More...
 

Function Documentation

◆ Fib_AllocBulk()

bool Fib_AllocBulk ( struct rte_mempool *  fibMp,
FibEntry entries[],
unsigned  count 
)

Allocate and zero entries.

◆ Fib_Clear()

void Fib_Clear ( Fib fib)

Delete all entries.

Precondition
Calling thread is registered as RCU read-side thread, but does not hold rcu_read_lock.

◆ Fib_Erase()

void Fib_Erase ( Fib fib,
FibEntry entry 
)

Erase given FIB entry.

Precondition
Calling thread holds rcu_read_lock.

◆ Fib_Get()

FibEntry* Fib_Get ( Fib fib,
LName  name,
uint64_t  hash 
)

Retrieve FIB entry.

Precondition
Calling thread holds rcu_read_lock, which must be retained until it stops using the returned entry.
Returns
Virtual or real entry, or NULL if it does not exist.

◆ Fib_Lpm()

FibEntry* Fib_Lpm ( Fib fib,
const PName name 
)

Perform longest prefix match.

Precondition
Calling thread holds rcu_read_lock, which must be retained until it stops using the returned entry.
Returns
Real entry, or NULL if it does not exist.

◆ Fib_Write()

void Fib_Write ( Fib fib,
FibEntry entry 
)

Insert or replace a FIB entry.

Parameters
entryan entry allocated from FIB mempool.
Precondition
Calling thread holds rcu_read_lock.