Add new interrupt handle type of RTE_INTR_HANDLE_DEV_EVENT, for
device event interrupt monitor.

Signed-off-by: Jeff Guo <jia....@intel.com>
---
v16->v15:
split into small patch base on the function
---
 lib/librte_eal/common/include/rte_eal_interrupts.h | 1 +
 lib/librte_eal/linuxapp/eal/eal_interrupts.c       | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/include/rte_eal_interrupts.h 
b/lib/librte_eal/common/include/rte_eal_interrupts.h
index 3f792a9..6eb4932 100644
--- a/lib/librte_eal/common/include/rte_eal_interrupts.h
+++ b/lib/librte_eal/common/include/rte_eal_interrupts.h
@@ -34,6 +34,7 @@ enum rte_intr_handle_type {
        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_MAX           /**< count of elements */
 };
 
diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c 
b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index f86f22f..842acaa 100644
--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
@@ -674,7 +674,10 @@ eal_intr_process_interrupts(struct epoll_event *events, 
int nfds)
                        bytes_read = 0;
                        call = true;
                        break;
-
+               case RTE_INTR_HANDLE_DEV_EVENT:
+                       bytes_read = 0;
+                       call = true;
+                       break;
                default:
                        bytes_read = 1;
                        break;
-- 
2.7.4

Reply via email to