diff options
author | Matus Fabian <matfabia@cisco.com> | 2016-05-31 07:33:29 -0700 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2016-07-12 15:12:58 +0000 |
commit | 4ac74c9599c73510900c18ff4c86ca390993adac (patch) | |
tree | e02baf9178ddad4f1cf810f04c33af1c2fd33f42 /vnet/vnet/policer/xlate.c | |
parent | 41da02d96ba145a1778335391b8af7bbd1b4d6e6 (diff) |
policer action
JIRA: VPP-90
Policer allows you to specify the action to be taken on a packet:
conform-action (green color)
exceed-action (yellow color)
violate-action (red color)
Action to take on packets:
drop - drops the packet
transmit - transmits the packet, the packet is not altered
mark-and-transmit <DSCP> - sets the DSCP value and transmits the packet
Change-Id: I59c037e55e7e2a9fc9b9752e92426f3977f5587b
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'vnet/vnet/policer/xlate.c')
-rw-r--r-- | vnet/vnet/policer/xlate.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vnet/vnet/policer/xlate.c b/vnet/vnet/policer/xlate.c index d1eab304d39..f47982e31ee 100644 --- a/vnet/vnet/policer/xlate.c +++ b/vnet/vnet/policer/xlate.c @@ -1129,6 +1129,13 @@ sse2_pol_logical_2_physical (sse2_qos_pol_cfg_params_st *cfg, kbps_cfg.rnd_type = cfg->rnd_type; kbps_cfg.rfc = cfg->rfc; + phys->action[POLICE_CONFORM] = cfg->conform_action.action_type; + phys->mark_dscp[POLICE_CONFORM] = cfg->conform_action.dscp; + phys->action[POLICE_EXCEED] = cfg->exceed_action.action_type; + phys->mark_dscp[POLICE_EXCEED] = cfg->exceed_action.dscp; + phys->action[POLICE_VIOLATE] = cfg->violate_action.action_type; + phys->mark_dscp[POLICE_VIOLATE] = cfg->violate_action.dscp; + #if !defined (INTERNAL_SS) && !defined (X86) // convert logical into hw params which involves qos calculations rc = sse2_pol_compute_hw_params(&kbps_cfg, &pol_hw); |