20 #ifndef __REPLICATE_DPO_H__ 21 #define __REPLICATE_DPO_H__ 47 #define REP_NUM_INLINE_BUCKETS 4 110 "A replicate object size exceeds one cacheline");
152 #define REP_HAS_INLINE_BUCKETS(_rep) \ 153 ((_rep)->rep_n_buckets <= REP_NUM_INLINE_BUCKETS) 159 ASSERT(bucket < rep->rep_n_buckets);
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
vl_api_wireguard_peer_flags_t flags
const dpo_id_t * replicate_get_bucket(index_t repi, u32 bucket)
Definitions for all things IP (v4|v6) unicast and multicast lookup related.
void replicate_set_bucket(index_t repi, u32 bucket, const dpo_id_t *next)
u32 rep_locks
The number of locks, which is approximately the number of users, of this load-balance.
enum replicate_format_flags_t_ replicate_format_flags_t
Flags controlling load-balance formatting/display.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
dpo_proto_t rep_proto
The protocol of packets that traverse this REP.
index_t replicate_create(u32 num_buckets, dpo_proto_t rep_proto)
enum replicate_flags_t_ replicate_flags_t
Flags on the replicate DPO.
index_t replicate_dup(replicate_flags_t flags, index_t repi)
dpo_id_t * rep_buckets
Vector of buckets containing the next DPOs, sized as repo_num.
static replicate_t * replicate_get(index_t repi)
replicate_t * replicate_pool
The encapsulation breakages are for fast DP access.
u16 replicate_n_buckets(index_t repi)
#define MPLS_IS_REPLICATE
The top bit of the index, which is the result of the MPLS lookup is used to determine if the DPO is a...
replicate_main_t replicate_main
The one instance of replicate main.
#define REP_HAS_INLINE_BUCKETS(_rep)
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
int replicate_is_drop(const dpo_id_t *dpo)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
replicate_format_flags_t_
Flags controlling load-balance formatting/display.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
struct replicate_main_t_ replicate_main_t
replicate main
vlib_combined_counter_main_t repm_counters
dpo_id_t rep_buckets_inline[REP_NUM_INLINE_BUCKETS]
The rest of the cache line is used for buckets.
u8 * format_replicate(u8 *s, va_list *args)
void replicate_multipath_update(const dpo_id_t *dpo, load_balance_path_t *next_hops)
u16 rep_n_buckets
number of buckets in the replicate.
replicate_flags_t_
Flags on the replicate DPO.
STATIC_ASSERT(sizeof(replicate_t)<=CLIB_CACHE_LINE_BYTES, "A replicate object size exceeds one cacheline")
#define REP_NUM_INLINE_BUCKETS
The number of buckets that a load-balance object can have and still fit in one cache-line.
static const dpo_id_t * replicate_get_bucket_i(const replicate_t *rep, u32 bucket)
One path from an [EU]CMP set that the client wants to add to a load-balance object.
A collection of combined counters.
void replicate_module_init(void)
replicate_flags_t rep_flags
Flags specifying the replicate properties/behaviour.
#define CLIB_CACHE_LINE_BYTES
struct replicate_t_ replicate_t
The FIB DPO provieds;.