summaryrefslogtreecommitdiffstats
path: root/src/vnet/policer/police_inlines.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/policer/police_inlines.h')
-rw-r--r--src/vnet/policer/police_inlines.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/policer/police_inlines.h b/src/vnet/policer/police_inlines.h
index afcc7724cef..0ed973079a6 100644
--- a/src/vnet/policer/police_inlines.h
+++ b/src/vnet/policer/police_inlines.h
@@ -68,10 +68,16 @@ vnet_policer_police (vlib_main_t * vm,
policer_read_response_type_st *pol;
vnet_policer_main_t *pm = &vnet_policer_main;
+ /* Speculative prefetch assuming a conform result */
+ vlib_prefetch_combined_counter (&policer_counters[POLICE_CONFORM],
+ vm->thread_index, policer_index);
+
len = vlib_buffer_length_in_chain (vm, b);
pol = &pm->policers[policer_index];
col = vnet_police_packet (pol, len, packet_color, time_in_policer_periods);
act = pol->action[col];
+ vlib_increment_combined_counter (&policer_counters[col], vm->thread_index,
+ policer_index, 1, len);
if (PREDICT_TRUE (act == SSE2_QOS_ACTION_MARK_AND_TRANSMIT))
vnet_policer_mark (b, pol->mark_dscp[col]);