DPDK
19.02.0
Main Page
Related Pages
Data Structures
Files
Examples
File List
Globals
lib
librte_eal
common
include
rte_eal_interrupts.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright(c) 2010-2014 Intel Corporation
3
*/
4
5
#ifndef _RTE_INTERRUPTS_H_
6
#error "don't include this file directly, please include generic <rte_interrupts.h>"
7
#endif
8
17
#ifndef _RTE_EAL_INTERRUPTS_H_
18
#define _RTE_EAL_INTERRUPTS_H_
19
20
#define RTE_MAX_RXTX_INTR_VEC_ID 32
21
#define RTE_INTR_VEC_ZERO_OFFSET 0
22
#define RTE_INTR_VEC_RXTX_OFFSET 1
23
27
enum
rte_intr_handle_type
{
28
RTE_INTR_HANDLE_UNKNOWN
= 0,
29
RTE_INTR_HANDLE_UIO
,
30
RTE_INTR_HANDLE_UIO_INTX
,
31
RTE_INTR_HANDLE_VFIO_LEGACY
,
32
RTE_INTR_HANDLE_VFIO_MSI
,
33
RTE_INTR_HANDLE_VFIO_MSIX
,
34
RTE_INTR_HANDLE_ALARM
,
35
RTE_INTR_HANDLE_EXT
,
36
RTE_INTR_HANDLE_VDEV
,
37
RTE_INTR_HANDLE_DEV_EVENT
,
38
RTE_INTR_HANDLE_VFIO_REQ
,
39
RTE_INTR_HANDLE_MAX
40
};
41
42
#define RTE_INTR_EVENT_ADD 1UL
43
#define RTE_INTR_EVENT_DEL 2UL
44
45
typedef
void (*rte_intr_event_cb_t)(
int
fd,
void
*arg);
46
47
struct
rte_epoll_data {
48
uint32_t event;
49
void
*data;
50
rte_intr_event_cb_t cb_fun;
51
void
*cb_arg;
52
};
53
54
enum
{
55
RTE_EPOLL_INVALID = 0,
56
RTE_EPOLL_VALID,
57
RTE_EPOLL_EXEC,
58
};
59
61
struct
rte_epoll_event
{
62
volatile
uint32_t
status
;
63
int
fd
;
64
int
epfd
;
65
struct
rte_epoll_data epdata;
66
};
67
69
struct
rte_intr_handle
{
70
RTE_STD_C11
71
union
{
72
int
vfio_dev_fd
;
73
int
uio_cfg_fd
;
74
};
75
int
fd
;
76
enum
rte_intr_handle_type
type
;
77
uint32_t
max_intr
;
78
uint32_t
nb_efd
;
79
uint8_t
efd_counter_size
;
80
int
efds
[RTE_MAX_RXTX_INTR_VEC_ID];
81
struct
rte_epoll_event
elist
[RTE_MAX_RXTX_INTR_VEC_ID];
83
int
*
intr_vec
;
84
};
85
86
#define RTE_EPOLL_PER_THREAD -1
104
int
105
rte_epoll_wait
(
int
epfd
,
struct
rte_epoll_event
*events,
106
int
maxevents,
int
timeout);
107
125
int
126
rte_epoll_ctl
(
int
epfd
,
int
op,
int
fd
,
127
struct
rte_epoll_event
*event);
128
135
int
136
rte_intr_tls_epfd
(
void
);
137
154
int
155
rte_intr_rx_ctl
(
struct
rte_intr_handle
*intr_handle,
156
int
epfd
,
int
op,
unsigned
int
vec,
void
*data);
157
164
void
165
rte_intr_free_epoll_fd
(
struct
rte_intr_handle
*intr_handle);
166
181
int
182
rte_intr_efd_enable
(
struct
rte_intr_handle
*intr_handle, uint32_t nb_efd);
183
191
void
192
rte_intr_efd_disable
(
struct
rte_intr_handle
*intr_handle);
193
200
int
201
rte_intr_dp_is_en
(
struct
rte_intr_handle
*intr_handle);
202
210
int
211
rte_intr_allow_others
(
struct
rte_intr_handle
*intr_handle);
212
220
int
221
rte_intr_cap_multiple
(
struct
rte_intr_handle
*intr_handle);
222
223
#endif
/* _RTE_EAL_INTERRUPTS_H_ */
Generated by
1.8.1.2