FreeBSD kernel IPv4 code
in_fib_dxr.c File Reference
#include <sys/cdefs.h>
#include "opt_inet.h"
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/ctype.h>
#include <sys/epoch.h>
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
#include <sys/syslog.h>
#include <vm/uma.h>
#include <netinet/in.h>
#include <netinet/in_fib.h>
#include <net/route.h>
#include <net/route/route_ctl.h>
#include <net/route/fib_algo.h>
Include dependency graph for in_fib_dxr.c:

Go to the source code of this file.

Data Structures

struct  direct_entry
 
struct  range_entry_long
 
struct  range_entry_short
 
struct  heap_entry
 
struct  chunk_desc
 
struct  trie_desc
 
struct  dxr_aux
 
struct  dxr
 

Macros

#define DXR_TRIE_BITS   20
 
#define DXR2
 
#define DXR_D   16
 
#define D_TBL_SIZE   (1 << DXR_D)
 
#define DIRECT_TBL_SIZE   (1 << DXR_TRIE_BITS)
 
#define DXR_RANGE_MASK   (0xffffffffU >> DXR_TRIE_BITS)
 
#define DXR_RANGE_SHIFT   (32 - DXR_TRIE_BITS)
 
#define DESC_BASE_BITS   22
 
#define DESC_FRAGMENTS_BITS   (32 - DESC_BASE_BITS)
 
#define BASE_MAX   ((1 << DESC_BASE_BITS) - 1)
 
#define RTBL_SIZE_INCR   (BASE_MAX / 64)
 
#define FRAGS_MASK_SHORT   ((1 << (23 - DXR_TRIE_BITS)) - 1)
 
#define FRAGS_PREF_SHORT
 
#define FRAGS_MARK_XL   (FRAGS_PREF_SHORT - 1)
 
#define FRAGS_MARK_HIT   (FRAGS_PREF_SHORT - 2)
 
#define IS_SHORT_FORMAT(x)   ((x & FRAGS_PREF_SHORT) == FRAGS_PREF_SHORT)
 
#define IS_LONG_FORMAT(x)   ((x & FRAGS_PREF_SHORT) != FRAGS_PREF_SHORT)
 
#define IS_XL_FORMAT(x)   (x == FRAGS_MARK_XL)
 
#define RE_SHORT_MAX_NH   ((1 << (DXR_TRIE_BITS - 8)) - 1)
 
#define CHUNK_HASH_BITS   16
 
#define CHUNK_HASH_SIZE   (1 << CHUNK_HASH_BITS)
 
#define CHUNK_HASH_MASK   (CHUNK_HASH_SIZE - 1)
 
#define TRIE_HASH_BITS   16
 
#define TRIE_HASH_SIZE   (1 << TRIE_HASH_BITS)
 
#define TRIE_HASH_MASK   (TRIE_HASH_SIZE - 1)
 
#define XTBL_SIZE_INCR   (DIRECT_TBL_SIZE / 16)
 
#define UNUSED_BUCKETS   8
 
#define V_frag_limit   VNET(frag_limit)
 
#define DXR_LOOKUP_STAGE
 
#define DXR_LOOKUP_DEFINE(D)
 

Functions

 __FBSDID ("$FreeBSD$")
 
 CTASSERT (DXR_TRIE_BITS >=16 &&DXR_TRIE_BITS<=24)
 
static MALLOC_DEFINE (M_DXRLPM, "dxr", "DXR LPM")
 
static MALLOC_DEFINE (M_DXRAUX, "dxr aux", "DXR auxiliary")
 
 VNET_DEFINE_STATIC (int, frag_limit)
 
static int range_lookup (struct range_entry_long *rt, struct direct_entry de, uint32_t dst)
 
static int dxr_lookup (struct dxr *dxr, uint32_t dst)
 
static void initheap (struct dxr_aux *da, uint32_t dst_u32, uint32_t chunk)
 
static uint32_t chunk_size (struct dxr_aux *da, struct direct_entry *fdesc)
 
static uint32_t chunk_hash (struct dxr_aux *da, struct direct_entry *fdesc)
 
static int chunk_ref (struct dxr_aux *da, uint32_t chunk)
 
static void chunk_unref (struct dxr_aux *da, uint32_t chunk)
 
static uint32_t trie_hash (struct dxr_aux *da, uint32_t dxr_x, uint32_t index)
 
static int trie_ref (struct dxr_aux *da, uint32_t index)
 
static void trie_unref (struct dxr_aux *da, uint32_t index)
 
