aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/vhost_user.api
blob: 6f21cb6c3ab38eded94e92365c354f323f213291 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*
 * Copyright (c) 2015-2016 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

vl_api_version 1.0.0

/** \brief vhost-user interface create request
    @param client_index - opaque cookie to identify the sender
    @param is_server - our side is socket server
    @param sock_filename - unix socket filename, used to speak with frontend
    @param use_custom_mac - enable or disable the use of the provided hardware address
    @param mac_address - hardware address to use if 'use_custom_mac' is set
*/
define create_vhost_user_if
{
  u32 client_index;
  u32 context;
  u8 is_server;
  u8 sock_filename[256];
  u8 renumber;
  u32 custom_dev_instance;
  u8 use_custom_mac;
  u8 mac_address[6];
  u8 tag[64];
};

/** \brief vhost-user interface create response
    @param context - sender context, to match reply w/ request
    @param retval - return code for the request
    @param sw_if_index - interface the operation is applied to
*/
define create_vhost_user_if_reply
{
  u32 context;
  i32 retval;
  u32 sw_if_index;
};

/** \brief vhost-user interface modify request
    @param client_index - opaque cookie to identify the sender
    @param is_server - our side is socket server
    @param sock_filename - unix socket filename, used to speak with frontend
*/
autoreply define modify_vhost_user_if
{
  u32 client_index;
  u32 context;
  u32 sw_if_index;
  u8 is_server;
  u8 sock_filename[256];
  u8 renumber;
  u32 custom_dev_instance;
};

/** \brief vhost-user interface delete request
    @param client_index - opaque cookie to identify the sender
*/
autoreply define delete_vhost_user_if
{
  u32 client_index;
  u32 context;
  u32 sw_if_index;
};

/** \brief Vhost-user interface details structure (fix this)
    @param sw_if_index - index of the interface
    @param interface_name - name of interface
    @param virtio_net_hdr_sz - net header size
    @param features - interface features
    @param is_server - vhost-user server socket
    @param sock_filename - socket filename
    @param num_regions - number of used memory regions
*/
define sw_interface_vhost_user_details
{
  u32 context;
  u32 sw_if_index;
  u8 interface_name[64];
  u32 virtio_net_hdr_sz;
  u64 features;
  u8 is_server;
  u8 sock_filename[256];
  u32 num_regions;
  i32 sock_errno;
};

define sw_interface_vhost_user_dump
{
  u32 client_index;
  u32 context;
};
/*
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */