dev: initial set of APIs
[vpp.git] / src / vnet / dev / dev.api
1 /* SPDX-License-Identifier: Apache-2.0
2  * Copyright(c) 2022 Cisco Systems, Inc.
3  */
4
5 option version = "0.0.1";
6
7 enumflag dev_flags : u32
8 {
9   VL_API_DEV_FLAG_NO_STATS = 0x1,
10 };
11
12 enumflag dev_port_flags : u32
13 {
14   VL_API_DEV_PORT_FLAG_INTERRUPT_MODE = 0x1,
15 };
16
17 autoendian define dev_attach
18 {
19   u32 client_index;
20   u32 context;
21   string device_id[48];
22   string driver_name[16];
23   vl_api_dev_flags_t flags;
24   string args[];
25 };
26
27 autoendian define dev_attach_reply
28 {
29   u32 context;
30   u32 dev_index;
31   i32 retval;
32   string error_string[];
33 };
34
35 autoendian define dev_detach
36 {
37   u32 client_index;
38   u32 context;
39   u32 dev_index;
40 };
41
42 autoendian define dev_detach_reply
43 {
44   u32 context;
45   i32 retval;
46   string error_string[];
47 };
48
49 autoendian define dev_create_port_if
50 {
51   u32 client_index;
52   u32 context;
53   u32 dev_index;
54   string intf_name[32];
55   u16 num_rx_queues;
56   u16 num_tx_queues;
57   u16 rx_queue_size;
58   u16 tx_queue_size;
59   u16 port_id;
60   vl_api_dev_port_flags_t flags;
61   string args[];
62 };
63
64 autoendian define dev_create_port_if_reply
65 {
66   u32 client_index;
67   u32 context;
68   u32 sw_if_index;
69   i32 retval;
70   string error_string[];
71 };
72
73 autoendian define dev_remove_port_if
74 {
75   u32 client_index;
76   u32 context;
77   u32 sw_if_index;
78 };
79
80 autoendian define dev_remove_port_if_reply
81 {
82   u32 context;
83   i32 retval;
84   string error_string[];
85 };
86