DPDK  19.08.0-rc0
Data Structures | Macros | Enumerations | Functions
rte_eal_interrupts.h File Reference

Go to the source code of this file.

Data Structures

struct  rte_epoll_event
 
struct  rte_intr_handle
 

Macros

#define RTE_EPOLL_PER_THREAD   -1
 

Enumerations

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
}
 

Functions

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)
 

Macro Definition Documentation

◆ RTE_EPOLL_PER_THREAD

#define RTE_EPOLL_PER_THREAD   -1

to hint using per thread epfd

Examples
examples/l3fwd-power/main.c.

Definition at line 86 of file rte_eal_interrupts.h.

Enumeration Type Documentation

◆ 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.

Function Documentation

◆ 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
epfdEpoll instance fd on which the caller wait for events.
eventsMemory area contains the events that will be available for the caller.
maxeventsUp to maxevents are returned, must greater than zero.
timeoutSpecifying 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
epfdEpoll instance fd on which the caller perform control operations.
opThe operation be performed for the target fd.
fdThe target fd on which the control ops perform.
eventDescribes 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_handlePointer to the interrupt handle.
epfdEpoll instance fd which the intr vector associated to.
opThe operation be performed for the vector. Operation type of {ADD, DEL}.
vecRX intr vector number added to the epoll instance wait list.
dataUser raw data.
Returns
  • On success, zero.
  • On failure, a negative value.

◆ rte_intr_free_epoll_fd()

void rte_intr_free_epoll_fd ( struct rte_intr_handle intr_handle)

It deletes registered eventfds.

Parameters
intr_handlePointer 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_handlePointer to the interrupt handle.
nb_efdNumber 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()

void rte_intr_efd_disable ( struct rte_intr_handle intr_handle)

It disables the packet I/O interrupt event. It deletes registered eventfds and closes the open fds.

Parameters
intr_handlePointer to the interrupt handle.

◆ rte_intr_dp_is_en()

int rte_intr_dp_is_en ( struct rte_intr_handle intr_handle)

The packet I/O interrupt on datapath is enabled or not.

Parameters
intr_handlePointer to the interrupt handle.

◆ rte_intr_allow_others()

int rte_intr_allow_others ( struct rte_intr_handle intr_handle)

The interrupt handle instance allows other causes or not. Other causes stand for any none packet I/O interrupts.

Parameters
intr_handlePointer to the interrupt handle.

◆ rte_intr_cap_multiple()

int rte_intr_cap_multiple ( struct rte_intr_handle intr_handle)

The multiple interrupt vector capability of interrupt handle instance. It returns zero if no multiple interrupt vector support.

Parameters
intr_handlePointer to the interrupt handle.