patch 'net/virtio: avoid unneeded link interrupt configuration' has been queued to stable release 19.11.11

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Nov 30 17:33:52 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before December 10th 2021. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/d7a91388de0c5282bb4134d592491b148948a211

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From d7a91388de0c5282bb4134d592491b148948a211 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Tue, 31 Aug 2021 17:54:10 +0200
Subject: [PATCH] net/virtio: avoid unneeded link interrupt configuration

[ upstream commit 5be2325ecec83ab9dd5e25dde6112aed56f3e4f6 ]

There is no reason to re-register a interrupt handler for LSC if this
feature was not requested in the first place.
A simple use case is when asking for Rx interrupts without LSC interrupt.

Fixes: 26b683b4f7d0 ("net/virtio: setup Rx queue interrupts")

Signed-off-by: David Marchand <david.marchand at redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 0eca488c40..4e615d2b4b 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1643,13 +1643,15 @@ virtio_configure_intr(struct rte_eth_dev *dev)
 		}
 	}
 
-	/* Re-register callback to update max_intr */
-	rte_intr_callback_unregister(dev->intr_handle,
-				     virtio_interrupt_handler,
-				     dev);
-	rte_intr_callback_register(dev->intr_handle,
-				   virtio_interrupt_handler,
-				   dev);
+	if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
+		/* Re-register callback to update max_intr */
+		rte_intr_callback_unregister(dev->intr_handle,
+					     virtio_interrupt_handler,
+					     dev);
+		rte_intr_callback_register(dev->intr_handle,
+					   virtio_interrupt_handler,
+					   dev);
+	}
 
 	/* DO NOT try to remove this! This function will enable msix, or QEMU
 	 * will encounter SIGSEGV when DRIVER_OK is sent.
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-30 16:50:07.724067766 +0100
+++ 0028-net-virtio-avoid-unneeded-link-interrupt-configurati.patch	2021-11-30 16:50:05.614872238 +0100
@@ -1 +1 @@
-From 5be2325ecec83ab9dd5e25dde6112aed56f3e4f6 Mon Sep 17 00:00:00 2001
+From d7a91388de0c5282bb4134d592491b148948a211 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5be2325ecec83ab9dd5e25dde6112aed56f3e4f6 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 9690eb4fb2..061d02f666 100644
+index 0eca488c40..4e615d2b4b 100644
@@ -23 +24 @@
-@@ -1685,13 +1685,15 @@ virtio_configure_intr(struct rte_eth_dev *dev)
+@@ -1643,13 +1643,15 @@ virtio_configure_intr(struct rte_eth_dev *dev)


More information about the stable mailing list