blob: efbcba8fa43c5af540e5f6c8099e2ec37a3f6e24 [file] [log] [blame]
Mohsin Kazmid6c15af2018-10-23 18:00:47 +02001/*
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
Jakub Grajciar2c504f82019-09-26 10:34:41 +020016option version = "2.0.0";
17
18import "vnet/interface_types.api";
19import "vnet/ethernet/ethernet_types.api";
20import "vnet/pci/pci_types.api";
21
Mohsin Kazmid6c15af2018-10-23 18:00:47 +020022
Paul Vinciguerra97c998c2019-10-29 16:11:09 -040023/** \brief Initialize a new virtio pci interface with the given parameters
Mohsin Kazmid6c15af2018-10-23 18:00:47 +020024 @param client_index - opaque cookie to identify the sender
25 @param context - sender context, to match reply w/ request
Jakub Grajciar2c504f82019-09-26 10:34:41 +020026 @param pci_addr - pci address
Mohsin Kazmid6c15af2018-10-23 18:00:47 +020027 @param use_random_mac - let the system generate a unique mac address
Paul Vinciguerra97c998c2019-10-29 16:11:09 -040028 @param mac_address - mac addr to assign to the interface if use_random not set
Mohsin Kazmibbd6b742019-05-02 13:54:59 +020029 @param gso_enabled - enable gso feature if available, 1 to enable
Mohsin Kazmi6d4af892020-01-03 15:11:53 +000030 @param checksum_offload_enabled - enable checksum feature if available, 1 to enable
Mohsin Kazmid6c15af2018-10-23 18:00:47 +020031 @param features - the virtio features which driver should negotiate with device
32*/
33define virtio_pci_create
34{
35 u32 client_index;
36 u32 context;
Jakub Grajciar2c504f82019-09-26 10:34:41 +020037 vl_api_pci_address_t pci_addr;
38 bool use_random_mac;
39 vl_api_mac_address_t mac_address;
40 bool gso_enabled;
Mohsin Kazmi6d4af892020-01-03 15:11:53 +000041 bool checksum_offload_enabled;
Mohsin Kazmid6c15af2018-10-23 18:00:47 +020042 u64 features;
43};
44
45/** \brief Reply for virtio pci create reply
46 @param context - returned sender context, to match reply w/ request
47 @param retval - return code
48 @param sw_if_index - software index allocated for the new virtio pci interface
49*/
50define virtio_pci_create_reply
51{
52 u32 context;
53 i32 retval;
Jakub Grajciar2c504f82019-09-26 10:34:41 +020054 vl_api_interface_index_t sw_if_index;
Mohsin Kazmid6c15af2018-10-23 18:00:47 +020055};
56
57/** \brief Delete virtio pci interface
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 of existing virtio pci interface
61*/
62autoreply define virtio_pci_delete
63{
64 u32 client_index;
65 u32 context;
Jakub Grajciar2c504f82019-09-26 10:34:41 +020066 vl_api_interface_index_t sw_if_index;
Mohsin Kazmid6c15af2018-10-23 18:00:47 +020067};
68
69/** \brief Dump virtio pci interfaces request */
70define sw_interface_virtio_pci_dump
71{
72 u32 client_index;
73 u32 context;
74};
75
76/** \brief Reply for virtio pci interface dump request
77 @param sw_if_index - software index of virtio pci interface
Jakub Grajciar2c504f82019-09-26 10:34:41 +020078 @param pci_addr - pci address
Mohsin Kazmid6c15af2018-10-23 18:00:47 +020079 @param mac_addr - native virtio device mac address
80 @param tx_ring_sz - the number of entries of TX ring
81 @param rx_ring_sz - the number of entries of RX ring
82 @param features - the virtio features which driver have negotiated with device
83*/
84define sw_interface_virtio_pci_details
85{
86 u32 context;
Jakub Grajciar2c504f82019-09-26 10:34:41 +020087 vl_api_interface_index_t sw_if_index;
88 vl_api_pci_address_t pci_addr;
89 vl_api_mac_address_t mac_addr;
Mohsin Kazmid6c15af2018-10-23 18:00:47 +020090 u16 tx_ring_sz;
91 u16 rx_ring_sz;
92 u64 features;
93};
94
95/*
96 * Local Variables:
97 * eval: (c-set-style "gnu")
98 * End:
99 */