[v6] eal: fix: read data buffer on RTE_INTR_HANDLE_VFIO_REQ

Message ID 20211019100657.692706-1-maciej.szwed@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series [v6] eal: fix: read data buffer on RTE_INTR_HANDLE_VFIO_REQ |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot: build success github build: passed
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS

Commit Message

Maciej Szwed Oct. 19, 2021, 10:06 a.m. UTC
  We should call read() on RTE_INTR_HANDLE_VFIO_REQ event
to confirm that event.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
---
 lib/eal/linux/eal_interrupts.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
  

Comments

David Marchand Oct. 19, 2021, 11:52 a.m. UTC | #1
On Tue, Oct 19, 2021 at 12:42 PM Maciej Szwed <maciej.szwed@intel.com> wrote:
>
> We should call read() on RTE_INTR_HANDLE_VFIO_REQ event
> to confirm that event.

It looks like a fix for:
Fixes: 0eb8a1c4c786 ("vfio: add request notifier interrupt")

This fix probably qualifies for backport, but this code has been like
this for a long time, with no report of a bug.
Should we backport it?

If there was no question on backporting it, I would apply it right
away, since I saw no comment from maintainers for such a long time.
I'll wait a bit more hoping to get a reply on my question on backporting.
  
David Marchand Nov. 8, 2021, 5:29 p.m. UTC | #2
On Tue, Oct 19, 2021 at 1:52 PM David Marchand
<david.marchand@redhat.com> wrote:
> On Tue, Oct 19, 2021 at 12:42 PM Maciej Szwed <maciej.szwed@intel.com> wrote:
> >
> > We should call read() on RTE_INTR_HANDLE_VFIO_REQ event
> > to confirm that event.
>
> Fixes: 0eb8a1c4c786 ("vfio: add request notifier interrupt")
Cc: stable@dpdk.org

> > Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>

Applied, thanks.
  

Patch

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: