vmxnet3 device driver
[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 */
30
31 define vmxnet3_create
32 {
33   u32 client_index;
34   u32 context;
35
36   u32 pci_addr;
37   i32 enable_elog;
38   u16 rxq_size;
39   u16 txq_size;
40 };
41
42 /** \brief
43     @param context - sender context, to match reply w/ request
44     @param retval - return value for request
45     @param sw_if_index - software index for the new vmxnet3 interface
46 */
47
48 define vmxnet3_create_reply
49 {
50   u32 context;
51   i32 retval;
52   u32 sw_if_index;
53 };
54
55 /** \brief
56     @param client_index - opaque cookie to identify the sender
57     @param context - sender context, to match reply w/ request
58     @param sw_if_index - interface index
59 */
60
61 autoreply define vmxnet3_delete
62 {
63   u32 client_index;
64   u32 context;
65
66   u32 sw_if_index;
67 };
68
69 /** \brief Memory interface details structure
70     @param context - sender context, to match reply w/ request (memif_dump)
71     @param sw_if_index - index of the interface
72     @param if_name - name of the interface
73     @param hw_addr - interface MAC address
74     @param id - id associated with the interface
75     @param role - role of the interface in the connection (master/slave)
76     @param mode - interface mode
77     @param socket_id - id of the socket filename used by this interface
78            to establish new connections
79     @param ring_size - the number of entries of RX/TX rings
80     @param buffer_size - size of the buffer allocated for each ring entry
81     @param admin_up_down - interface administrative status
82     @param link_up_down - interface link status
83
84 */
85 define vmxnet3_details
86 {
87   u32 context;
88
89   u32 sw_if_index;
90   u8 if_name[64];
91   u8 hw_addr[6];
92   u32 pci_addr;
93   u8 version;
94
95   u16 rx_qid;
96   u16 rx_qsize;
97   u16 rx_fill[2];
98   u16 rx_next;
99   u16 rx_produce[2];
100   u16 rx_consume[2];
101
102   u16 tx_qid;
103   u16 tx_qsize;
104   u16 tx_next;
105   u16 tx_produce;
106   u16 tx_consume;
107
108   u8 admin_up_down;
109 };
110
111 /** \brief Dump all vmxnet3 interfaces
112     @param client_index - opaque cookie to identify the sender
113     @param context - sender context, to match reply w/ request
114 */
115 define vmxnet3_dump
116 {
117   u32 client_index;
118   u32 context;
119 };
120
121 /*
122  * Local Variables:
123  * eval: (c-set-style "gnu")
124  * End:
125  */