NDN-DPDK
High-Speed Named Data Networking Forwarder
Loading...
Searching...
No Matches
fib.c File Reference
#include "fib.h"

Functions

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

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.