[v6] eal: fix: read data buffer on RTE_INTR_HANDLE_VFIO_REQ
Checks
Commit Message
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
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.
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.
@@ -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: