docs: devices-- add FEATURES.yaml
[vpp.git] / src / vnet / devices / virtio / virtio.api
1 /*
2  * Copyright (c) 2018 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 option version = "1.0.0";
17
18 /** \brief Initialize a new virtio pci interface with the given parameters
19     @param client_index - opaque cookie to identify the sender
20     @param context - sender context, to match reply w/ request
21     @param pci_addr - pci address as unsigned 32bit integer:
22                       0-15 domain, 16-23 bus, 24-28 slot, 29-31 function
23     @param use_random_mac - let the system generate a unique mac address
24     @param mac_address - mac addr to assign to the interface if use_random not set
25     @param gso_enabled - enable gso feature if available, 1 to enable
26     @param features - the virtio features which driver should negotiate with device
27 */
28 define virtio_pci_create
29 {
30   u32 client_index;
31   u32 context;
32   u32 pci_addr;
33   u8 use_random_mac;
34   u8 mac_address[6];
35   u8 gso_enabled;
36   u64 features;
37 };
38
39 /** \brief Reply for virtio pci create reply
40     @param context - returned sender context, to match reply w/ request
41     @param retval - return code
42     @param sw_if_index - software index allocated for the new virtio pci interface
43 */
44 define virtio_pci_create_reply
45 {
46   u32 context;
47   i32 retval;
48   u32 sw_if_index;
49 };
50
51 /** \brief Delete virtio pci interface
52     @param client_index - opaque cookie to identify the sender
53     @param context - sender context, to match reply w/ request
54     @param sw_if_index - interface index of existing virtio pci interface
55 */
56 autoreply define virtio_pci_delete
57 {
58   u32 client_index;
59   u32 context;
60   u32 sw_if_index;
61 };
62
63 /** \brief Dump virtio pci interfaces request */
64 define sw_interface_virtio_pci_dump
65 {
66   u32 client_index;
67   u32 context;
68 };
69
70 /** \brief Reply for virtio pci interface dump request
71     @param sw_if_index - software index of virtio pci interface
72     @param pci_addr - pci address as unsigned 32bit integer:
73                       0-15 domain, 16-23 bus, 24-28 slot, 29-31 function
74     @param mac_addr - native virtio device mac address
75     @param tx_ring_sz - the number of entries of TX ring
76     @param rx_ring_sz - the number of entries of RX ring
77     @param features - the virtio features which driver have negotiated with device
78 */
79 define sw_interface_virtio_pci_details
80 {
81   u32 context;
82   u32 sw_if_index;
83   u32 pci_addr;
84   u8 mac_addr[6];
85   u16 tx_ring_sz;
86   u16 rx_ring_sz;
87   u64 features;
88 };
89
90 /*
91  * Local Variables:
92  * eval: (c-set-style "gnu")
93  * End:
94  */