devices: vhost API cleanup
Use consistent API types.
Type: fix
Change-Id: I2dec594cb834a45004edc9ca58ad7c7b4bd7ff06
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
diff --git a/src/vnet/devices/virtio/vhost_user.api b/src/vnet/devices/virtio/vhost_user.api
index e08c735..9b05755 100644
--- a/src/vnet/devices/virtio/vhost_user.api
+++ b/src/vnet/devices/virtio/vhost_user.api
@@ -13,7 +13,11 @@
* limitations under the License.
*/
-option version = "3.0.0";
+option version = "4.0.0";
+
+import "vnet/interface_types.api";
+import "vnet/ethernet/ethernet_types.api";
+import "vnet/devices/virtio/virtio_types.api";
/** \brief vhost-user interface create request
@param client_index - opaque cookie to identify the sender
@@ -29,16 +33,16 @@
{
u32 client_index;
u32 context;
- u8 is_server;
- u8 sock_filename[256];
- u8 renumber;
- u8 disable_mrg_rxbuf;
- u8 disable_indirect_desc;
- u8 enable_gso;
+ bool is_server;
+ string sock_filename[256];
+ bool renumber;
+ bool disable_mrg_rxbuf;
+ bool disable_indirect_desc;
+ bool enable_gso;
u32 custom_dev_instance;
- u8 use_custom_mac;
- u8 mac_address[6];
- u8 tag[64];
+ bool use_custom_mac;
+ vl_api_mac_address_t mac_address;
+ string tag[64];
};
/** \brief vhost-user interface create response
@@ -50,7 +54,7 @@
{
u32 context;
i32 retval;
- u32 sw_if_index;
+ vl_api_interface_index_t sw_if_index;
};
/** \brief vhost-user interface modify request
@@ -63,11 +67,11 @@
{
u32 client_index;
u32 context;
- u32 sw_if_index;
- u8 is_server;
- u8 sock_filename[256];
- u8 renumber;
- u8 enable_gso;
+ vl_api_interface_index_t sw_if_index;
+ bool is_server;
+ string sock_filename[256];
+ bool renumber;
+ bool enable_gso;
u32 custom_dev_instance;
};
@@ -78,35 +82,42 @@
{
u32 client_index;
u32 context;
- u32 sw_if_index;
+ vl_api_interface_index_t sw_if_index;
};
/** \brief Vhost-user interface details structure (fix this)
@param sw_if_index - index of the interface
@param interface_name - name of interface
@param virtio_net_hdr_sz - net header size
- @param features - interface features
+ @param features_first_32 - interface features, first 32 bits
+ @param features_last_32 - interface features, last 32 bits
@param is_server - vhost-user server socket
@param sock_filename - socket filename
@param num_regions - number of used memory regions
+ @param sock_errno - socket errno
*/
define sw_interface_vhost_user_details
{
u32 context;
- u32 sw_if_index;
- u8 interface_name[64];
+ vl_api_interface_index_t sw_if_index;
+ string interface_name[64];
u32 virtio_net_hdr_sz;
- u64 features;
- u8 is_server;
- u8 sock_filename[256];
+ 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;
};
+/** \brief Vhost-user interface dump request
+ @param sw_if_index - filter by sw_if_index UNIMPLEMENTED
+*/
define sw_interface_vhost_user_dump
{
u32 client_index;
u32 context;
+ vl_api_interface_index_t sw_if_index [default=0xffffffff];
};
/*
* Local Variables: