diff options
Diffstat (limited to 'src/vnet/dpo')
-rw-r--r-- | src/vnet/dpo/load_balance.c | 10 | ||||
-rw-r--r-- | src/vnet/dpo/load_balance.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/vnet/dpo/load_balance.c b/src/vnet/dpo/load_balance.c index 807455597f8..db0ebcdceb8 100644 --- a/src/vnet/dpo/load_balance.c +++ b/src/vnet/dpo/load_balance.c @@ -198,6 +198,16 @@ load_balance_create (u32 n_buckets, return (load_balance_get_index(load_balance_create_i(n_buckets, lb_proto, fhc))); } +u16 +load_balance_n_buckets (index_t lbi) +{ + load_balance_t *lb; + + lb = load_balance_get(lbi); + + return (lb->lb_n_buckets); +} + static inline void load_balance_set_bucket_i (load_balance_t *lb, u32 bucket, diff --git a/src/vnet/dpo/load_balance.h b/src/vnet/dpo/load_balance.h index b901c5beb84..d37f07d579f 100644 --- a/src/vnet/dpo/load_balance.h +++ b/src/vnet/dpo/load_balance.h @@ -182,6 +182,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); |