From 56494e9c09f1a1fb58b54c9ed31ff5c99b6a0a6f Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Wed, 23 Aug 2017 00:51:42 -0700 Subject: gpe: add l2 lb counters Change-Id: I81b3fc6266ad02239b6f1a216adc283efdcf0dce Signed-off-by: Florin Coras --- src/vnet/lisp-gpe/interface.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/vnet/lisp-gpe') diff --git a/src/vnet/lisp-gpe/interface.c b/src/vnet/lisp-gpe/interface.c index 52b939f0e8b..e832c23fd8e 100644 --- a/src/vnet/lisp-gpe/interface.c +++ b/src/vnet/lisp-gpe/interface.c @@ -239,6 +239,8 @@ l2_lisp_gpe_interface_tx (vlib_main_t * vm, vlib_node_runtime_t * node, { u32 n_left_from, next_index, *from, *to_next; lisp_gpe_main_t *lgm = &lisp_gpe_main; + u32 thread_index = vlib_get_thread_index (); + vlib_combined_counter_main_t *cm = &load_balance_main.lbm_to_counters; from = vlib_frame_vector_args (from_frame); n_left_from = from_frame->n_vectors; @@ -274,7 +276,9 @@ l2_lisp_gpe_interface_tx (vlib_main_t * vm, vlib_node_runtime_t * node, e0->src_address, e0->dst_address); vnet_buffer (b0)->ip.adj_index[VLIB_TX] = lbi0; - + vlib_increment_combined_counter (cm, thread_index, lbi0, 1, + vlib_buffer_length_in_chain (vm, + b0)); if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED)) { l2_lisp_gpe_tx_trace_t *tr = vlib_add_trace (vm, node, b0, -- cgit 1.2.3-korg