Go to the source code of this file.
|
enum | rte_intr_handle_type {
RTE_INTR_HANDLE_UNKNOWN = 0,
RTE_INTR_HANDLE_UIO,
RTE_INTR_HANDLE_UIO_INTX,
RTE_INTR_HANDLE_VFIO_LEGACY,
RTE_INTR_HANDLE_VFIO_MSI,
RTE_INTR_HANDLE_VFIO_MSIX,
RTE_INTR_HANDLE_ALARM,
RTE_INTR_HANDLE_EXT,
RTE_INTR_HANDLE_VDEV,
RTE_INTR_HANDLE_DEV_EVENT,
RTE_INTR_HANDLE_VFIO_REQ,
RTE_INTR_HANDLE_MAX
} |
|
|
int | rte_epoll_wait (int epfd, struct rte_epoll_event *events, int maxevents, int timeout) |
|
int | rte_epoll_ctl (int epfd, int op, int fd, struct rte_epoll_event *event) |
|
int | rte_intr_tls_epfd (void) |
|
int | rte_intr_rx_ctl (struct rte_intr_handle *intr_handle, int epfd, int op, unsigned int vec, void *data) |
|
void | rte_intr_free_epoll_fd (struct rte_intr_handle *intr_handle) |
|
int | rte_intr_efd_enable (struct rte_intr_handle *intr_handle, uint32_t nb_efd) |
|
void | rte_intr_efd_disable (struct rte_intr_handle *intr_handle) |
|
int | rte_intr_dp_is_en (struct rte_intr_handle *intr_handle) |
|
int | rte_intr_allow_others (struct rte_intr_handle *intr_handle) |
|
int | rte_intr_cap_multiple (struct rte_intr_handle *intr_handle) |
|
◆ RTE_EPOLL_PER_THREAD
#define RTE_EPOLL_PER_THREAD -1 |
◆ rte_intr_handle_type
The interrupt source type, e.g. UIO, VFIO, ALARM etc.
Enumerator |
---|
RTE_INTR_HANDLE_UNKNOWN | generic unknown handle
|
RTE_INTR_HANDLE_UIO | uio device handle
|
RTE_INTR_HANDLE_UIO_INTX | uio generic handle
|
RTE_INTR_HANDLE_VFIO_LEGACY | vfio device handle (legacy)
|
RTE_INTR_HANDLE_VFIO_MSI | vfio device handle (MSI)
|
RTE_INTR_HANDLE_VFIO_MSIX | vfio device handle (MSIX)
|
RTE_INTR_HANDLE_ALARM | alarm handle
|
RTE_INTR_HANDLE_EXT | external handler
|
RTE_INTR_HANDLE_VDEV | virtual device
|
RTE_INTR_HANDLE_DEV_EVENT | device event handle
|
RTE_INTR_HANDLE_VFIO_REQ | VFIO request handle
|
RTE_INTR_HANDLE_MAX | count of elements
|
Definition at line 27 of file rte_eal_interrupts.h.
◆ rte_epoll_wait()
int rte_epoll_wait |
( |
int |
epfd, |
|
|
struct rte_epoll_event * |
events, |
|
|
int |
maxevents, |
|
|
int |
timeout |
|
) |
| |
It waits for events on the epoll instance.
- Parameters
-
epfd | Epoll instance fd on which the caller wait for events. |
events | Memory area contains the events that will be available for the caller. |
maxevents | Up to maxevents are returned, must greater than zero. |
timeout | Specifying a timeout of -1 causes a block indefinitely. Specifying a timeout equal to zero cause to return immediately. |
- Returns
- On success, returns the number of available event.
- On failure, a negative value.
- Examples:
- examples/l3fwd-power/main.c.
◆ rte_epoll_ctl()
int rte_epoll_ctl |
( |
int |
epfd, |
|
|
int |
op, |
|
|
int |
fd, |
|
|
struct rte_epoll_event * |
event |
|
) |
| |
It performs control operations on epoll instance referred by the epfd. It requests that the operation op be performed for the target fd.
- Parameters
-
epfd | Epoll instance fd on which the caller perform control operations. |
op | The operation be performed for the target fd. |
fd | The target fd on which the control ops perform. |
event | Describes the object linked to the fd. Note: The caller must take care the object deletion after CTL_DEL. |
- Returns
- On success, zero.
- On failure, a negative value.
◆ rte_intr_tls_epfd()
int rte_intr_tls_epfd |
( |
void |
| ) |
|
The function returns the per thread epoll instance.
- Returns
- epfd the epoll instance referred to.
◆ rte_intr_rx_ctl()
int rte_intr_rx_ctl |
( |
struct rte_intr_handle * |
intr_handle, |
|
|
int |
epfd, |
|
|
int |
op, |
|
|
unsigned int |
vec, |
|
|
void * |
data |
|
) |
| |
- Parameters
-
intr_handle | Pointer to the interrupt handle. |
epfd | Epoll instance fd which the intr vector associated to. |
op | The operation be performed for the vector. Operation type of {ADD, DEL}. |
vec | RX intr vector number added to the epoll instance wait list. |
data | User raw data. |
- Returns
- On success, zero.
- On failure, a negative value.
◆ rte_intr_free_epoll_fd()
It deletes registered eventfds.
- Parameters
-
intr_handle | Pointer to the interrupt handle. |
◆ rte_intr_efd_enable()
int rte_intr_efd_enable |
( |
struct rte_intr_handle * |
intr_handle, |
|
|
uint32_t |
nb_efd |
|
) |
| |
It enables the packet I/O interrupt event if it's necessary. It creates event fd for each interrupt vector when MSIX is used, otherwise it multiplexes a single event fd.
- Parameters
-
intr_handle | Pointer to the interrupt handle. |
nb_efd | Number of interrupt vector trying to enable. The value 0 is not allowed. |
- Returns
- On success, zero.
- On failure, a negative value.
◆ rte_intr_efd_disable()
It disables the packet I/O interrupt event. It deletes registered eventfds and closes the open fds.
- Parameters
-
intr_handle | Pointer to the interrupt handle. |
◆ rte_intr_dp_is_en()
The packet I/O interrupt on datapath is enabled or not.
- Parameters
-
intr_handle | Pointer to the interrupt handle. |
◆ rte_intr_allow_others()
The interrupt handle instance allows other causes or not. Other causes stand for any none packet I/O interrupts.
- Parameters
-
intr_handle | Pointer to the interrupt handle. |
◆ rte_intr_cap_multiple()
The multiple interrupt vector capability of interrupt handle instance. It returns zero if no multiple interrupt vector support.
- Parameters
-
intr_handle | Pointer to the interrupt handle. |