From 008dbe109ce2714be69ffb6549a0c0198a07f7d0 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Fri, 7 Sep 2018 09:32:36 -0700 Subject: Route counters in the stats segment route ADD API changed to return the stats segment index to use to read the counters Change-Id: I2ef41e01eaa2f9cfaa49d9c88968897793825925 Signed-off-by: Neale Ranns --- src/vnet/fib/fib_entry.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/vnet/fib/fib_entry.c') diff --git a/src/vnet/fib/fib_entry.c b/src/vnet/fib/fib_entry.c index 655526586cb..8d7ce00b9c0 100644 --- a/src/vnet/fib/fib_entry.c +++ b/src/vnet/fib/fib_entry.c @@ -1495,6 +1495,16 @@ fib_entry_set_flow_hash_config (fib_node_index_t fib_entry_index, } } +u32 +fib_entry_get_stats_index (fib_node_index_t fib_entry_index) +{ + fib_entry_t *fib_entry; + + fib_entry = fib_entry_get(fib_entry_index); + + return (fib_entry->fe_lb.dpoi_index); +} + static int fib_ip4_address_compare (const ip4_address_t * a1, const ip4_address_t * a2) -- cgit 1.2.3-korg