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 | bc0d9ff | 2020-03-23 09:34:59 -0700 | [diff] [blame] | 16 | option version = "4.0.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 | { |
| 35 | u32 client_index; |
| 36 | u32 context; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 37 | bool is_server; |
| 38 | string sock_filename[256]; |
| 39 | bool renumber; |
| 40 | bool disable_mrg_rxbuf; |
| 41 | bool disable_indirect_desc; |
| 42 | bool enable_gso; |
Steven Luong | bc0d9ff | 2020-03-23 09:34:59 -0700 | [diff] [blame] | 43 | bool enable_packed; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 44 | u32 custom_dev_instance; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 45 | bool use_custom_mac; |
| 46 | vl_api_mac_address_t mac_address; |
| 47 | string tag[64]; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 48 | }; |
| 49 | |
| 50 | /** \brief vhost-user interface create response |
| 51 | @param context - sender context, to match reply w/ request |
| 52 | @param retval - return code for the request |
| 53 | @param sw_if_index - interface the operation is applied to |
| 54 | */ |
| 55 | define create_vhost_user_if_reply |
| 56 | { |
| 57 | u32 context; |
| 58 | i32 retval; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 59 | vl_api_interface_index_t sw_if_index; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 60 | }; |
| 61 | |
| 62 | /** \brief vhost-user interface modify request |
| 63 | @param client_index - opaque cookie to identify the sender |
| 64 | @param is_server - our side is socket server |
| 65 | @param sock_filename - unix socket filename, used to speak with frontend |
Steven Luong | 4208a4c | 2019-05-06 08:51:56 -0700 | [diff] [blame] | 66 | @param enable_gso - enable gso support (default 0) |
Steven Luong | bc0d9ff | 2020-03-23 09:34:59 -0700 | [diff] [blame] | 67 | @param enable_packed - enable packed ring support (default 0) |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 68 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 69 | autoreply define modify_vhost_user_if |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 70 | { |
| 71 | u32 client_index; |
| 72 | u32 context; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 73 | vl_api_interface_index_t sw_if_index; |
| 74 | bool is_server; |
| 75 | string sock_filename[256]; |
| 76 | bool renumber; |
| 77 | bool enable_gso; |
Steven Luong | bc0d9ff | 2020-03-23 09:34:59 -0700 | [diff] [blame] | 78 | bool enable_packed; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 79 | u32 custom_dev_instance; |
| 80 | }; |
| 81 | |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 82 | /** \brief vhost-user interface delete request |
| 83 | @param client_index - opaque cookie to identify the sender |
| 84 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 85 | autoreply define delete_vhost_user_if |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 86 | { |
| 87 | u32 client_index; |
| 88 | u32 context; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 89 | vl_api_interface_index_t sw_if_index; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 90 | }; |
| 91 | |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 92 | /** \brief Vhost-user interface details structure (fix this) |
| 93 | @param sw_if_index - index of the interface |
| 94 | @param interface_name - name of interface |
| 95 | @param virtio_net_hdr_sz - net header size |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 96 | @param features_first_32 - interface features, first 32 bits |
| 97 | @param features_last_32 - interface features, last 32 bits |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 98 | @param is_server - vhost-user server socket |
| 99 | @param sock_filename - socket filename |
| 100 | @param num_regions - number of used memory regions |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 101 | @param sock_errno - socket errno |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 102 | */ |
| 103 | define sw_interface_vhost_user_details |
| 104 | { |
| 105 | u32 context; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 106 | vl_api_interface_index_t sw_if_index; |
| 107 | string interface_name[64]; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 108 | u32 virtio_net_hdr_sz; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 109 | vl_api_virtio_net_features_first_32_t features_first_32; |
| 110 | vl_api_virtio_net_features_last_32_t features_last_32; |
| 111 | bool is_server; |
| 112 | string sock_filename[256]; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 113 | u32 num_regions; |
| 114 | i32 sock_errno; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 115 | }; |
| 116 | |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 117 | /** \brief Vhost-user interface dump request |
Steven Luong | a0e8d96 | 2020-05-18 17:12:56 -0700 | [diff] [blame] | 118 | @param sw_if_index - filter by sw_if_index |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 119 | */ |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 120 | define sw_interface_vhost_user_dump |
| 121 | { |
| 122 | u32 client_index; |
| 123 | u32 context; |
Jakub Grajciar | 5d4c99f | 2019-09-26 10:21:59 +0200 | [diff] [blame] | 124 | vl_api_interface_index_t sw_if_index [default=0xffffffff]; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 125 | }; |
| 126 | /* |
| 127 | * Local Variables: |
| 128 | * eval: (c-set-style "gnu") |
| 129 | * End: |
| 130 | */ |