From d37641029ada07f90a24ec3796cad2b86d02f586 Mon Sep 17 00:00:00 2001 From: Cunming Liang Date: Mon, 20 Jul 2015 11:02:17 +0800 Subject: [PATCH] eal/linux: add interrupt vectors The patch adds interrupt vectors support in rte_intr_handle. 'vec_en' is set when interrupt vectors are detected and associated event fds are set. Those event fds are stored in efds[]. 'intr_vec' is reserved for device driver to initialize the vector mapping table. Signed-off-by: Danny Zhou Signed-off-by: Cunming Liang --- .../bsdapp/eal/include/exec-env/rte_interrupts.h | 5 +++++ .../linuxapp/eal/include/exec-env/rte_interrupts.h | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h b/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h index d5f391fce5..3dc4e00398 100644 --- a/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h +++ b/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h @@ -50,6 +50,11 @@ struct rte_intr_handle { int fd; /**< file descriptor */ int uio_cfg_fd; /**< UIO config file descriptor */ enum rte_intr_handle_type type; /**< handle type */ +#ifdef RTE_NEXT_ABI + int max_intr; /**< max interrupt requested */ + uint32_t nb_efd; /**< number of available efds */ + int *intr_vec; /**< intr vector number array */ +#endif }; #endif /* _RTE_BSDAPP_INTERRUPTS_H_ */ diff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h index bdeb3fc13f..ac33edaffe 100644 --- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h +++ b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h @@ -38,6 +38,8 @@ #ifndef _RTE_LINUXAPP_INTERRUPTS_H_ #define _RTE_LINUXAPP_INTERRUPTS_H_ +#define RTE_MAX_RXTX_INTR_VEC_ID 32 + enum rte_intr_handle_type { RTE_INTR_HANDLE_UNKNOWN = 0, RTE_INTR_HANDLE_UIO, /**< uio device handle */ @@ -58,6 +60,12 @@ struct rte_intr_handle { }; int fd; /**< interrupt event file descriptor */ enum rte_intr_handle_type type; /**< handle type */ +#ifdef RTE_NEXT_ABI + uint32_t max_intr; /**< max interrupt requested */ + uint32_t nb_efd; /**< number of available efd(event fd) */ + int efds[RTE_MAX_RXTX_INTR_VEC_ID]; /**< intr vectors/efds mapping */ + int *intr_vec; /**< intr vector number array */ +#endif }; #endif /* _RTE_LINUXAPP_INTERRUPTS_H_ */ -- 2.20.1