|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
19 #ifndef __LOAD_BALANCE_MAP_H__
20 #define __LOAD_BALANCE_MAP_H__
97 ASSERT(bucket < lb->lb_n_buckets);
u32 lbm_locks
Number of locks.
static load_balance_map_t * load_balance_map_get(index_t lbmi)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
required for pool_get_aligned.
static u16 load_balance_map_translate(index_t lbmi, u16 bucket)
index_t lb_map
index of the load-balance map, INVALID if this LB does not use one
u16 * lbm_buckets
The buckets of the map that provide the index to index translation.
void load_balance_map_unlock(index_t lbmi)
static const dpo_id_t * load_balance_get_fwd_bucket(const load_balance_t *lb, u16 bucket)
void load_balance_map_show_mem(void)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
u32 fib_node_index_t
A typedef of a node index.
load_balance_map_t * load_balance_map_pool
The encapsulation breakages are for fast DP access.
#define LB_HAS_INLINE_BUCKETS(_lb)
index_t load_balance_map_add_or_lock(u32 n_buckets, u32 sum_of_weights, const load_balance_path_t *norm_paths)
struct load_balance_map_t_ load_balance_map_t
void load_balance_map_module_init(void)
Make/add a new or lock an existing Load-balance map.
void load_balance_map_lock(index_t lmbi)
dpo_id_t * lb_buckets
Vector of buckets containing the next DPOs, sized as lbo_num.
dpo_id_t lb_buckets_inline[LB_NUM_INLINE_BUCKETS]
The rest of the cache line is used for buckets.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
void load_balance_map_path_state_change(fib_node_index_t path_index)
the state of a path has changed (it has no doubt gone down).
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
u32 lbm_sum_of_norm_weights
the sum of the normalised weights.
One path from an [EU]CMP set that the client wants to add to a load-balance object.
u8 * format_load_balance_map(u8 *s, va_list *ap)
struct load_balance_map_path_t_ * lbm_paths
the vector of paths this MAP represents