diff options
author | Florin Coras <fcoras@cisco.com> | 2017-08-23 00:51:42 -0700 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2017-08-23 13:21:33 +0000 |
commit | 56494e9c09f1a1fb58b54c9ed31ff5c99b6a0a6f (patch) | |
tree | e39f7e0d69135c5f64d429a5f191a6e567a71d52 /src | |
parent | 2ba92e32e0197f676dd905e5edcb4ff3e1bec241 (diff) |
gpe: add l2 lb counters
Change-Id: I81b3fc6266ad02239b6f1a216adc283efdcf0dce
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/lisp-gpe/interface.c | 6 |
1 files changed, 5 insertions, 1 deletions
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, |