static void heap_inject (struct dxr_aux *da, uint32_t start, uint32_t end, uint32_t preflen, uint32_t nh)
 
static int dxr_walk (struct rtentry *rt, void *arg)
 
static int update_chunk (struct dxr_aux *da, uint32_t chunk)
 
static void dxr_build (struct dxr *dxr)
 
static struct nhop_object * dxr_fib_lookup (void *algo_data, const struct flm_lookup_key key, uint32_t scopeid)
 
static enum flm_op_result dxr_init (uint32_t fibnum, struct fib_data *fd, void *old_data, void **data)
 
static void dxr_destroy (void *data)
 
static void epoch_dxr_destroy (epoch_context_t ctx)
 
static void * choose_lookup_fn (struct dxr_aux *da)
 
static enum flm_op_result dxr_dump_end (void *data, struct fib_dp *dp)
 
static enum flm_op_result dxr_dump_rib_item (struct rtentry *rt, void *data)
 
static enum flm_op_result dxr_change_rib_item (struct rib_head *rnh, struct rib_cmd_info *rc, void *data)
 
static enum flm_op_result dxr_change_rib_batch (struct rib_head *rnh, struct fib_change_queue *q, void *data)
 
static uint8_t dxr_get_pref (const struct rib_rtable_info *rinfo)
 
 SYSCTL_DECL (_net_route_algo)
 
 SYSCTL_NODE (_net_route_algo, OID_AUTO, dxr, CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "DXR tunables")
 
static int sysctl_dxr_frag_limit (SYSCTL_HANDLER_ARGS)
 
 SYSCTL_PROC (_net_route_algo_dxr, OID_AUTO, frag_limit, CTLTYPE_STRING|CTLFLAG_RW|CTLFLAG_VNET, 0, 0, sysctl_dxr_frag_limit, "A", "Fragmentation threshold to full rebuild")
 
static int dxr_modevent (module_t mod, int type, void *unused)
 
 DECLARE_MODULE (fib_dxr, dxr_mod, SI_SUB_PSEUDO, SI_ORDER_ANY)
 
 MODULE_VERSION (fib_dxr, 1)
 

Variables

uma_zone_t chunk_zone
 
uma_zone_t trie_zone
 
static struct fib_lookup_module fib_dxr_mod
 
static moduledata_t dxr_mod = {"fib_dxr", dxr_modevent, 0}
 

Macro Definition Documentation

◆ BASE_MAX

#define BASE_MAX   ((1 << DESC_BASE_BITS) - 1)

Definition at line 89 of file in_fib_dxr.c.

◆ CHUNK_HASH_BITS

#define CHUNK_HASH_BITS   16

Definition at line 108 of file in_fib_dxr.c.

◆ CHUNK_HASH_MASK

#define CHUNK_HASH_MASK   (CHUNK_HASH_SIZE - 1)

Definition at line 110 of file in_fib_dxr.c.

◆ CHUNK_HASH_SIZE

#define CHUNK_HASH_SIZE   (1 << CHUNK_HASH_BITS)

Definition at line 109 of file in_fib_dxr.c.

◆ D_TBL_SIZE

#define D_TBL_SIZE   (1 << DXR_D)

Definition at line 82 of file in_fib_dxr.c.

◆ DESC_BASE_BITS

#define DESC_BASE_BITS   22

Definition at line 87 of file in_fib_dxr.c.

◆ DESC_FRAGMENTS_BITS

#define DESC_FRAGMENTS_BITS   (32 - DESC_BASE_BITS)

Definition at line 88 of file in_fib_dxr.c.

◆ DIRECT_TBL_SIZE

#define DIRECT_TBL_SIZE   (1 << DXR_TRIE_BITS)

Definition at line 83 of file in_fib_dxr.c.

◆ DXR2

#define DXR2

Definition at line 74 of file in_fib_dxr.c.

◆ DXR_D

#define DXR_D   16

Definition at line 77 of file in_fib_dxr.c.

◆ DXR_LOOKUP_DEFINE

#define DXR_LOOKUP_DEFINE (   D)
Value:
static int inline \
dxr_lookup_##D(struct dxr *dxr, uint32_t dst) \
{ \
struct direct_entry de; \
uint16_t *dt = dxr->d; \
struct direct_entry *xt = dxr->x; \
\
de = xt[(dt[dst >> (32 - (D))] << (DXR_TRIE_BITS - (D))) \
+ ((dst >> DXR_RANGE_SHIFT) & \
(0xffffffffU >> (32 - DXR_TRIE_BITS + (D))))]; \
if (__predict_true(de.fragments == FRAGS_MARK_HIT)) \
return (de.base); \
return (range_lookup(dxr->r, de, dst)); \
} \
\
static struct nhop_object * \
dxr_fib_lookup_##D(void *algo_data, \
const struct flm_lookup_key key, uint32_t scopeid __unused) \
{ \
struct dxr *dxr = algo_data; \
\
return (dxr->nh_tbl[dxr_lookup_##D(dxr, \
ntohl(key.addr4.s_addr))]); \
}
__uint32_t uint32_t
Definition: in.h:62
#define DXR_TRIE_BITS
Definition: in_fib_dxr.c:69
#define FRAGS_MARK_HIT
Definition: in_fib_dxr.c:100
static int range_lookup(struct range_entry_long *rt, struct direct_entry de, uint32_t dst)
Definition: in_fib_dxr.c:252
#define DXR_RANGE_SHIFT
Definition: in_fib_dxr.c:85
Definition: in_fib_dxr.c:122
void * r
Definition: in_fib_dxr.c:215
void * x
Definition: in_fib_dxr.c:214
struct nhop_object ** nh_tbl
Definition: in_fib_dxr.c:216
void * d
Definition: in_fib_dxr.c:213

Definition at line 296 of file in_fib_dxr.c.

◆ DXR_LOOKUP_STAGE

#define DXR_LOOKUP_STAGE
Value:
if (masked_dst < range[middle].start) { \
upperbound = middle; \
middle = (middle + lowerbound) / 2; \
} else if (masked_dst < range[middle + 1].start) \
return (range[middle].nexthop); \
else { \
lowerbound = middle + 1; \
middle = (upperbound + middle + 1) / 2; \
} \
if (upperbound == lowerbound) \
return (range[lowerbound].nexthop);

Definition at line 238 of file in_fib_dxr.c.

◆ DXR_RANGE_MASK

#define DXR_RANGE_MASK   (0xffffffffU >> DXR_TRIE_BITS)

Definition at line 84 of file in_fib_dxr.c.

◆ DXR_RANGE_SHIFT

#define DXR_RANGE_SHIFT   (32 - DXR_TRIE_BITS)

Definition at line 85 of file in_fib_dxr.c.

◆ DXR_TRIE_BITS

#define DXR_TRIE_BITS   20

Definition at line 69 of file in_fib_dxr.c.

◆ FRAGS_MARK_HIT

#define FRAGS_MARK_HIT   (FRAGS_PREF_SHORT - 2)

Definition at line 100 of file in_fib_dxr.c.

◆ FRAGS_MARK_XL

#define FRAGS_MARK_XL   (FRAGS_PREF_SHORT - 1)

Definition at line 99 of file in_fib_dxr.c.

◆ FRAGS_MASK_SHORT

#define FRAGS_MASK_SHORT   ((1 << (23 - DXR_TRIE_BITS)) - 1)

Definition at line 93 of file in_fib_dxr.c.

◆ FRAGS_PREF_SHORT

#define FRAGS_PREF_SHORT
Value:
(((1 << DESC_FRAGMENTS_BITS) - 1) & \
~FRAGS_MASK_SHORT)
#define DESC_FRAGMENTS_BITS
Definition: in_fib_dxr.c:88

Definition at line 97 of file in_fib_dxr.c.

◆ IS_LONG_FORMAT

#define IS_LONG_FORMAT (   x)    ((x & FRAGS_PREF_SHORT) != FRAGS_PREF_SHORT)

Definition at line 103 of file in_fib_dxr.c.

◆ IS_SHORT_FORMAT

#define IS_SHORT_FORMAT (   x)    ((x & FRAGS_PREF_SHORT) == FRAGS_PREF_SHORT)

Definition at line 102 of file in_fib_dxr.c.

◆ IS_XL_FORMAT

#define IS_XL_FORMAT (   x)    (x == FRAGS_MARK_XL)

Definition at line 104 of file in_fib_dxr.c.

◆ RE_SHORT_MAX_NH

#define RE_SHORT_MAX_NH   ((1 << (DXR_TRIE_BITS - 8)) - 1)

Definition at line 106 of file in_fib_dxr.c.

◆ RTBL_SIZE_INCR

#define RTBL_SIZE_INCR   (BASE_MAX / 64)

Definition at line 90 of file in_fib_dxr.c.

