[dpdk-stable] patch 'net/virtio: register/unregister intr handler on start/stop' has been queued to stable release 18.08.1
Kevin Traynor
ktraynor at redhat.com
Fri Nov 23 11:26:16 CET 2018
Hi,
FYI, your patch has been queued to stable release 18.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/29/18. 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. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.
Thanks.
Kevin Traynor
---
>From 6771b50519140b37d4477eab061aef81a4ea0be0 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <bluca at debian.org>
Date: Wed, 31 Oct 2018 18:39:43 +0000
Subject: [PATCH] net/virtio: register/unregister intr handler on start/stop
[ upstream commit f9b0d1902caf893493b5e07763ecf817c34fc75c ]
Register and unregister the virtio interrupt handler when the device is
started and stopped. This allows a virtio device to be hotplugged or
unplugged.
Fixes: c1f86306a026 ("virtio: add new driver")
Signed-off-by: Brian Russell <brussell at brocade.com>
Signed-off-by: Luca Boccassi <bluca at debian.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
drivers/net/virtio/virtio_ethdev.c | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 614357da7..3195443a1 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1680,9 +1680,4 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
goto out;
- /* Setup interrupt callback */
- if (eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
- rte_intr_callback_register(eth_dev->intr_handle,
- virtio_interrupt_handler, eth_dev);
-
return 0;
@@ -1710,9 +1705,4 @@ eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)
eth_dev->data->mac_addrs = NULL;
- /* reset interrupt callback */
- if (eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
- rte_intr_callback_unregister(eth_dev->intr_handle,
- virtio_interrupt_handler,
- eth_dev);
if (eth_dev->device)
rte_pci_unmap_device(RTE_ETH_DEV_TO_PCI(eth_dev));
@@ -1973,4 +1963,10 @@ virtio_dev_start(struct rte_eth_dev *dev)
virtio_intr_disable(dev);
+ /* Setup interrupt callback */
+ if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
+ rte_intr_callback_register(dev->intr_handle,
+ virtio_interrupt_handler,
+ dev);
+
if (virtio_intr_enable(dev) < 0) {
PMD_DRV_LOG(ERR, "interrupt enable failed");
@@ -2082,7 +2078,15 @@ virtio_dev_stop(struct rte_eth_dev *dev)
rte_spinlock_lock(&hw->state_lock);
- if (intr_conf->lsc || intr_conf->rxq)
+ if (intr_conf->lsc || intr_conf->rxq) {
virtio_intr_disable(dev);
+ /* Reset interrupt callback */
+ if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
+ rte_intr_callback_unregister(dev->intr_handle,
+ virtio_interrupt_handler,
+ dev);
+ }
+ }
+
hw->started = 0;
memset(&link, 0, sizeof(link));
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-11-23 10:22:54.559733834 +0000
+++ 0012-net-virtio-register-unregister-intr-handler-on-start.patch 2018-11-23 10:22:54.000000000 +0000
@@ -1,14 +1,15 @@
-From f9b0d1902caf893493b5e07763ecf817c34fc75c Mon Sep 17 00:00:00 2001
+From 6771b50519140b37d4477eab061aef81a4ea0be0 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <bluca at debian.org>
Date: Wed, 31 Oct 2018 18:39:43 +0000
Subject: [PATCH] net/virtio: register/unregister intr handler on start/stop
+[ upstream commit f9b0d1902caf893493b5e07763ecf817c34fc75c ]
+
Register and unregister the virtio interrupt handler when the device is
started and stopped. This allows a virtio device to be hotplugged or
unplugged.
Fixes: c1f86306a026 ("virtio: add new driver")
-Cc: stable at dpdk.org
Signed-off-by: Brian Russell <brussell at brocade.com>
Signed-off-by: Luca Boccassi <bluca at debian.org>
@@ -18,7 +19,7 @@
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
-index 10a7e3fcc..da8717726 100644
+index 614357da7..3195443a1 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1680,9 +1680,4 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
@@ -31,8 +32,8 @@
-
return 0;
-@@ -1707,9 +1702,4 @@ eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)
- eth_dev->rx_pkt_burst = NULL;
+@@ -1710,9 +1705,4 @@ eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)
+ eth_dev->data->mac_addrs = NULL;
- /* reset interrupt callback */
- if (eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
@@ -41,7 +42,7 @@
- eth_dev);
if (eth_dev->device)
rte_pci_unmap_device(RTE_ETH_DEV_TO_PCI(eth_dev));
-@@ -1970,4 +1960,10 @@ virtio_dev_start(struct rte_eth_dev *dev)
+@@ -1973,4 +1963,10 @@ virtio_dev_start(struct rte_eth_dev *dev)
virtio_intr_disable(dev);
+ /* Setup interrupt callback */
@@ -52,7 +53,7 @@
+
if (virtio_intr_enable(dev) < 0) {
PMD_DRV_LOG(ERR, "interrupt enable failed");
-@@ -2079,7 +2075,15 @@ virtio_dev_stop(struct rte_eth_dev *dev)
+@@ -2082,7 +2078,15 @@ virtio_dev_stop(struct rte_eth_dev *dev)
rte_spinlock_lock(&hw->state_lock);
- if (intr_conf->lsc || intr_conf->rxq)
More information about the stable
mailing list