blob: b026ba768a9d28508ce9e8d9a19f1737792fc905 [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
Steven Luong27ba5002020-11-17 13:30:44 -080016option version = "4.1.1";
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +020017
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)
Steven Luongbc0d9ff2020-03-23 09:34:59 -070030 @param enable_packed - enable packed ring support (default 0)
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010031 @param mac_address - hardware address to use if 'use_custom_mac' is set
32*/
33define create_vhost_user_if
34{
Steven Luong27ba5002020-11-17 13:30:44 -080035 option deprecated;
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010036 u32 client_index;
37 u32 context;
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +020038 bool is_server;
39 string sock_filename[256];
40 bool renumber;
41 bool disable_mrg_rxbuf;
42 bool disable_indirect_desc;
43 bool enable_gso;
Steven Luongbc0d9ff2020-03-23 09:34:59 -070044 bool enable_packed;
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010045 u32 custom_dev_instance;
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +020046 bool use_custom_mac;
47 vl_api_mac_address_t mac_address;
48 string tag[64];
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010049};
50
51/** \brief vhost-user interface create response
52 @param context - sender context, to match reply w/ request
53 @param retval - return code for the request
54 @param sw_if_index - interface the operation is applied to
55*/
56define create_vhost_user_if_reply
57{
Steven Luong27ba5002020-11-17 13:30:44 -080058 option deprecated;
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010059 u32 context;
60 i32 retval;
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +020061 vl_api_interface_index_t sw_if_index;
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010062};
63
64/** \brief vhost-user interface modify request
65 @param client_index - opaque cookie to identify the sender
66 @param is_server - our side is socket server
67 @param sock_filename - unix socket filename, used to speak with frontend
Steven Luong4208a4c2019-05-06 08:51:56 -070068 @param enable_gso - enable gso support (default 0)
Steven Luongbc0d9ff2020-03-23 09:34:59 -070069 @param enable_packed - enable packed ring support (default 0)
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010070*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040071autoreply define modify_vhost_user_if
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010072{
Steven Luong27ba5002020-11-17 13:30:44 -080073 option deprecated;
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010074 u32 client_index;
75 u32 context;
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +020076 vl_api_interface_index_t sw_if_index;
77 bool is_server;
78 string sock_filename[256];
79 bool renumber;
80 bool enable_gso;
Steven Luongbc0d9ff2020-03-23 09:34:59 -070081 bool enable_packed;
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +010082 u32 custom_dev_instance;
83};
84
Steven Luong27ba5002020-11-17 13:30:44 -080085/** \brief vhost-user interface create request
86 @param client_index - opaque cookie to identify the sender
87 @param is_server - our side is socket server
88 @param sock_filename - unix socket filename, used to speak with frontend
89 @param use_custom_mac - enable or disable the use of the provided hardware address
90 @param disable_mrg_rxbuf - disable the use of merge receive buffers
91 @param disable_indirect_desc - disable the use of indirect descriptors which driver can use
92 @param enable_gso - enable gso support (default 0)
93 @param enable_packed - enable packed ring support (default 0)
94 @param enable_event_idx - enable event_idx support (default 0)
95 @param mac_address - hardware address to use if 'use_custom_mac' is set
96 @param renumber - if true, use custom_dev_instance is valid
97 @param custom_dev_instance - custom device instance number
98*/
99define create_vhost_user_if_v2
100{
101 u32 client_index;
102 u32 context;
103 bool is_server;
104 string sock_filename[256];
105 bool renumber;
106 bool disable_mrg_rxbuf;
107 bool disable_indirect_desc;
108 bool enable_gso;
109 bool enable_packed;
110 bool enable_event_idx;
111 u32 custom_dev_instance;
112 bool use_custom_mac;
113 vl_api_mac_address_t mac_address;
114 string tag[64];
115};
116
117/** \brief vhost-user interface create response
118 @param context - sender context, to match reply w/ request
119 @param retval - return code for the request
120 @param sw_if_index - interface the operation is applied to
121*/
122define create_vhost_user_if_v2_reply
123{
124 u32 context;
125 i32 retval;
126 vl_api_interface_index_t sw_if_index;
127};
128
129/** \brief vhost-user interface modify request
130 @param client_index - opaque cookie to identify the sender
131 @param is_server - our side is socket server
132 @param sock_filename - unix socket filename, used to speak with frontend
133 @param enable_gso - enable gso support (default 0)
134 @param enable_packed - enable packed ring support (default 0)
135 @param enable_event_idx - enable event idx support (default 0)
136 @param renumber - if true, use custom_dev_instance is valid
137 @param custom_dev_instance - custom device instance number
138*/
139autoreply define modify_vhost_user_if_v2
140{
141 u32 client_index;
142 u32 context;
143 vl_api_interface_index_t sw_if_index;
144 bool is_server;
145 string sock_filename[256];
146 bool renumber;
147 bool enable_gso;
148 bool enable_packed;
149 bool enable_event_idx;
150 u32 custom_dev_instance;
151};
152
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +0100153/** \brief vhost-user interface delete request
154 @param client_index - opaque cookie to identify the sender
155*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400156autoreply define delete_vhost_user_if
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +0100157{
158 u32 client_index;
159 u32 context;
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +0200160 vl_api_interface_index_t sw_if_index;
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +0100161};
162
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +0100163/** \brief Vhost-user interface details structure (fix this)
164 @param sw_if_index - index of the interface
165 @param interface_name - name of interface
166 @param virtio_net_hdr_sz - net header size
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +0200167 @param features_first_32 - interface features, first 32 bits
168 @param features_last_32 - interface features, last 32 bits
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +0100169 @param is_server - vhost-user server socket
170 @param sock_filename - socket filename
171 @param num_regions - number of used memory regions
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +0200172 @param sock_errno - socket errno
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +0100173*/
174define sw_interface_vhost_user_details
175{
176 u32 context;
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +0200177 vl_api_interface_index_t sw_if_index;
178 string interface_name[64];
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +0100179 u32 virtio_net_hdr_sz;
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +0200180 vl_api_virtio_net_features_first_32_t features_first_32;
181 vl_api_virtio_net_features_last_32_t features_last_32;
182 bool is_server;
183 string sock_filename[256];
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +0100184 u32 num_regions;
185 i32 sock_errno;
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +0100186};
187
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +0200188/** \brief Vhost-user interface dump request
Steven Luonga0e8d962020-05-18 17:12:56 -0700189 @param sw_if_index - filter by sw_if_index
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +0200190*/
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +0100191define sw_interface_vhost_user_dump
192{
193 u32 client_index;
194 u32 context;
Jakub Grajciar5d4c99f2019-09-26 10:21:59 +0200195 vl_api_interface_index_t sw_if_index [default=0xffffffff];
Pavel Kotucekf07dc9e2016-12-20 12:17:37 +0100196};
197/*
198 * Local Variables:
199 * eval: (c-set-style "gnu")
200 * End:
201 */