blob: 9b057552c00bb1b2fa2b043b977493d3fcb164a3 [file] [log] [blame]
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +01001/*
2 * Copyright (c) 2015-2016 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +020016option version = "4.0.0";
17
18import "vnet/interface_types.api";
19import "vnet/ethernet/ethernet_types.api";
20import "vnet/devices/virtio/virtio_types.api";
Dave Barach0d056e52017-09-28 15:11:16 -040021
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010022/** \brief vhost-user interface create request
23 @param client_index - opaque cookie to identify the sender
24 @param is_server - our side is socket server
25 @param sock_filename - unix socket filename, used to speak with frontend
26 @param use_custom_mac - enable or disable the use of the provided hardware address
Mohsin Kazmiee2e58f2018-08-21 16:07:03 +020027 @param disable_mrg_rxbuf - disable the use of merge receive buffers
28 @param disable_indirect_desc - disable the use of indirect descriptors which driver can use
Steven Luong4208a4c2019-05-06 08:51:56 -070029 @param enable_gso - enable gso support (default 0)
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010030 @param mac_address - hardware address to use if 'use_custom_mac' is set
31*/
32define create_vhost_user_if
33{
34 u32 client_index;
35 u32 context;
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +020036 bool is_server;
37 string sock_filename[256];
38 bool renumber;
39 bool disable_mrg_rxbuf;
40 bool disable_indirect_desc;
41 bool enable_gso;
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010042 u32 custom_dev_instance;
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +020043 bool use_custom_mac;
44 vl_api_mac_address_t mac_address;
45 string tag[64];
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010046};
47
48/** \brief vhost-user interface create response
49 @param context - sender context, to match reply w/ request
50 @param retval - return code for the request
51 @param sw_if_index - interface the operation is applied to
52*/
53define create_vhost_user_if_reply
54{
55 u32 context;
56 i32 retval;
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +020057 vl_api_interface_index_t sw_if_index;
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010058};
59
60/** \brief vhost-user interface modify request
61 @param client_index - opaque cookie to identify the sender
62 @param is_server - our side is socket server
63 @param sock_filename - unix socket filename, used to speak with frontend
Steven Luong4208a4c2019-05-06 08:51:56 -070064 @param enable_gso - enable gso support (default 0)
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010065*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040066autoreply define modify_vhost_user_if
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010067{
68 u32 client_index;
69 u32 context;
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +020070 vl_api_interface_index_t sw_if_index;
71 bool is_server;
72 string sock_filename[256];
73 bool renumber;
74 bool enable_gso;
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010075 u32 custom_dev_instance;
76};
77
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010078/** \brief vhost-user interface delete request
79 @param client_index - opaque cookie to identify the sender
80*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040081autoreply define delete_vhost_user_if
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010082{
83 u32 client_index;
84 u32 context;
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +020085 vl_api_interface_index_t sw_if_index;
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010086};
87
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010088/** \brief Vhost-user interface details structure (fix this)
89 @param sw_if_index - index of the interface
90 @param interface_name - name of interface
91 @param virtio_net_hdr_sz - net header size
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +020092 @param features_first_32 - interface features, first 32 bits
93 @param features_last_32 - interface features, last 32 bits
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010094 @param is_server - vhost-user server socket
95 @param sock_filename - socket filename
96 @param num_regions - number of used memory regions
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +020097 @param sock_errno - socket errno
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010098*/
99define sw_interface_vhost_user_details
100{
101 u32 context;
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +0200102 vl_api_interface_index_t sw_if_index;
103 string interface_name[64];
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +0100104 u32 virtio_net_hdr_sz;
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +0200105 vl_api_virtio_net_features_first_32_t features_first_32;
106 vl_api_virtio_net_features_last_32_t features_last_32;
107 bool is_server;
108 string sock_filename[256];
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +0100109 u32 num_regions;
110 i32 sock_errno;
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +0100111};
112
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +0200113/** \brief Vhost-user interface dump request
114 @param sw_if_index - filter by sw_if_index UNIMPLEMENTED
115*/
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +0100116define sw_interface_vhost_user_dump
117{
118 u32 client_index;
119 u32 context;
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +0200120 vl_api_interface_index_t sw_if_index [default=0xffffffff];
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +0100121};
122/*
123 * Local Variables:
124 * eval: (c-set-style "gnu")
125 * End:
126 */