◆ TRIE_HASH_BITS

#define TRIE_HASH_BITS   16

Definition at line 112 of file in_fib_dxr.c.

◆ TRIE_HASH_MASK

#define TRIE_HASH_MASK   (TRIE_HASH_SIZE - 1)

Definition at line 114 of file in_fib_dxr.c.

◆ TRIE_HASH_SIZE

#define TRIE_HASH_SIZE   (1 << TRIE_HASH_BITS)

Definition at line 113 of file in_fib_dxr.c.

◆ UNUSED_BUCKETS

#define UNUSED_BUCKETS   8

Definition at line 118 of file in_fib_dxr.c.

◆ V_frag_limit

#define V_frag_limit   VNET(frag_limit)

Definition at line 235 of file in_fib_dxr.c.

◆ XTBL_SIZE_INCR

#define XTBL_SIZE_INCR   (DIRECT_TBL_SIZE / 16)

Definition at line 116 of file in_fib_dxr.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ choose_lookup_fn()

static void * choose_lookup_fn ( struct dxr_aux da)
static

Definition at line 1181 of file in_fib_dxr.c.

References dxr_fib_lookup().

Referenced by dxr_change_rib_batch(), and dxr_dump_end().

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

◆ chunk_hash()

static uint32_t chunk_hash ( struct dxr_aux da,
struct direct_entry fdesc 
)
static

Definition at line 395 of file in_fib_dxr.c.

References direct_entry::base, chunk_size(), direct_entry::fragments, and dxr_aux::range_tbl.

Referenced by chunk_ref(), and chunk_unref().

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

◆ chunk_ref()

static int chunk_ref ( struct dxr_aux da,
uint32_t  chunk 
)
static

Definition at line 409 of file in_fib_dxr.c.

References direct_entry::base, BASE_MAX, chunk_hash(), CHUNK_HASH_MASK, chunk_size(), chunk_zone, dxr_aux::direct_tbl, dxr_aux::fd, FRAGS_PREF_SHORT, dxr_aux::range_tbl, RTBL_SIZE_INCR, and UNUSED_BUCKETS.

Referenced by update_chunk().

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

◆ chunk_size()

static uint32_t chunk_size ( struct dxr_aux da,
struct direct_entry fdesc 
)
static

Definition at line 383 of file in_fib_dxr.c.

References direct_entry::base, direct_entry::fragments, dxr_aux::fragments, FRAGS_MASK_SHORT, IS_SHORT_FORMAT, IS_XL_FORMAT, and dxr_aux::range_tbl.

Referenced by chunk_hash(), chunk_ref(), and chunk_unref().

Here is the caller graph for this function:

◆ chunk_unref()

static void chunk_unref ( struct dxr_aux da,
uint32_t  chunk 
)
static

Definition at line 510 of file in_fib_dxr.c.

References direct_entry::base, chunk_hash(), CHUNK_HASH_MASK, chunk_size(), chunk_zone, dxr_aux::direct_tbl, dxr_aux::range_tbl, and UNUSED_BUCKETS.

Referenced by update_chunk().

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

◆ CTASSERT()

CTASSERT ( DXR_TRIE_BITS >=16 &&DXR_TRIE_BITS<=  24)

◆ DECLARE_MODULE()

DECLARE_MODULE ( fib_dxr  ,
dxr_mod  ,
SI_SUB_PSEUDO  ,
SI_ORDER_ANY   
)

◆ dxr_build()

◆ dxr_change_rib_batch()

static enum flm_op_result dxr_change_rib_batch ( struct rib_head *  rnh,
struct fib_change_queue *  q,
void *  data 
)
static

◆ dxr_change_rib_item()

static enum flm_op_result dxr_change_rib_item ( struct rib_head *  rnh,
struct rib_cmd_info *  rc,
void *  data 
)
static

Definition at line 1243 of file in_fib_dxr.c.

◆ dxr_destroy()

static void dxr_destroy ( void *  data)
static

Definition at line 1142 of file in_fib_dxr.c.

References dxr::aux, chunk_zone, dxr::d, dxr_aux::range_tbl, dxr_aux::refcnt, trie_zone, and dxr_aux::x_tbl.

Referenced by dxr_change_rib_batch(), and epoch_dxr_destroy().

Here is the caller graph for this function:

◆ dxr_dump_end()

static enum flm_op_result dxr_dump_end ( void *  data,
struct fib_dp *  dp 
)
static

Definition at line 1210 of file in_fib_dxr.c.

