FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
replicate_dpo.h File Reference
+ Include dependency graph for replicate_dpo.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  replicate_main_t_
 replicate main More...
 
struct  replicate_t_
 The FIB DPO provieds;. More...
 

Macros

#define REP_NUM_INLINE_BUCKETS   4
 The number of buckets that a load-balance object can have and still fit in one cache-line. More...
 
#define REP_HAS_INLINE_BUCKETS(_rep)   ((_rep)->rep_n_buckets <= REP_NUM_INLINE_BUCKETS)
 

Typedefs

typedef struct replicate_main_t_ replicate_main_t
 replicate main More...
 
typedef enum replicate_flags_t_ replicate_flags_t
 Flags on the replicate DPO. More...
 
typedef struct replicate_t_ replicate_t
 The FIB DPO provieds;. More...
 
typedef enum replicate_format_flags_t_ replicate_format_flags_t
 Flags controlling load-balance formatting/display. More...
 

Enumerations

enum  replicate_flags_t_ { REPLICATE_FLAGS_NONE, REPLICATE_FLAGS_HAS_LOCAL }
 Flags on the replicate DPO. More...
 
enum  replicate_format_flags_t_ { REPLICATE_FORMAT_NONE, REPLICATE_FORMAT_DETAIL = (1 << 0) }
 Flags controlling load-balance formatting/display. More...
 

Functions

 STATIC_ASSERT (sizeof(replicate_t)<=CLIB_CACHE_LINE_BYTES, "A replicate object size exceeds one cacheline")
 
index_t replicate_create (u32 num_buckets, dpo_proto_t rep_proto)
 
void replicate_multipath_update (const dpo_id_t *dpo, load_balance_path_t *next_hops)
 
void replicate_set_bucket (index_t repi, u32 bucket, const dpo_id_t *next)
 
u8format_replicate (u8 *s, va_list *args)
 
const dpo_id_treplicate_get_bucket (index_t repi, u32 bucket)
 
int replicate_is_drop (const dpo_id_t *dpo)
 
u16 replicate_n_buckets (index_t repi)
 
index_t replicate_dup (replicate_flags_t flags, index_t repi)
 
static replicate_treplicate_get (index_t repi)
 
static const dpo_id_treplicate_get_bucket_i (const replicate_t *rep, u32 bucket)
 
void replicate_module_init (void)
 

Variables

replicate_main_t replicate_main
 The one instance of replicate main. More...
 
replicate_treplicate_pool
 The encapsulation breakages are for fast DP access. More...
 

Macro Definition Documentation

◆ REP_HAS_INLINE_BUCKETS

#define REP_HAS_INLINE_BUCKETS (   _rep)    ((_rep)->rep_n_buckets <= REP_NUM_INLINE_BUCKETS)

Definition at line 152 of file replicate_dpo.h.

◆ REP_NUM_INLINE_BUCKETS

#define REP_NUM_INLINE_BUCKETS   4

The number of buckets that a load-balance object can have and still fit in one cache-line.

Definition at line 47 of file replicate_dpo.h.

Typedef Documentation

◆ replicate_flags_t

Flags on the replicate DPO.

◆ replicate_format_flags_t

Flags controlling load-balance formatting/display.

◆ replicate_main_t

replicate main

◆ replicate_t

typedef struct replicate_t_ replicate_t

The FIB DPO provieds;.

  • load-balancing over the next DPOs in the chain/graph
  • per-route counters

Enumeration Type Documentation

◆ replicate_flags_t_

Flags on the replicate DPO.

Enumerator
REPLICATE_FLAGS_NONE 
REPLICATE_FLAGS_HAS_LOCAL 

Definition at line 52 of file replicate_dpo.h.

◆ replicate_format_flags_t_

Flags controlling load-balance formatting/display.

Enumerator
REPLICATE_FORMAT_NONE 
REPLICATE_FORMAT_DETAIL 

Definition at line 115 of file replicate_dpo.h.

Function Documentation

◆ format_replicate()

u8* format_replicate ( u8 s,
va_list *  args 
)

Definition at line 152 of file replicate_dpo.c.

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

◆ replicate_create()

index_t replicate_create ( u32  num_buckets,
dpo_proto_t  rep_proto 
)

Definition at line 192 of file replicate_dpo.c.

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

◆ replicate_dup()

index_t replicate_dup ( replicate_flags_t  flags,
index_t  repi 
)

Definition at line 523 of file replicate_dpo.c.

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

◆ replicate_get()

static replicate_t* replicate_get ( index_t  repi)
inlinestatic

Definition at line 146 of file replicate_dpo.h.

+ Here is the caller graph for this function:

◆ replicate_get_bucket()

const dpo_id_t* replicate_get_bucket ( index_t  repi,
u32  bucket 
)

Definition at line 252 of file replicate_dpo.c.

+ Here is the call graph for this function:

◆ replicate_get_bucket_i()

static const dpo_id_t* replicate_get_bucket_i ( const replicate_t rep,
u32  bucket 
)
inlinestatic

Definition at line 156 of file replicate_dpo.h.

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

◆ replicate_is_drop()

int replicate_is_drop ( const dpo_id_t dpo)

Definition at line 233 of file replicate_dpo.c.

+ Here is the call graph for this function:

◆ replicate_module_init()

void replicate_module_init ( void  )

Definition at line 667 of file replicate_dpo.c.

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

◆ replicate_multipath_update()

void replicate_multipath_update ( const dpo_id_t dpo,
load_balance_path_t next_hops 
)

Definition at line 318 of file replicate_dpo.c.

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

◆ replicate_n_buckets()

u16 replicate_n_buckets ( index_t  repi)

◆ replicate_set_bucket()

void replicate_set_bucket ( index_t  repi,
u32  bucket,
const dpo_id_t next 
)

Definition at line 216 of file replicate_dpo.c.

+ Here is the call graph for this function:

◆ STATIC_ASSERT()

STATIC_ASSERT ( sizeof(replicate_t)<=  CLIB_CACHE_LINE_BYTES,
"A replicate object size exceeds one cacheline"   
)

Variable Documentation

◆ replicate_main

replicate_main_t replicate_main

The one instance of replicate main.

Definition at line 62 of file replicate_dpo.c.

◆ replicate_pool

replicate_t* replicate_pool

The encapsulation breakages are for fast DP access.

The encapsulation breakages are for fast DP access.

It's not static so the DP can have fast access

Definition at line 57 of file replicate_dpo.c.