lib: work around unnamed structs/unions
[dpdk.git] / lib / librte_eal / linuxapp / eal / include / exec-env / rte_interrupts.h
index 45071b7..d459bf4 100644 (file)
@@ -39,6 +39,8 @@
 #define _RTE_LINUXAPP_INTERRUPTS_H_
 
 #define RTE_MAX_RXTX_INTR_VEC_ID     32
+#define RTE_INTR_VEC_ZERO_OFFSET      0
+#define RTE_INTR_VEC_RXTX_OFFSET      1
 
 enum rte_intr_handle_type {
        RTE_INTR_HANDLE_UNKNOWN = 0,
@@ -48,6 +50,7 @@ enum rte_intr_handle_type {
        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_MAX
 };
 
@@ -79,6 +82,7 @@ struct rte_epoll_event {
 
 /** Handle for interrupts. */
 struct rte_intr_handle {
+       RTE_STD_C11
        union {
                int vfio_dev_fd;  /**< VFIO device file descriptor */
                int uio_cfg_fd;  /**< UIO config file descriptor
@@ -173,8 +177,9 @@ rte_intr_rx_ctl(struct rte_intr_handle *intr_handle,
  *
  * @param intr_handle
  *   Pointer to the interrupt handle.
- * @param nb_vec
+ * @param nb_efd
  *   Number of interrupt vector trying to enable.
+ *   The value 0 is not allowed.
  * @return
  *   - On success, zero.
  *   - On failure, a negative value.
@@ -211,4 +216,14 @@ rte_intr_dp_is_en(struct rte_intr_handle *intr_handle);
 int
 rte_intr_allow_others(struct rte_intr_handle *intr_handle);
 
+/**
+ * The multiple interrupt vector capability of interrupt handle instance.
+ * It returns zero if no multiple interrupt vector support.
+ *
+ * @param intr_handle
+ *   Pointer to the interrupt handle.
+ */
+int
+rte_intr_cap_multiple(struct rte_intr_handle *intr_handle);
+
 #endif /* _RTE_LINUXAPP_INTERRUPTS_H_ */