DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] eal: read data buffer on RTE_INTR_HANDLE_VFIO_REQ
@ 2021-08-23 14:17 Szwed, Maciej
  2021-08-24  9:26 ` [dpdk-dev] [PATCH v3] " Maciej Szwed
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Szwed, Maciej @ 2021-08-23 14:17 UTC (permalink / raw)
  To: dev

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 | 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:
--

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH v3] eal: read data buffer on RTE_INTR_HANDLE_VFIO_REQ
  2021-08-23 14:17 [dpdk-dev] [PATCH v2] eal: read data buffer on RTE_INTR_HANDLE_VFIO_REQ Szwed, Maciej
@ 2021-08-24  9:26 ` Maciej Szwed
  2021-08-24  9:55 ` [dpdk-dev] [PATCH v4] " Maciej Szwed
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Maciej Szwed @ 2021-08-24  9:26 UTC (permalink / raw)
  To: dev; +Cc: Maciej Szwed

We should call read() on RTE_INTR_HANDLE_VFIO_REQ event
to confirm that event.

Signed-off-by: "Szwed, Maciej" <maciej.szwed@intel.com>
---
 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH v4] eal: read data buffer on RTE_INTR_HANDLE_VFIO_REQ
  2021-08-23 14:17 [dpdk-dev] [PATCH v2] eal: read data buffer on RTE_INTR_HANDLE_VFIO_REQ Szwed, Maciej
  2021-08-24  9:26 ` [dpdk-dev] [PATCH v3] " Maciej Szwed
@ 2021-08-24  9:55 ` Maciej Szwed
  2021-10-14 13:06   ` David Marchand
  2021-10-19  9:51 ` [dpdk-dev] [PATCH v5] eal: fix: " Maciej Szwed
  2021-10-19 10:06 ` [dpdk-dev] [PATCH v6] " Maciej Szwed
  3 siblings, 1 reply; 8+ messages in thread
From: Maciej Szwed @ 2021-08-24  9:55 UTC (permalink / raw)
  To: dev; +Cc: Maciej Szwed

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 | 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH v4] eal: read data buffer on RTE_INTR_HANDLE_VFIO_REQ
  2021-08-24  9:55 ` [dpdk-dev] [PATCH v4] " Maciej Szwed
@ 2021-10-14 13:06   ` David Marchand
  0 siblings, 0 replies; 8+ messages in thread
From: David Marchand @ 2021-10-14 13:06 UTC (permalink / raw)
  To: Maciej Szwed; +Cc: dev, Harman Kalra, Burakov, Anatoly, Jeff Guo

On Tue, Aug 24, 2021 at 12:28 PM Maciej Szwed <maciej.szwed@intel.com> wrote:
>
> We should call read() on RTE_INTR_HANDLE_VFIO_REQ event
> to confirm that event.

Still no review, Cc: maintainers / contributors to this code.

This looks like a fix, if so, please add a Fixes: tag.
Should this be backported to stable branches?


>
> Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
> ---
>  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;

Afaiu, call should be set only if the read() call succeeds.


> +#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
>



-- 
David Marchand


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH v5] eal: fix: read data buffer on RTE_INTR_HANDLE_VFIO_REQ
  2021-08-23 14:17 [dpdk-dev] [PATCH v2] eal: read data buffer on RTE_INTR_HANDLE_VFIO_REQ Szwed, Maciej
  2021-08-24  9:26 ` [dpdk-dev] [PATCH v3] " Maciej Szwed
  2021-08-24  9:55 ` [dpdk-dev] [PATCH v4] " Maciej Szwed
@ 2021-10-19  9:51 ` Maciej Szwed
  2021-10-19 10:06 ` [dpdk-dev] [PATCH v6] " Maciej Szwed
  3 siblings, 0 replies; 8+ messages in thread
From: Maciej Szwed @ 2021-10-19  9:51 UTC (permalink / raw)
  To: dev; +Cc: hkalra, anatoly.burakov, jia.guo, david.marchand, Maciej Szwed

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 | 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH v6] eal: fix: read data buffer on RTE_INTR_HANDLE_VFIO_REQ
  2021-08-23 14:17 [dpdk-dev] [PATCH v2] eal: read data buffer on RTE_INTR_HANDLE_VFIO_REQ Szwed, Maciej
                   ` (2 preceding siblings ...)
  2021-10-19  9:51 ` [dpdk-dev] [PATCH v5] eal: fix: " Maciej Szwed
@ 2021-10-19 10:06 ` Maciej Szwed
  2021-10-19 11:52   ` David Marchand
  3 siblings, 1 reply; 8+ messages in thread
From: Maciej Szwed @ 2021-10-19 10:06 UTC (permalink / raw)
  To: dev; +Cc: hkalra, anatoly.burakov, jia.guo, david.marchand, Maciej Szwed

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(-)

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH v6] eal: fix: read data buffer on RTE_INTR_HANDLE_VFIO_REQ
  2021-10-19 10:06 ` [dpdk-dev] [PATCH v6] " Maciej Szwed
@ 2021-10-19 11:52   ` David Marchand
  2021-11-08 17:29     ` David Marchand
  0 siblings, 1 reply; 8+ messages in thread
From: David Marchand @ 2021-10-19 11:52 UTC (permalink / raw)
  To: Harman Kalra, Burakov, Anatoly; +Cc: dev, Maciej Szwed

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH v6] eal: fix: read data buffer on RTE_INTR_HANDLE_VFIO_REQ
  2021-10-19 11:52   ` David Marchand
@ 2021-11-08 17:29     ` David Marchand
  0 siblings, 0 replies; 8+ messages in thread
From: David Marchand @ 2021-11-08 17:29 UTC (permalink / raw)
  To: Maciej Szwed, Harman Kalra, Burakov, Anatoly; +Cc: dev

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.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-11-08 17:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-23 14:17 [dpdk-dev] [PATCH v2] eal: read data buffer on RTE_INTR_HANDLE_VFIO_REQ Szwed, Maciej
2021-08-24  9:26 ` [dpdk-dev] [PATCH v3] " Maciej Szwed
2021-08-24  9:55 ` [dpdk-dev] [PATCH v4] " Maciej Szwed
2021-10-14 13:06   ` David Marchand
2021-10-19  9:51 ` [dpdk-dev] [PATCH v5] eal: fix: " Maciej Szwed
2021-10-19 10:06 ` [dpdk-dev] [PATCH v6] " Maciej Szwed
2021-10-19 11:52   ` David Marchand
2021-11-08 17:29     ` David Marchand

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git