5#ifndef _RTE_INTERRUPTS_H_
6#define _RTE_INTERRUPTS_H_
12#include <rte_compat.h>
27struct rte_intr_handle;
34#define RTE_INTR_INSTANCE_F_PRIVATE UINT32_C(0)
36#define RTE_INTR_INSTANCE_F_SHARED RTE_BIT32(0)
38#define RTE_MAX_RXTX_INTR_VEC_ID 512
39#define RTE_INTR_VEC_ZERO_OFFSET 0
40#define RTE_INTR_VEC_RXTX_OFFSET 1
43#define RTE_INTR_EVENT_IN RTE_BIT32(0)
44#define RTE_INTR_EVENT_ERR RTE_BIT32(1)
45#define RTE_INTR_EVENT_HUP RTE_BIT32(2)
46#define RTE_INTR_EVENT_RDHUP RTE_BIT32(3)
218uint32_t rte_intr_active_events_flags(
void);
240struct rte_intr_handle *
334rte_intr_tls_epfd(
void);
355rte_intr_rx_ctl(
struct rte_intr_handle *intr_handle,
356 int epfd,
int op,
unsigned int vec,
void *data);
367rte_intr_free_epoll_fd(
struct rte_intr_handle *intr_handle);
386rte_intr_efd_enable(
struct rte_intr_handle *intr_handle, uint32_t nb_efd);
398rte_intr_efd_disable(
struct rte_intr_handle *intr_handle);
409rte_intr_dp_is_en(
struct rte_intr_handle *intr_handle);
421rte_intr_allow_others(
struct rte_intr_handle *intr_handle);
433rte_intr_cap_multiple(
struct rte_intr_handle *intr_handle);
447struct rte_intr_handle *
448rte_intr_instance_dup(
const struct rte_intr_handle *src);
466rte_intr_dev_fd_set(
struct rte_intr_handle *intr_handle,
int fd);
481rte_intr_dev_fd_get(
const struct rte_intr_handle *intr_handle);
495rte_intr_dev_fd_close(
struct rte_intr_handle *intr_handle);
513rte_intr_max_intr_set(
struct rte_intr_handle *intr_handle,
int max_intr);
528rte_intr_max_intr_get(
const struct rte_intr_handle *intr_handle);
546rte_intr_nb_efd_set(
struct rte_intr_handle *intr_handle,
int nb_efd);
562rte_intr_nb_efd_get(
const struct rte_intr_handle *intr_handle);
582rte_intr_nb_intr_get(
const struct rte_intr_handle *intr_handle);
600rte_intr_efd_counter_size_set(
struct rte_intr_handle *intr_handle,
601 uint8_t efd_counter_size);
617rte_intr_efd_counter_size_get(
const struct rte_intr_handle *intr_handle);
636rte_intr_efds_index_set(
struct rte_intr_handle *intr_handle,
int index,
int fd);
653rte_intr_efds_index_get(
const struct rte_intr_handle *intr_handle,
int index);
673rte_intr_elist_index_set(
struct rte_intr_handle *intr_handle,
int index,
692rte_intr_elist_index_get(
struct rte_intr_handle *intr_handle,
int index);
712rte_intr_vec_list_alloc(
struct rte_intr_handle *intr_handle,
const char *name,
733rte_intr_vec_list_index_set(
struct rte_intr_handle *intr_handle,
int index,
751rte_intr_vec_list_index_get(
const struct rte_intr_handle *intr_handle,
767rte_intr_vec_list_free(
struct rte_intr_handle *intr_handle);
789rte_intr_event_list_update(
struct rte_intr_handle *intr_handle,
int size);
804rte_intr_instance_windows_handle_get(
struct rte_intr_handle *intr_handle);
821rte_intr_instance_windows_handle_set(
struct rte_intr_handle *intr_handle,
822 void *windows_handle);
int rte_intr_disable(const struct rte_intr_handle *intr_handle)
void rte_intr_instance_free(struct rte_intr_handle *intr_handle)
enum rte_intr_handle_type rte_intr_type_get(const struct rte_intr_handle *intr_handle)
void(* rte_intr_callback_fn)(void *cb_arg)
int rte_intr_fd_set(struct rte_intr_handle *intr_handle, int fd)
int rte_intr_callback_unregister_pending(const struct rte_intr_handle *intr_handle, rte_intr_callback_fn cb_fn, void *cb_arg, rte_intr_unregister_callback_fn ucb_fn)
int rte_intr_type_set(struct rte_intr_handle *intr_handle, enum rte_intr_handle_type type)
int rte_intr_callback_unregister(const struct rte_intr_handle *intr_handle, rte_intr_callback_fn cb, void *cb_arg)
int rte_intr_callback_unregister_sync(const struct rte_intr_handle *intr_handle, rte_intr_callback_fn cb, void *cb_arg)
@ RTE_INTR_HANDLE_UNKNOWN
@ RTE_INTR_HANDLE_VFIO_LEGACY
@ RTE_INTR_HANDLE_DEV_EVENT
@ RTE_INTR_HANDLE_UIO_INTX
@ RTE_INTR_HANDLE_VFIO_MSI
@ RTE_INTR_HANDLE_VFIO_MSIX
@ RTE_INTR_HANDLE_VFIO_REQ
struct rte_intr_handle * rte_intr_instance_alloc(uint32_t flags)
int rte_intr_fd_get(const struct rte_intr_handle *intr_handle)
int rte_intr_callback_register(const struct rte_intr_handle *intr_handle, rte_intr_callback_fn cb, void *cb_arg)
void(* rte_intr_unregister_callback_fn)(struct rte_intr_handle *intr_handle, void *cb_arg)
__rte_experimental void rte_intr_fd_close(struct rte_intr_handle *intr_handle)
int rte_thread_is_intr(void)
int rte_intr_ack(const struct rte_intr_handle *intr_handle)
int rte_intr_enable(const struct rte_intr_handle *intr_handle)