diff options
author | Jakub Grajciar <jgrajcia@cisco.com> | 2019-09-26 10:21:59 +0200 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2019-12-11 15:23:55 +0000 |
commit | 5d4c99f27ee89a823d993853fe6b52e12c9e6c58 (patch) | |
tree | 4d28f9790fdeb28bd9d6088d89adde072c51f8d1 /src/vat/api_format.c | |
parent | deaf97f4538ac84b4922ef9a14f29699ff898f91 (diff) |
devices: vhost API cleanup
Use consistent API types.
Type: fix
Change-Id: I2dec594cb834a45004edc9ca58ad7c7b4bd7ff06
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'src/vat/api_format.c')
-rw-r--r-- | src/vat/api_format.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c index 6e1ebf988b5..e4ef0b4916b 100644 --- a/src/vat/api_format.c +++ b/src/vat/api_format.c @@ -13116,11 +13116,18 @@ static void vl_api_sw_interface_vhost_user_details_t_handler (vl_api_sw_interface_vhost_user_details_t * mp) { vat_main_t *vam = &vat_main; + u64 features; + + features = + clib_net_to_host_u32 (mp->features_first_32) | ((u64) + clib_net_to_host_u32 + (mp->features_last_32) << + 32); print (vam->ofp, "%-25s %3" PRIu32 " %6" PRIu32 " %8x %6d %7d %s", (char *) mp->interface_name, ntohl (mp->sw_if_index), ntohl (mp->virtio_net_hdr_sz), - clib_net_to_host_u64 (mp->features), mp->is_server, + features, mp->is_server, ntohl (mp->num_regions), (char *) mp->sock_filename); print (vam->ofp, " Status: '%s'", strerror (ntohl (mp->sock_errno))); } @@ -13144,8 +13151,10 @@ static void vl_api_sw_interface_vhost_user_details_t_handler_json mp->interface_name); vat_json_object_add_uint (node, "virtio_net_hdr_sz", ntohl (mp->virtio_net_hdr_sz)); - vat_json_object_add_uint (node, "features", - clib_net_to_host_u64 (mp->features)); + vat_json_object_add_uint (node, "features_first_32", + clib_net_to_host_u32 (mp->features_first_32)); + vat_json_object_add_uint (node, "features_last_32", + clib_net_to_host_u32 (mp->features_last_32)); vat_json_object_add_uint (node, "is_server", mp->is_server); vat_json_object_add_string_copy (node, "sock_filename", mp->sock_filename); vat_json_object_add_uint (node, "num_regions", ntohl (mp->num_regions)); |