summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vat/api_format.c4
-rw-r--r--src/vnet/policer/policer_api.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index d34a97f65cb..37b7f93e879 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -3630,8 +3630,8 @@ static void vl_api_policer_details_t_handler_json
vat_json_object_add_string_copy (node, "name", mp->name);
vat_json_object_add_uint (node, "cir", ntohl (mp->cir));
vat_json_object_add_uint (node, "eir", ntohl (mp->eir));
- vat_json_object_add_uint (node, "cb", ntohl (mp->cb));
- vat_json_object_add_uint (node, "eb", ntohl (mp->eb));
+ vat_json_object_add_uint (node, "cb", clib_net_to_host_u64 (mp->cb));
+ vat_json_object_add_uint (node, "eb", clib_net_to_host_u64 (mp->eb));
vat_json_object_add_string_copy (node, "rate_type", rate_type_str);
vat_json_object_add_string_copy (node, "round_type", round_type_str);
vat_json_object_add_string_copy (node, "type", type_str);
diff --git a/src/vnet/policer/policer_api.c b/src/vnet/policer/policer_api.c
index fb5f08b890d..67fb9a4e2b9 100644
--- a/src/vnet/policer/policer_api.c
+++ b/src/vnet/policer/policer_api.c
@@ -105,8 +105,8 @@ send_policer_details (u8 * name,
mp->context = context;
mp->cir = htonl (config->rb.kbps.cir_kbps);
mp->eir = htonl (config->rb.kbps.eir_kbps);
- mp->cb = htonl (config->rb.kbps.cb_bytes);
- mp->eb = htonl (config->rb.kbps.eb_bytes);
+ mp->cb = clib_host_to_net_u64 (config->rb.kbps.cb_bytes);
+ mp->eb = clib_host_to_net_u64 (config->rb.kbps.eb_bytes);
mp->rate_type = config->rate_type;
mp->round_type = config->rnd_type;
mp->type = config->rfc;