diff mbox series

[v2,2/2] net/virtio: fix virtio-user Rx interrupts with multi queue

Message ID 20210831155411.17672-3-david.marchand@redhat.com (mailing list archive)
State Accepted
Delegated to: Maxime Coquelin
Headers show
Series virtio-user interrupt fixes | expand

Checks

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

Commit Message

David Marchand Aug. 31, 2021, 3:54 p.m. UTC
The callfds[] array stores eventfds sequentially for Rx and Tx vq.

Fixes: 3d4fb6fd2505 ("net/virtio-user: support Rx interrupt")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Maxime Coquelin Sept. 14, 2021, 8:39 a.m. UTC | #1
On 8/31/21 5:54 PM, David Marchand wrote:
> The callfds[] array stores eventfds sequentially for Rx and Tx vq.
> 
> Fixes: 3d4fb6fd2505 ("net/virtio-user: support Rx interrupt")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  drivers/net/virtio/virtio_user/virtio_user_dev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
> index 16c58710d7..89f8b2271f 100644
> --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
> +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
> @@ -416,7 +416,7 @@ virtio_user_fill_intr_handle(struct virtio_user_dev *dev)
>  	}
>  
>  	for (i = 0; i < dev->max_queue_pairs; ++i)
> -		eth_dev->intr_handle->efds[i] = dev->callfds[i];
> +		eth_dev->intr_handle->efds[i] = dev->callfds[2 * i];
>  	eth_dev->intr_handle->nb_efd = dev->max_queue_pairs;
>  	eth_dev->intr_handle->max_intr = dev->max_queue_pairs + 1;
>  	eth_dev->intr_handle->type = RTE_INTR_HANDLE_VDEV;
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime
diff mbox series

Patch

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 16c58710d7..89f8b2271f 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -416,7 +416,7 @@  virtio_user_fill_intr_handle(struct virtio_user_dev *dev)
 	}
 
 	for (i = 0; i < dev->max_queue_pairs; ++i)
-		eth_dev->intr_handle->efds[i] = dev->callfds[i];
+		eth_dev->intr_handle->efds[i] = dev->callfds[2 * i];
 	eth_dev->intr_handle->nb_efd = dev->max_queue_pairs;
 	eth_dev->intr_handle->max_intr = dev->max_queue_pairs + 1;
 	eth_dev->intr_handle->type = RTE_INTR_HANDLE_VDEV;