blob: 1b7bf27d62a05d58496e6b648a0cb5e3da934fd5 (
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
|
/* 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 *);
#endif /* _VNET_DEV_API_H_ */
|