[dpdk-dev] [PATCH v5] eal: fix: read data buffer on RTE_INTR_HANDLE_VFIO_REQ

2021-10-19 Thread Maciej Szwed
We should call read() on RTE_INTR_HANDLE_VFIO_REQ event
to confirm that event.

Signed-off-by: Maciej Szwed 
---
 lib/eal/linux/eal_interrupts.c | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
index 22b3b7bcd9..dc42527344 100644
--- a/lib/eal/linux/eal_interrupts.c
+++ b/lib/eal/linux/eal_interrupts.c
@@ -918,17 +918,16 @@ eal_intr_process_interrupts(struct epoll_event *events, 
int nfds)
bytes_read = sizeof(buf.timerfd_num);
break;
 #ifdef VFIO_PRESENT
+#ifdef HAVE_VFIO_DEV_REQ_INTERFACE
+   case RTE_INTR_HANDLE_VFIO_REQ:
+#endif
case RTE_INTR_HANDLE_VFIO_MSIX:
case RTE_INTR_HANDLE_VFIO_MSI:
case RTE_INTR_HANDLE_VFIO_LEGACY:
bytes_read = sizeof(buf.vfio_intr_count);
break;
-#ifdef HAVE_VFIO_DEV_REQ_INTERFACE
-   case RTE_INTR_HANDLE_VFIO_REQ:
-   bytes_read = 0;
-   call = true;
-   break;
-#endif
 #endif
case RTE_INTR_HANDLE_VDEV:
case RTE_INTR_HANDLE_EXT:
-- 
2.27.0



[dpdk-dev] [PATCH v6] eal: fix: read data buffer on RTE_INTR_HANDLE_VFIO_REQ

2021-10-19 Thread Maciej Szwed
We should call read() on RTE_INTR_HANDLE_VFIO_REQ event
to confirm that event.

Signed-off-by: Maciej Szwed 
---
 lib/eal/linux/eal_interrupts.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
index 22b3b7bcd9..7c716a3812 100644
--- a/lib/eal/linux/eal_interrupts.c
+++ b/lib/eal/linux/eal_interrupts.c
@@ -918,17 +918,14 @@ eal_intr_process_interrupts(struct epoll_event *events, 
int nfds)
bytes_read = sizeof(buf.timerfd_num);
break;
 #ifdef VFIO_PRESENT
+#ifdef HAVE_VFIO_DEV_REQ_INTERFACE
+   case RTE_INTR_HANDLE_VFIO_REQ:
+#endif
case RTE_INTR_HANDLE_VFIO_MSIX:
case RTE_INTR_HANDLE_VFIO_MSI:
case RTE_INTR_HANDLE_VFIO_LEGACY:
bytes_read = sizeof(buf.vfio_intr_count);
break;
-#ifdef HAVE_VFIO_DEV_REQ_INTERFACE
-   case RTE_INTR_HANDLE_VFIO_REQ:
-   bytes_read = 0;
-   call = true;
-   break;
-#endif
 #endif
case RTE_INTR_HANDLE_VDEV:
case RTE_INTR_HANDLE_EXT:
-- 
2.27.0



[dpdk-dev] [PATCH v3] eal: read data buffer on RTE_INTR_HANDLE_VFIO_REQ

2021-08-24 Thread Maciej Szwed
We should call read() on RTE_INTR_HANDLE_VFIO_REQ event
to confirm that event.

Signed-off-by: "Szwed, Maciej" 
---
 lib/eal/linux/eal_interrupts.c | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
index 22b3b7bcd9..dc42527344 100644
--- a/lib/eal/linux/eal_interrupts.c
+++ b/lib/eal/linux/eal_interrupts.c
@@ -918,17 +918,16 @@ eal_intr_process_interrupts(struct epoll_event *events, 
int nfds)
bytes_read = sizeof(buf.timerfd_num);
break;
 #ifdef VFIO_PRESENT
+#ifdef HAVE_VFIO_DEV_REQ_INTERFACE
+   case RTE_INTR_HANDLE_VFIO_REQ:
+   call = true;
+#endif
+   /* fall through */
case RTE_INTR_HANDLE_VFIO_MSIX:
case RTE_INTR_HANDLE_VFIO_MSI:
case RTE_INTR_HANDLE_VFIO_LEGACY:
bytes_read = sizeof(buf.vfio_intr_count);
break;
-#ifdef HAVE_VFIO_DEV_REQ_INTERFACE
-   case RTE_INTR_HANDLE_VFIO_REQ:
-   bytes_read = 0;
-   call = true;
-   break;
-#endif
 #endif
case RTE_INTR_HANDLE_VDEV:
case RTE_INTR_HANDLE_EXT:
-- 
2.27.0



[dpdk-dev] [PATCH v4] eal: read data buffer on RTE_INTR_HANDLE_VFIO_REQ

2021-08-24 Thread Maciej Szwed
We should call read() on RTE_INTR_HANDLE_VFIO_REQ event
to confirm that event.

Signed-off-by: Maciej Szwed 
---
 lib/eal/linux/eal_interrupts.c | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
index 22b3b7bcd9..dc42527344 100644
--- a/lib/eal/linux/eal_interrupts.c
+++ b/lib/eal/linux/eal_interrupts.c
@@ -918,17 +918,16 @@ eal_intr_process_interrupts(struct epoll_event *events, 
int nfds)
bytes_read = sizeof(buf.timerfd_num);
break;
 #ifdef VFIO_PRESENT
+#ifdef HAVE_VFIO_DEV_REQ_INTERFACE
+   case RTE_INTR_HANDLE_VFIO_REQ:
+   call = true;
+#endif
+   /* fall through */
case RTE_INTR_HANDLE_VFIO_MSIX:
case RTE_INTR_HANDLE_VFIO_MSI:
case RTE_INTR_HANDLE_VFIO_LEGACY:
bytes_read = sizeof(buf.vfio_intr_count);
break;
-#ifdef HAVE_VFIO_DEV_REQ_INTERFACE
-   case RTE_INTR_HANDLE_VFIO_REQ:
-   bytes_read = 0;
-   call = true;
-   break;
-#endif
 #endif
case RTE_INTR_HANDLE_VDEV:
case RTE_INTR_HANDLE_EXT:
-- 
2.27.0