vmxnet3: multiple TX queues support
[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.0";
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 txq_size - transmit queue size (optional - default is 1024)
29     @param txq_num - number of transmit queues (optional - default is 1)
30 */
31
32 define vmxnet3_create
33 {
34   u32 client_index;
35   u32 context;
36
37   u32 pci_addr;
38   i32 enable_elog;
39   u16 rxq_size;
40   u16 txq_size;
41   u16 txq_num;
42 };
43
44 /** \brief
45     @param context - sender context, to match reply w/ request
46     @param retval - return value for request
47     @param sw_if_index - software index for the new vmxnet3 interface
48 */
49
50 define vmxnet3_create_reply
51 {
52   u32 context;
53   i32 retval;
54   u32 sw_if_index;
55 };
56
57 /** \brief
58     @param client_index - opaque cookie to identify the sender
59     @param context - sender context, to match reply w/ request
60     @param sw_if_index - interface index
61 */
62
63 autoreply define vmxnet3_delete
64 {
65   u32 client_index;
66   u32 context;
67
68   u32 sw_if_index;
69 };
70
71 /** \brief vmxnet3_tx_list structure
72     @param tx_qsize - tx queue size
73     @param tx_next - tx next index
74     @param tx_produce - tx produce index
75     @param tx_consume - tx consume index
76 */
77
78 typeonly define vmxnet3_tx_list
79 {
80   u16 tx_qsize;
81   u16 tx_next;
82   u16 tx_produce;
83   u16 tx_consume;
84 };
85
86 /** \brief Memory interface details structure
87     @param context - sender context, to match reply w/ request (memif_dump)
88     @param sw_if_index - index of the interface
89     @param if_name - name of the interface
90     @param hw_addr - interface MAC address
91     @param pci_addr - pci address of the interface
92     @param version - vmxnet3 hardware version
93     @param admin_up_down - interface administrative status
94     @param rx_qsize - rx queue size
95     @param rx_fill - rx fill count
96     @param rx_next - rx next index
97     @param rx_produce - rx produce index
98     @param rx_consume - rx consume index
99     @param tx_count - number of of elements in tx_list
100     @param tx_list - list of vmnxnet3_tx_list
101 */
102 define vmxnet3_details
103 {
104   u32 context;
105
106   u32 sw_if_index;
107   u8 if_name[64];
108   u8 hw_addr[6];
109   u32 pci_addr;
110   u8 version;
111   u8 admin_up_down;
112
113   u16 rx_qsize;
114   u16 rx_fill[2];
115   u16 rx_next;
116   u16 rx_produce[2];
117   u16 rx_consume[2];
118
119   u8 tx_count;
120   vl_api_vmxnet3_tx_list_t tx_list[8];
121 };
122
123 /** \brief Dump all vmxnet3 interfaces
124     @param client_index - opaque cookie to identify the sender
125     @param context - sender context, to match reply w/ request
126 */
127 define vmxnet3_dump
128 {
129   u32 client_index;
130   u32 context;
131 };
132
133 /*
134  * Local Variables:
135  * eval: (c-set-style "gnu")
136  * End:
137  */