X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fdpo%2Fload_balance.h;h=dd9589f9ee881723254604244b6f8ea8a3e905e8;hb=eb987d3a09f669787014b1553f032219522149e1;hp=dc6485e688ac86154d941a79e94cfe18aa20b311;hpb=7cd468a3d7dee7d6c92f69a0bb7061ae208ec727;p=vpp.git diff --git a/src/vnet/dpo/load_balance.h b/src/vnet/dpo/load_balance.h index dc6485e688a..dd9589f9ee8 100644 --- a/src/vnet/dpo/load_balance.h +++ b/src/vnet/dpo/load_balance.h @@ -36,6 +36,7 @@ #include #include #include +#include /** * Load-balance main @@ -81,6 +82,12 @@ typedef struct load_balance_path_t_ { * - per-route counters */ typedef struct load_balance_t_ { + /** + * required for pool_get_aligned. + * memebers used in the switch path come first! + */ + CLIB_CACHE_LINE_ALIGN_MARK(cacheline0); + /** * number of buckets in the load-balance. always a power of 2. */ @@ -98,6 +105,11 @@ typedef struct load_balance_t_ { */ dpo_proto_t lb_proto; + /** + * Flags from the load-balance's associated fib_entry_t + */ + fib_entry_flag_t lb_fib_entry_flags; + /** * The number of locks, which is approximately the number of users, * of this load-balance. @@ -159,7 +171,7 @@ extern index_t load_balance_create(u32 num_buckets, flow_hash_config_t fhc); extern void load_balance_multipath_update( const dpo_id_t *dpo, - load_balance_path_t * raw_next_hops, + const load_balance_path_t * raw_next_hops, load_balance_flags_t flags); extern void load_balance_set_bucket(index_t lbi, @@ -167,6 +179,8 @@ extern void load_balance_set_bucket(index_t lbi, const dpo_id_t *next); extern void load_balance_set_urpf(index_t lbi, index_t urpf); +extern void load_balance_set_fib_entry_flags(index_t lbi, + fib_entry_flag_t flags); extern index_t load_balance_get_urpf(index_t lbi); extern u8* format_load_balance(u8 * s, va_list * args); @@ -174,6 +188,7 @@ extern u8* format_load_balance(u8 * s, va_list * args); extern const dpo_id_t *load_balance_get_bucket(index_t lbi, u32 bucket); extern int load_balance_is_drop(const dpo_id_t *dpo); +extern u16 load_balance_n_buckets(index_t lbi); extern f64 load_balance_get_multipath_tolerance(void);