aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/policer/node_funcs.c
diff options
context:
space:
mode:
authorBrian Russell <brian@graphiant.com>2021-02-18 10:25:23 +0000
committerNeale Ranns <neale@graphiant.com>2021-02-19 10:53:15 +0000
commitfce88656cc1b0da8731a71c4a6efa759e0df3fa8 (patch)
tree52d58afa787b5d6b0ffcabc70f99e8313c4875df /src/vnet/policer/node_funcs.c
parent6e6920d4e096bd158a0057ce0f8dd8a08cbabf72 (diff)
policer: move handoff checks into policer code
The IP punt policer currently checks if it needs to do worker thread handoff based on the thread index stored in the policer. Move this functionality into the policer code so it can be common for all users of the policer. Type: improvement Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: Ia8d11e62898a58b19d7b27b296f8369baa3e5aa1
Diffstat (limited to 'src/vnet/policer/node_funcs.c')
-rw-r--r--src/vnet/policer/node_funcs.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/vnet/policer/node_funcs.c b/src/vnet/policer/node_funcs.c
index 30e5c505364..be8ce58799a 100644
--- a/src/vnet/policer/node_funcs.c
+++ b/src/vnet/policer/node_funcs.c
@@ -127,10 +127,10 @@ vnet_policer_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
pi1 = pm->policer_index_by_sw_if_index[sw_if_index1];
act0 = vnet_policer_police (vm, b0, pi0, time_in_policer_periods,
- POLICE_CONFORM /* no chaining */ );
+ POLICE_CONFORM /* no chaining */, false);
act1 = vnet_policer_police (vm, b1, pi1, time_in_policer_periods,
- POLICE_CONFORM /* no chaining */ );
+ POLICE_CONFORM /* no chaining */, false);
if (PREDICT_FALSE (act0 == QOS_ACTION_DROP)) /* drop action */
{
@@ -201,7 +201,7 @@ vnet_policer_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
pi0 = pm->policer_index_by_sw_if_index[sw_if_index0];
act0 = vnet_policer_police (vm, b0, pi0, time_in_policer_periods,
- POLICE_CONFORM /* no chaining */ );
+ POLICE_CONFORM /* no chaining */, false);
if (PREDICT_FALSE (act0 == QOS_ACTION_DROP)) /* drop action */
{
@@ -496,11 +496,9 @@ policer_classify_inline (vlib_main_t * vm,
if (e0)
{
- act0 = vnet_policer_police (vm,
- b0,
- e0->next_index,
+ act0 = vnet_policer_police (vm, b0, e0->next_index,
time_in_policer_periods,
- e0->opaque_index);
+ e0->opaque_index, false);
if (PREDICT_FALSE (act0 == QOS_ACTION_DROP))
{
next0 = POLICER_CLASSIFY_NEXT_INDEX_DROP;
@@ -530,11 +528,9 @@ policer_classify_inline (vlib_main_t * vm,
vnet_classify_find_entry (t0, (u8 *) h0, hash0, now);
if (e0)
{
- act0 = vnet_policer_police (vm,
- b0,
- e0->next_index,
+ act0 = vnet_policer_police (vm, b0, e0->next_index,
time_in_policer_periods,
- e0->opaque_index);
+ e0->opaque_index, false);
if (PREDICT_FALSE (act0 == QOS_ACTION_DROP))
{
next0 = POLICER_CLASSIFY_NEXT_INDEX_DROP;