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 | |
| 16 | /** \brief vhost-user interface create request |
| 17 | @param client_index - opaque cookie to identify the sender |
| 18 | @param is_server - our side is socket server |
| 19 | @param sock_filename - unix socket filename, used to speak with frontend |
| 20 | @param use_custom_mac - enable or disable the use of the provided hardware address |
| 21 | @param mac_address - hardware address to use if 'use_custom_mac' is set |
Steven | a1a0901 | 2017-03-08 00:23:13 -0800 | [diff] [blame] | 22 | @param operation_mode - polling=0, interrupt=1, or adaptive=2 |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 23 | */ |
| 24 | define create_vhost_user_if |
| 25 | { |
| 26 | u32 client_index; |
| 27 | u32 context; |
| 28 | u8 is_server; |
| 29 | u8 sock_filename[256]; |
| 30 | u8 renumber; |
| 31 | u32 custom_dev_instance; |
| 32 | u8 use_custom_mac; |
| 33 | u8 mac_address[6]; |
| 34 | u8 tag[64]; |
Steven | a1a0901 | 2017-03-08 00:23:13 -0800 | [diff] [blame] | 35 | u8 operation_mode; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | /** \brief vhost-user interface create response |
| 39 | @param context - sender context, to match reply w/ request |
| 40 | @param retval - return code for the request |
| 41 | @param sw_if_index - interface the operation is applied to |
| 42 | */ |
| 43 | define create_vhost_user_if_reply |
| 44 | { |
| 45 | u32 context; |
| 46 | i32 retval; |
| 47 | u32 sw_if_index; |
| 48 | }; |
| 49 | |
| 50 | /** \brief vhost-user interface modify request |
| 51 | @param client_index - opaque cookie to identify the sender |
| 52 | @param is_server - our side is socket server |
| 53 | @param sock_filename - unix socket filename, used to speak with frontend |
Steven | a1a0901 | 2017-03-08 00:23:13 -0800 | [diff] [blame] | 54 | @param operation_mode - polling=0, interrupt=1, or adaptive=2 |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 55 | */ |
| 56 | define modify_vhost_user_if |
| 57 | { |
| 58 | u32 client_index; |
| 59 | u32 context; |
| 60 | u32 sw_if_index; |
| 61 | u8 is_server; |
| 62 | u8 sock_filename[256]; |
| 63 | u8 renumber; |
| 64 | u32 custom_dev_instance; |
Steven | a1a0901 | 2017-03-08 00:23:13 -0800 | [diff] [blame] | 65 | u8 operation_mode; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 66 | }; |
| 67 | |
| 68 | /** \brief vhost-user interface modify response |
| 69 | @param context - sender context, to match reply w/ request |
| 70 | @param retval - return code for the request |
| 71 | */ |
| 72 | define modify_vhost_user_if_reply |
| 73 | { |
| 74 | u32 context; |
| 75 | i32 retval; |
| 76 | }; |
| 77 | |
| 78 | /** \brief vhost-user interface delete request |
| 79 | @param client_index - opaque cookie to identify the sender |
| 80 | */ |
| 81 | define delete_vhost_user_if |
| 82 | { |
| 83 | u32 client_index; |
| 84 | u32 context; |
| 85 | u32 sw_if_index; |
| 86 | }; |
| 87 | |
| 88 | /** \brief vhost-user interface delete response |
| 89 | @param context - sender context, to match reply w/ request |
| 90 | @param retval - return code for the request |
| 91 | */ |
| 92 | define delete_vhost_user_if_reply |
| 93 | { |
| 94 | u32 context; |
| 95 | i32 retval; |
| 96 | }; |
| 97 | |
| 98 | /** \brief Vhost-user interface details structure (fix this) |
| 99 | @param sw_if_index - index of the interface |
| 100 | @param interface_name - name of interface |
| 101 | @param virtio_net_hdr_sz - net header size |
| 102 | @param features - interface features |
| 103 | @param is_server - vhost-user server socket |
| 104 | @param sock_filename - socket filename |
| 105 | @param num_regions - number of used memory regions |
Steven | a1a0901 | 2017-03-08 00:23:13 -0800 | [diff] [blame] | 106 | @param operation_mode - polling=0, interrupt=1, or adaptive=2 |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 107 | */ |
| 108 | define sw_interface_vhost_user_details |
| 109 | { |
| 110 | u32 context; |
| 111 | u32 sw_if_index; |
| 112 | u8 interface_name[64]; |
| 113 | u32 virtio_net_hdr_sz; |
| 114 | u64 features; |
| 115 | u8 is_server; |
| 116 | u8 sock_filename[256]; |
| 117 | u32 num_regions; |
| 118 | i32 sock_errno; |
Steven | a1a0901 | 2017-03-08 00:23:13 -0800 | [diff] [blame] | 119 | u8 operation_mode; |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 120 | }; |
| 121 | |
| 122 | define sw_interface_vhost_user_dump |
| 123 | { |
| 124 | u32 client_index; |
| 125 | u32 context; |
| 126 | }; |
| 127 | /* |
| 128 | * Local Variables: |
| 129 | * eval: (c-set-style "gnu") |
| 130 | * End: |
| 131 | */ |