Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 1 | /* |
| 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 Luong | 27ba500 | 2020-11-17 13:30:44 -0800 | [diff] [blame] | 16 | option version = "4.1.1"; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 17 | |
| 18 | import "vnet/interface_types.api"; |
| 19 | import "vnet/ethernet/ethernet_types.api"; |
| 20 | import "vnet/devices/virtio/virtio_types.api"; |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 21 | |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 22 | /** \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 Kazmi | ee2e58f | 2018-08-21 16:07:03 +0200 | [diff] [blame] | 27 | @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 Luong | 4208a4c | 2019-05-06 08:51:56 -0700 | [diff] [blame] | 29 | @param enable_gso - enable gso support (default 0) |
Steven Luong | bc0d9ff | 2020-03-23 09:34:59 -0700 | [diff] [blame] | 30 | @param enable_packed - enable packed ring support (default 0) |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 31 | @param mac_address - hardware address to use if 'use_custom_mac' is set |
| 32 | */ |
| 33 | define create_vhost_user_if |
| 34 | { |
Steven Luong | 27ba500 | 2020-11-17 13:30:44 -0800 | [diff] [blame] | 35 | option deprecated; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 36 | u32 client_index; |
| 37 | u32 context; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 38 | 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 Luong | bc0d9ff | 2020-03-23 09:34:59 -0700 | [diff] [blame] | 44 | bool enable_packed; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 45 | u32 custom_dev_instance; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 46 | bool use_custom_mac; |
| 47 | vl_api_mac_address_t mac_address; |
| 48 | string tag[64]; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 49 | }; |
| 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 | */ |
| 56 | define create_vhost_user_if_reply |
| 57 | { |
Steven Luong | 27ba500 | 2020-11-17 13:30:44 -0800 | [diff] [blame] | 58 | option deprecated; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 59 | u32 context; |
| 60 | i32 retval; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 61 | vl_api_interface_index_t sw_if_index; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 62 | }; |
| 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 Luong | 4208a4c | 2019-05-06 08:51:56 -0700 | [diff] [blame] | 68 | @param enable_gso - enable gso support (default 0) |
Steven Luong | bc0d9ff | 2020-03-23 09:34:59 -0700 | [diff] [blame] | 69 | @param enable_packed - enable packed ring support (default 0) |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 70 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 71 | autoreply define modify_vhost_user_if |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 72 | { |
Steven Luong | 27ba500 | 2020-11-17 13:30:44 -0800 | [diff] [blame] | 73 | option deprecated; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 74 | u32 client_index; |
| 75 | u32 context; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 76 | 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 Luong | bc0d9ff | 2020-03-23 09:34:59 -0700 | [diff] [blame] | 81 | bool enable_packed; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 82 | u32 custom_dev_instance; |
| 83 | }; |
| 84 | |
Steven Luong | 27ba500 | 2020-11-17 13:30:44 -0800 | [diff] [blame] | 85 | /** \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 | */ |
| 99 | define 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 | */ |
| 122 | define 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 | */ |
| 139 | autoreply 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 Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 153 | /** \brief vhost-user interface delete request |
| 154 | @param client_index - opaque cookie to identify the sender |
| 155 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 156 | autoreply define delete_vhost_user_if |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 157 | { |
| 158 | u32 client_index; |
| 159 | u32 context; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 160 | vl_api_interface_index_t sw_if_index; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 161 | }; |
| 162 | |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 163 | /** \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 Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 167 | @param features_first_32 - interface features, first 32 bits |
| 168 | @param features_last_32 - interface features, last 32 bits |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 169 | @param is_server - vhost-user server socket |
| 170 | @param sock_filename - socket filename |
| 171 | @param num_regions - number of used memory regions |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 172 | @param sock_errno - socket errno |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 173 | */ |
| 174 | define sw_interface_vhost_user_details |
| 175 | { |
| 176 | u32 context; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 177 | vl_api_interface_index_t sw_if_index; |
| 178 | string interface_name[64]; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 179 | u32 virtio_net_hdr_sz; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 180 | 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 Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 184 | u32 num_regions; |
| 185 | i32 sock_errno; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 186 | }; |
| 187 | |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 188 | /** \brief Vhost-user interface dump request |
Steven Luong | a0e8d96 | 2020-05-18 17:12:56 -0700 | [diff] [blame] | 189 | @param sw_if_index - filter by sw_if_index |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 190 | */ |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 191 | define sw_interface_vhost_user_dump |
| 192 | { |
| 193 | u32 client_index; |
| 194 | u32 context; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 195 | vl_api_interface_index_t sw_if_index [default=0xffffffff]; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 196 | }; |
| 197 | /* |
| 198 | * Local Variables: |
| 199 | * eval: (c-set-style "gnu") |
| 200 | * End: |
| 201 | */ |