From 58da9ac6e691a8c660eb8ca838a154e11da0db68 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 22 Jul 2020 04:40:55 +0200 Subject: Fix binapigen decoding and minor improvements - fixed allocating byte slices before copying decoded data - simplified encoding functions - several minor improvements Change-Id: I6669424b89eb86333805cb1b57e4551169980cc2 Signed-off-by: Ondrej Fabry --- .../binapi2001/.vppapi/core/vhost_user.api.json | 528 +++++++++++++++++++++ 1 file changed, 528 insertions(+) create mode 100644 internal/testbinapi/binapi2001/.vppapi/core/vhost_user.api.json (limited to 'internal/testbinapi/binapi2001/.vppapi/core/vhost_user.api.json') diff --git a/internal/testbinapi/binapi2001/.vppapi/core/vhost_user.api.json b/internal/testbinapi/binapi2001/.vppapi/core/vhost_user.api.json new file mode 100644 index 0000000..839ade2 --- /dev/null +++ b/internal/testbinapi/binapi2001/.vppapi/core/vhost_user.api.json @@ -0,0 +1,528 @@ +{ + "types": [], + "messages": [ + [ + "create_vhost_user_if", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "bool", + "is_server" + ], + [ + "string", + "sock_filename", + 256 + ], + [ + "bool", + "renumber" + ], + [ + "bool", + "disable_mrg_rxbuf" + ], + [ + "bool", + "disable_indirect_desc" + ], + [ + "bool", + "enable_gso" + ], + [ + "u32", + "custom_dev_instance" + ], + [ + "bool", + "use_custom_mac" + ], + [ + "vl_api_mac_address_t", + "mac_address" + ], + [ + "string", + "tag", + 64 + ], + { + "crc": "0x591ee951" + } + ], + [ + "create_vhost_user_if_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + [ + "vl_api_interface_index_t", + "sw_if_index" + ], + { + "crc": "0x5383d31f" + } + ], + [ + "modify_vhost_user_if", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "vl_api_interface_index_t", + "sw_if_index" + ], + [ + "bool", + "is_server" + ], + [ + "string", + "sock_filename", + 256 + ], + [ + "bool", + "renumber" + ], + [ + "bool", + "enable_gso" + ], + [ + "u32", + "custom_dev_instance" + ], + { + "crc": "0xfcfeaf16" + } + ], + [ + "modify_vhost_user_if_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "delete_vhost_user_if", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "vl_api_interface_index_t", + "sw_if_index" + ], + { + "crc": "0xf9e6675e" + } + ], + [ + "delete_vhost_user_if_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "sw_interface_vhost_user_details", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "vl_api_interface_index_t", + "sw_if_index" + ], + [ + "string", + "interface_name", + 64 + ], + [ + "u32", + "virtio_net_hdr_sz" + ], + [ + "vl_api_virtio_net_features_first_32_t", + "features_first_32" + ], + [ + "vl_api_virtio_net_features_last_32_t", + "features_last_32" + ], + [ + "bool", + "is_server" + ], + [ + "string", + "sock_filename", + 256 + ], + [ + "u32", + "num_regions" + ], + [ + "i32", + "sock_errno" + ], + { + "crc": "0x98530df1" + } + ], + [ + "sw_interface_vhost_user_dump", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "vl_api_interface_index_t", + "sw_if_index", + { + "default": 4294967295 + } + ], + { + "crc": "0xf9e6675e" + } + ] + ], + "unions": [], + "enums": [ + [ + "if_status_flags", + [ + "IF_STATUS_API_FLAG_ADMIN_UP", + 1 + ], + [ + "IF_STATUS_API_FLAG_LINK_UP", + 2 + ], + { + "enumtype": "u32" + } + ], + [ + "mtu_proto", + [ + "MTU_PROTO_API_L3", + 1 + ], + [ + "MTU_PROTO_API_IP4", + 2 + ], + [ + "MTU_PROTO_API_IP6", + 3 + ], + [ + "MTU_PROTO_API_MPLS", + 4 + ], + [ + "MTU_PROTO_API_N", + 5 + ], + { + "enumtype": "u32" + } + ], + [ + "link_duplex", + [ + "LINK_DUPLEX_API_UNKNOWN", + 0 + ], + [ + "LINK_DUPLEX_API_HALF", + 1 + ], + [ + "LINK_DUPLEX_API_FULL", + 2 + ], + { + "enumtype": "u32" + } + ], + [ + "sub_if_flags", + [ + "SUB_IF_API_FLAG_NO_TAGS", + 1 + ], + [ + "SUB_IF_API_FLAG_ONE_TAG", + 2 + ], + [ + "SUB_IF_API_FLAG_TWO_TAGS", + 4 + ], + [ + "SUB_IF_API_FLAG_DOT1AD", + 8 + ], + [ + "SUB_IF_API_FLAG_EXACT_MATCH", + 16 + ], + [ + "SUB_IF_API_FLAG_DEFAULT", + 32 + ], + [ + "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY", + 64 + ], + [ + "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY", + 128 + ], + [ + "SUB_IF_API_FLAG_MASK_VNET", + 254 + ], + [ + "SUB_IF_API_FLAG_DOT1AH", + 256 + ], + { + "enumtype": "u32" + } + ], + [ + "rx_mode", + [ + "RX_MODE_API_UNKNOWN", + 0 + ], + [ + "RX_MODE_API_POLLING", + 1 + ], + [ + "RX_MODE_API_INTERRUPT", + 2 + ], + [ + "RX_MODE_API_ADAPTIVE", + 3 + ], + [ + "RX_MODE_API_DEFAULT", + 4 + ], + { + "enumtype": "u32" + } + ], + [ + "if_type", + [ + "IF_API_TYPE_HARDWARE", + 1 + ], + [ + "IF_API_TYPE_SUB", + 2 + ], + [ + "IF_API_TYPE_P2P", + 3 + ], + [ + "IF_API_TYPE_PIPE", + 4 + ], + { + "enumtype": "u32" + } + ], + [ + "virtio_net_features_first_32", + [ + "VIRTIO_NET_F_API_CSUM", + 1 + ], + [ + "VIRTIO_NET_F_API_GUEST_CSUM", + 2 + ], + [ + "VIRTIO_NET_F_API_GUEST_TSO4", + 128 + ], + [ + "VIRTIO_NET_F_API_GUEST_TSO6", + 256 + ], + [ + "VIRTIO_NET_F_API_GUEST_UFO", + 1024 + ], + [ + "VIRTIO_NET_F_API_HOST_TSO4", + 2048 + ], + [ + "VIRTIO_NET_F_API_HOST_TSO6", + 4096 + ], + [ + "VIRTIO_NET_F_API_HOST_UFO", + 16384 + ], + [ + "VIRTIO_NET_F_API_MRG_RXBUF", + 32768 + ], + [ + "VIRTIO_NET_F_API_CTRL_VQ", + 131072 + ], + [ + "VIRTIO_NET_F_API_GUEST_ANNOUNCE", + 2097152 + ], + [ + "VIRTIO_NET_F_API_MQ", + 4194304 + ], + [ + "VHOST_F_API_LOG_ALL", + 67108864 + ], + [ + "VIRTIO_F_API_ANY_LAYOUT", + 134217728 + ], + [ + "VIRTIO_F_API_INDIRECT_DESC", + 268435456 + ], + [ + "VHOST_USER_F_API_PROTOCOL_FEATURES", + 1073741824 + ], + { + "enumtype": "u32" + } + ], + [ + "virtio_net_features_last_32", + [ + "VIRTIO_F_API_VERSION_1", + 1 + ], + { + "enumtype": "u32" + } + ] + ], + "services": { + "create_vhost_user_if": { + "reply": "create_vhost_user_if_reply" + }, + "modify_vhost_user_if": { + "reply": "modify_vhost_user_if_reply" + }, + "delete_vhost_user_if": { + "reply": "delete_vhost_user_if_reply" + }, + "sw_interface_vhost_user_dump": { + "reply": "sw_interface_vhost_user_details", + "stream": true + } + }, + "options": { + "version": "4.0.0" + }, + "aliases": { + "interface_index": { + "type": "u32" + }, + "mac_address": { + "type": "u8", + "length": 6 + } + }, + "vl_api_version": "0xb547a33d" +} -- cgit 1.2.3-korg