blob: 3e552e4326e5785acc1acd04e0d8a3211571c6ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
/* SPDX-License-Identifier: Apache-2.0
* Copyright (c) 2023 Cisco Systems, Inc.
*/
#ifndef _VNET_DEV_API_H_
#define _VNET_DEV_API_H_
#include <vppinfra/clib.h>
#include <vnet/vnet.h>
#include <vnet/dev/types.h>
typedef struct
{
vnet_dev_device_id_t device_id;
vnet_dev_driver_name_t driver_name;
vnet_dev_flags_t flags;
u8 *args;
/* return */
u32 dev_index;
} vnet_dev_api_attach_args_t;
vnet_dev_rv_t vnet_dev_api_attach (vlib_main_t *,
vnet_dev_api_attach_args_t *);
typedef struct
{
u32 dev_index;
} vnet_dev_api_detach_args_t;
vnet_dev_rv_t vnet_dev_api_detach (vlib_main_t *,
vnet_dev_api_detach_args_t *);
typedef struct
{
vnet_dev_device_id_t device_id;
} vnet_dev_api_reset_args_t;
vnet_dev_rv_t vnet_dev_api_reset (vlib_main_t *, vnet_dev_api_reset_args_t *);
typedef struct
{
u32 dev_index;
vnet_dev_if_name_t intf_name;
u16 num_rx_queues;
u16 num_tx_queues;
u16 rx_queue_size;
u16 tx_queue_size;
vnet_dev_port_id_t port_id;
vnet_dev_port_flags_t flags;
u8 *args;
/* return */
u32 sw_if_index;
} vnet_dev_api_create_port_if_args_t;
vnet_dev_rv_t
vnet_dev_api_create_port_if (vlib_main_t *,
vnet_dev_api_create_port_if_args_t *);
typedef struct
{
u32 sw_if_index;
} vnet_dev_api_remove_port_if_args_t;
vnet_dev_rv_t
vnet_dev_api_remove_port_if (vlib_main_t *,
vnet_dev_api_remove_port_if_args_t *);
typedef struct
{
u32 primary_sw_if_index;
vnet_dev_if_name_t intf_name;
u8 *args;
/* return */
u32 sw_if_index;
} vnet_dev_api_port_add_sec_if_args_t;
vnet_dev_rv_t
vnet_dev_api_port_add_sec_if (vlib_main_t *,
vnet_dev_api_port_add_sec_if_args_t *);
typedef struct
{
u32 sw_if_index;
} vnet_dev_api_port_del_sec_if_args_t;
vnet_dev_rv_t
vnet_dev_api_port_del_sec_if (vlib_main_t *,
vnet_dev_api_port_del_sec_if_args_t *);
#endif /* _VNET_DEV_API_H_ */
|