diff options
author | 2016-05-31 07:33:29 -0700 | |
---|---|---|
committer | 2016-07-12 15:12:58 +0000 | |
commit | 4ac74c9599c73510900c18ff4c86ca390993adac (patch) | |
tree | e02baf9178ddad4f1cf810f04c33af1c2fd33f42 /vpp/vpp-api/api.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 'vpp/vpp-api/api.c')
-rw-r--r-- | vpp/vpp-api/api.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vpp/vpp-api/api.c b/vpp/vpp-api/api.c index 4d4c71c6..9acda745 100644 --- a/vpp/vpp-api/api.c +++ b/vpp/vpp-api/api.c @@ -6328,6 +6328,12 @@ vl_api_policer_add_del_t_handler cfg.rb.kbps.eir_kbps = mp->eir; cfg.rb.kbps.cb_bytes = mp->cb; cfg.rb.kbps.eb_bytes = mp->eb; + cfg.conform_action.action_type = mp->conform_action_type; + cfg.conform_action.dscp = mp->conform_dscp; + cfg.exceed_action.action_type = mp->exceed_action_type; + cfg.exceed_action.dscp = mp->exceed_dscp; + cfg.violate_action.action_type = mp->violate_action_type; + cfg.violate_action.dscp = mp->violate_dscp; error = policer_add_del(vm, name, &cfg, mp->is_add); @@ -6357,6 +6363,12 @@ send_policer_details (u8 *name, mp->rate_type = config->rate_type; mp->round_type = config->rnd_type; mp->type = config->rfc; + mp->conform_action_type = config->conform_action.action_type; + mp->conform_dscp = config->conform_action.dscp; + mp->exceed_action_type = config->exceed_action.action_type; + mp->exceed_dscp = config->exceed_action.dscp; + mp->violate_action_type = config->violate_action.action_type; + mp->violate_dscp = config->violate_action.dscp; mp->single_rate = templ->single_rate ? 1 : 0; mp->color_aware = templ->color_aware ? 1 : 0; mp->scale = htonl(templ->scale); |