vmxnet3: remove api boilerplate
[vpp.git] / src / plugins / vmxnet3 / vmxnet3.api
1 /*
2  *------------------------------------------------------------------
3  * Copyright (c) 2018 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *------------------------------------------------------------------
16  */
17
18 option version = "1.0.1";
19
20 /** \brief
21     @param client_index - opaque cookie to identify the sender
22     @param context - sender context, to match reply w/ request
23     @param pci_addr - pci address as unsigned 32bit integer:
24                       0-15 domain, 16-23 bus, 24-28 slot, 29-31 function 
25                       ddddddddddddddddbbbbbbbbsssssfff
26     @param enable_elog - turn on elog (optional - default is off)
27     @param rxq_size - receive queue size (optional - default is 1024)
28     @param rxq_num - number of receive queues (optional - default is 1)
29     @param txq_size - transmit queue size (optional - default is 1024)
30     @param txq_num - number of transmit queues (optional - default is 1)
31     @param bind - automatically bind PCI to vfio-pci module
32                       (optional - default is 0)
33     @param enable_gso - enable gso (optional - default is 0)
34 */
35
36 define vmxnet3_create
37 {
38   u32 client_index;
39   u32 context;
40
41   u32 pci_addr;
42   i32 enable_elog;
43   u16 rxq_size;
44   u16 rxq_num;
45   u16 txq_size;
46   u16 txq_num;
47   u8 bind;
48   u8 enable_gso;
49   option vat_help = "<pci-address> [rx-queue-size <size>] [tx-queue-size <size>] [num-tx-queues <num>] [num-rx-queues <num>] [bind] [gso]";
50 };
51
52 /** \brief
53     @param context - sender context, to match reply w/ request
54     @param retval - return value for request
55     @param sw_if_index - software index for the new vmxnet3 interface
56 */
57
58 define vmxnet3_create_reply
59 {
60   u32 context;
61   i32 retval;
62   u32 sw_if_index;
63 };
64
65 /** \brief
66     @param client_index - opaque cookie to identify the sender
67     @param context - sender context, to match reply w/ request
68     @param sw_if_index - interface index
69 */
70
71 autoreply define vmxnet3_delete
72 {
73   u32 client_index;
74   u32 context;
75
76   u32 sw_if_index;
77   option vat_help = "sw_if_index <sw_if_index>";
78 };
79
80 /** \brief vmxnet3_tx_list structure
81     @param tx_qsize - tx queue size
82     @param tx_next - tx next index
83     @param tx_produce - tx produce index
84     @param tx_consume - tx consume index
85 */
86
87 typedef vmxnet3_tx_list
88 {
89   u16 tx_qsize;
90   u16 tx_next;
91   u16 tx_produce;
92   u16 tx_consume;
93 };
94
95 /** \brief vmxnet3_rx_list structure
96     @param rx_qsize - rx queue size
97     @param rx_fill - rx fill count
98     @param rx_next - rx next index
99     @param rx_produce - rx produce index
100     @param rx_consume - rx consume index
101 */
102
103 typedef vmxnet3_rx_list
104 {
105   u16 rx_qsize;
106   u16 rx_fill[2];
107   u16 rx_next;
108   u16 rx_produce[2];
109   u16 rx_consume[2];
110 };
111
112 /** \brief Memory interface details structure
113     @param context - sender context, to match reply w/ request (memif_dump)
114     @param sw_if_index - index of the interface
115     @param if_name - name of the interface
116     @param hw_addr - interface MAC address
117     @param pci_addr - pci address of the interface
118     @param version - vmxnet3 hardware version
119     @param admin_up_down - interface administrative status
120     @param rx_count - number of elements in rx_list
121     @param rx_list - list of vmxnet3_rx_list
122     @param tx_count - number of elements in tx_list
123     @param tx_list - list of vmnxnet3_tx_list
124 */
125 define vmxnet3_details
126 {
127   u32 context;
128
129   u32 sw_if_index;
130   u8 if_name[64];
131   u8 hw_addr[6];
132   u32 pci_addr;
133   u8 version;
134   u8 admin_up_down;
135
136   u8 rx_count;
137   vl_api_vmxnet3_rx_list_t rx_list[16];
138
139   u8 tx_count;
140   vl_api_vmxnet3_tx_list_t tx_list[8];
141 };
142
143 /** \brief Dump all vmxnet3 interfaces
144     @param client_index - opaque cookie to identify the sender
145     @param context - sender context, to match reply w/ request
146 */
147 define vmxnet3_dump
148 {
149   u32 client_index;
150   u32 context;
151 };
152
153 /*
154  * Local Variables:
155  * eval: (c-set-style "gnu")
156  * End:
157  */