References dxr::aux, BASE_MAX, choose_lookup_fn(), dxr::d, and dxr_build().

Here is the call graph for this function:

◆ dxr_dump_rib_item()

static enum flm_op_result dxr_dump_rib_item ( struct rtentry *  rt,
void *  data 
)
static

Definition at line 1236 of file in_fib_dxr.c.

◆ dxr_fib_lookup()

static struct nhop_object * dxr_fib_lookup ( void *  algo_data,
const struct flm_lookup_key  key,
uint32_t  scopeid 
)
static

Definition at line 1107 of file in_fib_dxr.c.

References dxr_lookup(), and dxr::nh_tbl.

Referenced by choose_lookup_fn().

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

◆ dxr_get_pref()

static uint8_t dxr_get_pref ( const struct rib_rtable_info *  rinfo)
static

Definition at line 1339 of file in_fib_dxr.c.

◆ dxr_init()

static enum flm_op_result dxr_init ( uint32_t  fibnum,
struct fib_data *  fd,
void *  old_data,
void **  data 
)
static

Definition at line 1116 of file in_fib_dxr.c.

References dxr::aux, dxr::d, dxr::fd, dxr::fibnum, and dxr_aux::refcnt.

Referenced by dxr_change_rib_batch().

Here is the caller graph for this function:

◆ dxr_lookup()

static int dxr_lookup ( struct dxr dxr,
uint32_t  dst 
)
inlinestatic

Definition at line 336 of file in_fib_dxr.c.

References direct_entry::base, dxr::d, dxr::d_shift, DXR_RANGE_SHIFT, direct_entry::fragments, FRAGS_MARK_HIT, dxr::r, range_lookup(), dxr::x, dxr::x_mask, and dxr::x_shift.

Referenced by dxr_fib_lookup().

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

◆ dxr_modevent()

static int dxr_modevent ( module_t  mod,
int  type,
void *  unused 
)
static

Definition at line 1399 of file in_fib_dxr.c.

References chunk_zone, fib_dxr_mod, and trie_zone.

◆ dxr_walk()

static int dxr_walk ( struct rtentry *  rt,
void *  arg 
)
static

Definition at line 700 of file in_fib_dxr.c.

References DXR_RANGE_MASK, DXR_RANGE_SHIFT, heap_entry::end, dxr_aux::fd, heap_inject(), initheap(), range_entry_long::nexthop, heap_entry::nexthop, heap_entry::preflen, dxr_aux::range_tbl, dxr_aux::re, in_addr::s_addr, range_entry_long::start, and heap_entry::start.

Referenced by update_chunk().

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

◆ epoch_dxr_destroy()

static void epoch_dxr_destroy ( epoch_context_t  ctx)
static

Definition at line 1173 of file in_fib_dxr.c.

References dxr_destroy(), and dxr::epoch_ctx.

Referenced by dxr_change_rib_batch().

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

◆ heap_inject()

static void heap_inject ( struct dxr_aux da,
uint32_t  start,
uint32_t  end,
uint32_t  preflen,
uint32_t  nh 
)
static

Definition at line 676 of file in_fib_dxr.c.

References heap_entry::end, heap_entry::nexthop, heap_entry::preflen, and heap_entry::start.

Referenced by dxr_walk().

Here is the caller graph for this function:

◆ initheap()

static void initheap ( struct dxr_aux da,
uint32_t  dst_u32,
uint32_t  chunk 
)
static

Definition at line 356 of file in_fib_dxr.c.

References heap_entry::end, dxr_aux::fd, fib4_lookup_rt(), dxr_aux::fibnum, heap_entry::nexthop, heap_entry::preflen, in_addr::s_addr, and heap_entry::start.

Referenced by dxr_walk(), and update_chunk().

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

◆ MALLOC_DEFINE() [1/2]

static MALLOC_DEFINE ( M_DXRAUX  ,
"dxr aux"  ,
"DXR auxiliary"   
)
static

◆ MALLOC_DEFINE() [2/2]

static MALLOC_DEFINE ( M_DXRLPM  ,
"dxr"  ,
"DXR LPM"   
)
static

◆ MODULE_VERSION()

MODULE_VERSION ( fib_dxr  ,
 
)

◆ range_lookup()

static int range_lookup ( struct range_entry_long rt,
struct direct_entry  de,
uint32_t  dst 
)
static

Definition at line 252 of file in_fib_dxr.c.

References direct_entry::base, DXR_LOOKUP_STAGE, DXR_RANGE_MASK, direct_entry::fragments, FRAGS_MASK_SHORT, IS_SHORT_FORMAT, and IS_XL_FORMAT.

Referenced by dxr_lookup().

Here is the caller graph for this function:

◆ SYSCTL_DECL()

SYSCTL_DECL ( _net_route_algo  )

◆ sysctl_dxr_frag_limit()

static int sysctl_dxr_frag_limit ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 1351 of file in_fib_dxr.c.

References V_frag_limit.

◆ SYSCTL_NODE()

SYSCTL_NODE ( _net_route_algo  ,
OID_AUTO  ,
dxr  ,
CTLFLAG_RW|  CTLFLAG_MPSAFE,
,
"DXR tunables"   
)

◆ SYSCTL_PROC()

SYSCTL_PROC ( _net_route_algo_dxr  ,
OID_AUTO  ,
frag_limit  ,
CTLTYPE_STRING|CTLFLAG_RW|  CTLFLAG_VNET,
,
,
sysctl_dxr_frag_limit  ,
"A"  ,
"Fragmentation threshold to full rebuild"   
)

◆ trie_hash()

static uint32_t trie_hash ( struct dxr_aux da,
uint32_t  dxr_x,
uint32_t  index 
)
static

Definition at line 579 of file in_fib_dxr.c.

References dxr_aux::direct_tbl.

Referenced by trie_ref().

Here is the caller graph for this function:

◆ trie_ref()

static int trie_ref ( struct dxr_aux da,
uint32_t  index 
)
static

Definition at line 596 of file in_fib_dxr.c.

References dxr_aux::direct_tbl, DXR_TRIE_BITS, trie_hash(), TRIE_HASH_MASK, trie_zone, dxr_aux::trietbl, dxr_aux::x_tbl, and XTBL_SIZE_INCR.

Referenced by dxr_build().

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

◆ trie_unref()

static void trie_unref ( struct dxr_aux da,
uint32_t  index 
)
static

Definition at line 644 of file in_fib_dxr.c.

References trie_zone, and dxr_aux::trietbl.

Referenced by dxr_build().

Here is the caller graph for this function:

◆ update_chunk()

◆ VNET_DEFINE_STATIC()

VNET_DEFINE_STATIC ( int  ,
frag_limit   
)

Variable Documentation

◆ chunk_zone

uma_zone_t chunk_zone

Definition at line 231 of file in_fib_dxr.c.

Referenced by chunk_ref(), chunk_unref(), dxr_build(), dxr_destroy(), and dxr_modevent().

◆ dxr_mod

moduledata_t dxr_mod = {"fib_dxr", dxr_modevent, 0}
static

Definition at line 1423 of file in_fib_dxr.c.

◆ fib_dxr_mod

struct fib_lookup_module fib_dxr_mod
static
Initial value:
= {
.flm_name = "dxr",
.flm_family = AF_INET,
.flm_init_cb = dxr_init,
.flm_destroy_cb = dxr_destroy,
.flm_dump_rib_item_cb = dxr_dump_rib_item,
.flm_dump_end_cb = dxr_dump_end,
.flm_change_rib_item_cb = dxr_change_rib_item,
.flm_change_rib_items_cb = dxr_change_rib_batch,
.flm_get_pref = dxr_get_pref,
}
static void dxr_destroy(void *data)
Definition: in_fib_dxr.c:1142
static enum flm_op_result dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q, void *data)
Definition: in_fib_dxr.c:1251
static enum flm_op_result dxr_init(uint32_t fibnum, struct fib_data *fd, void *old_data, void **data)
Definition: in_fib_dxr.c:1116
static enum flm_op_result dxr_dump_end(void *data, struct fib_dp *dp)
Definition: in_fib_dxr.c:1210
static uint8_t dxr_get_pref(const struct rib_rtable_info *rinfo)
Definition: in_fib_dxr.c:1339
static enum flm_op_result dxr_dump_rib_item(struct rtentry *rt, void *data)
Definition: in_fib_dxr.c:1236
static enum flm_op_result dxr_change_rib_item(struct rib_head *rnh, struct rib_cmd_info *rc, void *data)
Definition: in_fib_dxr.c:1243

Definition at line 1386 of file in_fib_dxr.c.

Referenced by dxr_modevent().

◆ trie_zone

uma_zone_t trie_zone

Definition at line 232 of file in_fib_dxr.c.

Referenced by dxr_build(), dxr_destroy(), dxr_modevent(), trie_ref(), and trie_unref().