diff options
author | Jakub Grajciar <jgrajcia@cisco.com> | 2020-03-02 13:16:53 +0100 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2020-03-12 12:28:47 +0000 |
commit | cd01fb4237b78a1805e1dd4b018bd03eb342580c (patch) | |
tree | ec01ce74afa4a061bd9575f23101a31e589fa65f /src/vnet/policer/policer_api.c | |
parent | f52420d507f0ff810f5146b7153781e313d7bc07 (diff) |
policer: API cleanup
Use consistent API types.
Type: fix
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ia14f33992353b419b70b55beed63ab8ed6a2e837
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'src/vnet/policer/policer_api.c')
-rw-r--r-- | src/vnet/policer/policer_api.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/src/vnet/policer/policer_api.c b/src/vnet/policer/policer_api.c index ae57a9359ea..b543a3c2e0e 100644 --- a/src/vnet/policer/policer_api.c +++ b/src/vnet/policer/policer_api.c @@ -68,12 +68,16 @@ vl_api_policer_add_del_t_handler (vl_api_policer_add_del_t * mp) cfg.rb.kbps.eir_kbps = ntohl (mp->eir); cfg.rb.kbps.cb_bytes = clib_net_to_host_u64 (mp->cb); cfg.rb.kbps.eb_bytes = clib_net_to_host_u64 (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; + cfg.conform_action.action_type = + (sse2_qos_action_type_en) mp->conform_action.type; + cfg.conform_action.dscp = mp->conform_action.dscp; + cfg.exceed_action.action_type = + (sse2_qos_action_type_en) mp->exceed_action.type; + cfg.exceed_action.dscp = mp->exceed_action.dscp; + cfg.violate_action.action_type = + (sse2_qos_action_type_en) mp->violate_action.type; + cfg.violate_action.dscp = mp->violate_action.dscp; + cfg.color_aware = mp->color_aware; error = policer_add_del (vm, name, &cfg, &policer_index, mp->is_add); @@ -111,12 +115,15 @@ 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->conform_action.type = + (vl_api_sse2_qos_action_type_t) config->conform_action.action_type; + mp->conform_action.dscp = config->conform_action.dscp; + mp->exceed_action.type = + (vl_api_sse2_qos_action_type_t) config->exceed_action.action_type; + mp->exceed_action.dscp = config->exceed_action.dscp; + mp->violate_action.type = + (vl_api_sse2_qos_action_type_t) config->violate_action.action_type; + mp->violate_action.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); |