X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fipsec%2Fah_decrypt.c;h=629e7f031c4f4fd514a78160b6a25b9a69df94fd;hb=eba31ecebed1a7d168da17194cab7a8955761f2b;hp=7d2bf814fcc2546056286c1af2e83749545ef606;hpb=684586786e98bc779e269c0d879a2a4d3f1f4bce;p=vpp.git diff --git a/src/vnet/ipsec/ah_decrypt.c b/src/vnet/ipsec/ah_decrypt.c index 7d2bf814fcc..629e7f031c4 100644 --- a/src/vnet/ipsec/ah_decrypt.c +++ b/src/vnet/ipsec/ah_decrypt.c @@ -81,7 +81,7 @@ ah_decrypt_inline (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame, int is_ip6) { - u32 n_left_from, *from, next_index, *to_next; + u32 n_left_from, *from, next_index, *to_next, thread_index; ipsec_main_t *im = &ipsec_main; ipsec_proto_main_t *em = &ipsec_proto_main; from = vlib_frame_vector_args (from_frame); @@ -89,6 +89,7 @@ ah_decrypt_inline (vlib_main_t * vm, int icv_size = 0; next_index = node->cached_next_index; + thread_index = vm->thread_index; while (n_left_from > 0) { @@ -131,6 +132,9 @@ ah_decrypt_inline (vlib_main_t * vm, sa_index0 = vnet_buffer (i_b0)->ipsec.sad_index; sa0 = pool_elt_at_index (im->sad, sa_index0); + vlib_prefetch_combined_counter (&ipsec_sa_counters, + thread_index, sa_index0); + if (is_ip6) { ip6_ext_header_t *prev = NULL; @@ -164,8 +168,10 @@ ah_decrypt_inline (vlib_main_t * vm, } } + vlib_increment_combined_counter + (&ipsec_sa_counters, thread_index, sa_index0, + 1, i_b0->current_length); - sa0->total_data_size += i_b0->current_length; icv_size = em->ipsec_proto_main_integ_algs[sa0->integ_alg].trunc_size; if (PREDICT_TRUE (sa0->integ_alg != IPSEC_INTEG_ALG_NONE))