X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fnat%2Fdslite_in2out.c;h=cbb5d987d0135fa901c26b2a7d4b442882f3f19c;hb=fd0d50879f475a1b15cedb4ab49059a02c45ccfd;hp=5c1de19b8b2cb994b6e6a3947cc2459e01dba178;hpb=775f73c6baaf9bc2283e7ab9752c81984823be99;p=vpp.git diff --git a/src/plugins/nat/dslite_in2out.c b/src/plugins/nat/dslite_in2out.c index 5c1de19b8b2..cbb5d987d01 100644 --- a/src/plugins/nat/dslite_in2out.c +++ b/src/plugins/nat/dslite_in2out.c @@ -71,6 +71,10 @@ slow_path (dslite_main_t * dm, dslite_session_key_t * in2out_key, b4_index = b4_kv.value = b4 - dm->per_thread_data[thread_index].b4s; clib_bihash_add_del_16_8 (&dm->per_thread_data[thread_index].b4_hash, &b4_kv, 1); + + vlib_set_simple_counter (&dm->total_b4s, thread_index, 0, + pool_elts (dm-> + per_thread_data[thread_index].b4s)); } else { @@ -139,6 +143,10 @@ slow_path (dslite_main_t * dm, dslite_session_key_t * in2out_key, clib_dlist_addtail (dm->per_thread_data[thread_index].list_pool, s->per_b4_list_head_index, elt - dm->per_thread_data[thread_index].list_pool); + + vlib_set_simple_counter (&dm->total_sessions, thread_index, 0, + pool_elts (dm->per_thread_data + [thread_index].sessions)); } s->in2out = *in2out_key;