FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
virtio.api
Go to the documentation of this file.
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 = "3.0.0";
17 
18 import "vnet/interface_types.api";
19 import "vnet/ethernet/ethernet_types.api";
20 import "vlib/pci/pci_types.api";
21 
22 
23 /** \brief Initialize a new virtio pci interface with the given parameters
24  @param client_index - opaque cookie to identify the sender
25  @param context - sender context, to match reply w/ request
26  @param pci_addr - pci address
27  @param use_random_mac - let the system generate a unique mac address
28  @param mac_address - mac addr to assign to the interface if use_random not set
29  @param gso_enabled - enable gso feature if available, 1 to enable
30  @param checksum_offload_enabled - enable checksum feature if available, 1 to enable
31  @param features - the virtio features which driver should negotiate with device
32 */
33 define virtio_pci_create
34 {
35  option deprecated;
38  vl_api_pci_address_t pci_addr;
40  vl_api_mac_address_t mac_address;
44 };
45 
46 /** \brief Reply for virtio pci create reply
47  @param context - returned sender context, to match reply w/ request
48  @param retval - return code
49  @param sw_if_index - software index allocated for the new virtio pci interface
50 */
51 define virtio_pci_create_reply
52 {
53  option deprecated;
56  vl_api_interface_index_t sw_if_index;
57 };
58 
60  VIRTIO_API_FLAG_GSO = 1, /* enable gso on the interface */
61  VIRTIO_API_FLAG_CSUM_OFFLOAD = 2, /* enable checksum offload without gso on the interface */
62  VIRTIO_API_FLAG_GRO_COALESCE = 4, /* enable packet coalescing on tx side, provided gso enabled */
63  VIRTIO_API_FLAG_PACKED = 8, /* enable packed ring support, provided it is available from backend */
64  VIRTIO_API_FLAG_IN_ORDER = 16, /* enable in order support, provided it is available from backend */
65  VIRTIO_API_FLAG_BUFFERING = 32 [backwards_compatible], /* enable buffering to handle backend jitter/delays */
66 };
67 
68 /** \brief Initialize a new virtio pci interface with the given parameters
69  @param client_index - opaque cookie to identify the sender
70  @param context - sender context, to match reply w/ request
71  @param pci_addr - pci address
72  @param use_random_mac - let the system generate a unique mac address
73  @param mac_address - mac addr to assign to the interface if use_random not set
74  @param virtio_flags - feature flags to enable
75  @param features - the virtio features which driver should negotiate with device
76 */
77 define virtio_pci_create_v2
78 {
81  vl_api_pci_address_t pci_addr;
83  vl_api_mac_address_t mac_address;
84  vl_api_virtio_flags_t virtio_flags;
86 };
87 
88 /** \brief Reply for virtio pci create reply
89  @param context - returned sender context, to match reply w/ request
90  @param retval - return code
91  @param sw_if_index - software index allocated for the new virtio pci interface
92 */
93 define virtio_pci_create_v2_reply
94 {
97  vl_api_interface_index_t sw_if_index;
98 };
99 
100 /** \brief Delete virtio pci interface
101  @param client_index - opaque cookie to identify the sender
102  @param context - sender context, to match reply w/ request
103  @param sw_if_index - interface index of existing virtio pci interface
104 */
105 autoreply define virtio_pci_delete
106 {
109  vl_api_interface_index_t sw_if_index;
110 };
111 
112 /** \brief Dump virtio pci interfaces request */
113 define sw_interface_virtio_pci_dump
114 {
117 };
118 
119 /** \brief Reply for virtio pci interface dump request
120  @param sw_if_index - software index of virtio pci interface
121  @param pci_addr - pci address
122  @param mac_addr - native virtio device mac address
123  @param tx_ring_sz - the number of entries of TX ring
124  @param rx_ring_sz - the number of entries of RX ring
125  @param features - the virtio features which driver have negotiated with device
126 */
127 define sw_interface_virtio_pci_details
128 {
130  vl_api_interface_index_t sw_if_index;
131  vl_api_pci_address_t pci_addr;
132  vl_api_mac_address_t mac_addr;
136 };
137 
138 /*
139  * Local Variables:
140  * eval: (c-set-style "gnu")
141  * End:
142  */
vl_api_sw_interface_virtio_pci_dump_t::context
u32 context
Definition: virtio.api:116
vl_api_virtio_pci_create_v2_reply_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition: virtio.api:97
version
option version
Definition: virtio.api:16
vl_api_sw_interface_virtio_pci_details_t::tx_ring_sz
u16 tx_ring_sz
Definition: virtio.api:133
virtio_flags
virtio_flags
Definition: virtio.api:59
vl_api_virtio_pci_create_v2_t::pci_addr
vl_api_pci_address_t pci_addr
Definition: virtio.api:81
vl_api_virtio_pci_create_reply_t
Reply for virtio pci create reply.
Definition: virtio.api:51
VIRTIO_API_FLAG_CSUM_OFFLOAD
@ VIRTIO_API_FLAG_CSUM_OFFLOAD
Definition: virtio.api:61
vl_api_virtio_pci_create_t::gso_enabled
bool gso_enabled
Definition: virtio.api:41
vl_api_virtio_pci_create_v2_t::features
u64 features
Definition: virtio.api:85
u16
unsigned short u16
Definition: types.h:57
vl_api_virtio_pci_create_v2_t::mac_address
vl_api_mac_address_t mac_address
Definition: virtio.api:83
vl_api_virtio_pci_create_t::features
u64 features
Definition: virtio.api:43
vl_api_virtio_pci_create_v2_reply_t::context
u32 context
Definition: virtio.api:95
vl_api_virtio_pci_create_t::pci_addr
vl_api_pci_address_t pci_addr
Definition: virtio.api:38
vl_api_virtio_pci_create_t::deprecated
option deprecated
Definition: virtio.api:35
VIRTIO_API_FLAG_PACKED
@ VIRTIO_API_FLAG_PACKED
Definition: virtio.api:63
i32
signed int i32
Definition: types.h:77
VIRTIO_API_FLAG_GRO_COALESCE
@ VIRTIO_API_FLAG_GRO_COALESCE
Definition: virtio.api:62
vl_api_virtio_pci_create_t::use_random_mac
bool use_random_mac
Definition: virtio.api:39
vl_api_virtio_pci_create_t
Initialize a new virtio pci interface with the given parameters.
Definition: virtio.api:33
vl_api_sw_interface_virtio_pci_dump_t
Dump virtio pci interfaces request.
Definition: virtio.api:113
vl_api_sw_interface_virtio_pci_dump_t::client_index
u32 client_index
Definition: virtio.api:115
vl_api_sw_interface_virtio_pci_details_t::pci_addr
vl_api_pci_address_t pci_addr
Definition: virtio.api:131
VIRTIO_API_FLAG_IN_ORDER
@ VIRTIO_API_FLAG_IN_ORDER
Definition: virtio.api:64
vl_api_sw_interface_virtio_pci_details_t::context
u32 context
Definition: virtio.api:129
VIRTIO_API_FLAG_GSO
@ VIRTIO_API_FLAG_GSO
Definition: virtio.api:60
vl_api_virtio_pci_delete_t
Delete virtio pci interface.
Definition: virtio.api:105
vl_api_virtio_pci_create_reply_t::deprecated
option deprecated
Definition: virtio.api:53
vl_api_sw_interface_virtio_pci_details_t
Reply for virtio pci interface dump request.
Definition: virtio.api:127
vl_api_virtio_pci_create_v2_reply_t::retval
i32 retval
Definition: virtio.api:96
vl_api_sw_interface_virtio_pci_details_t::rx_ring_sz
u16 rx_ring_sz
Definition: virtio.api:134
vl_api_virtio_pci_create_t::context
u32 context
Definition: virtio.api:37
vl_api_virtio_pci_create_reply_t::retval
i32 retval
Definition: virtio.api:55
vl_api_virtio_pci_delete_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition: virtio.api:109
vl_api_virtio_pci_create_v2_t::use_random_mac
bool use_random_mac
Definition: virtio.api:82
vl_api_virtio_pci_delete_t::client_index
u32 client_index
Definition: virtio.api:107
vl_api_sw_interface_virtio_pci_details_t::mac_addr
vl_api_mac_address_t mac_addr
Definition: virtio.api:132
u64
unsigned long u64
Definition: types.h:89
vl_api_virtio_pci_delete_t::context
u32 context
Definition: virtio.api:108
vl_api_virtio_pci_create_v2_reply_t
Reply for virtio pci create reply.
Definition: virtio.api:93
u32
unsigned int u32
Definition: types.h:88
vl_api_virtio_pci_create_reply_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition: virtio.api:56
vl_api_virtio_pci_create_t::checksum_offload_enabled
bool checksum_offload_enabled
Definition: virtio.api:42
vl_api_sw_interface_virtio_pci_details_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition: virtio.api:130
vl_api_virtio_pci_create_v2_t::virtio_flags
vl_api_virtio_flags_t virtio_flags
Definition: virtio.api:84
vl_api_virtio_pci_create_reply_t::context
u32 context
Definition: virtio.api:54
vl_api_virtio_pci_create_t::mac_address
vl_api_mac_address_t mac_address
Definition: virtio.api:40
vl_api_virtio_pci_create_v2_t::context
u32 context
Definition: virtio.api:80
vl_api_virtio_pci_create_t::client_index
u32 client_index
Definition: virtio.api:36
vl_api_virtio_pci_create_v2_t::client_index
u32 client_index
Definition: virtio.api:79
vl_api_virtio_pci_create_v2_t
Initialize a new virtio pci interface with the given parameters.
Definition: virtio.api:77
VIRTIO_API_FLAG_BUFFERING
@ VIRTIO_API_FLAG_BUFFERING
Definition: virtio.api:65
vl_api_sw_interface_virtio_pci_details_t::features
u64 features
Definition: virtio.api:135