[dpdk-stable] patch 'raw/ifpga/base: fix interrupt handler instance usage' has been queued to stable release 19.11.6
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Nov 9 19:40:37 CET 2020
Hi,
FYI, your patch has been queued to stable release 19.11.6
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/11/20. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b010a819fdc87b235c10dfdb99a5e715bd57d396
Thanks.
Luca Boccassi
---
>From b010a819fdc87b235c10dfdb99a5e715bd57d396 Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang at intel.com>
Date: Fri, 23 Oct 2020 04:59:55 -0400
Subject: [PATCH] raw/ifpga/base: fix interrupt handler instance usage
[ upstream commit df016da79b59bf48118deab544d4e1829b0eebe1 ]
Interrupt handler copied to the local 'intr_handle' variable by value
before passing it to IRQ functions.
This leads IRQ functions update the local variable instead of
'ifpga_irq_handle'.
Instead, using 'intr_handle' local variable as pointer to
'ifpga_irq_handle' as intended.
Fixes: e0a1aafe2af9 ("raw/ifpga: introduce IRQ functions")
Signed-off-by: Wei Huang <wei.huang at intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang at intel.com>
Acked-by: Rosen Xu <rosen.xu at intel.com>
---
drivers/raw/ifpga/ifpga_rawdev.c | 34 ++++++++++++++++----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index b8701e155b..acbfdfda27 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -1336,17 +1336,16 @@ int
ifpga_unregister_msix_irq(enum ifpga_irq_type type,
int vec_start, rte_intr_callback_fn handler, void *arg)
{
- struct rte_intr_handle intr_handle;
+ struct rte_intr_handle *intr_handle;
if (type == IFPGA_FME_IRQ)
- intr_handle = ifpga_irq_handle[0];
+ intr_handle = &ifpga_irq_handle[0];
else if (type == IFPGA_AFU_IRQ)
- intr_handle = ifpga_irq_handle[vec_start + 1];
+ intr_handle = &ifpga_irq_handle[vec_start + 1];
- rte_intr_efd_disable(&intr_handle);
+ rte_intr_efd_disable(intr_handle);
- return rte_intr_callback_unregister(&intr_handle,
- handler, arg);
+ return rte_intr_callback_unregister(intr_handle, handler, arg);
}
int
@@ -1356,7 +1355,7 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
void *arg)
{
int ret;
- struct rte_intr_handle intr_handle;
+ struct rte_intr_handle *intr_handle;
struct opae_adapter *adapter;
struct opae_manager *mgr;
struct opae_accelerator *acc;
@@ -1370,26 +1369,26 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
return -ENODEV;
if (type == IFPGA_FME_IRQ) {
- intr_handle = ifpga_irq_handle[0];
+ intr_handle = &ifpga_irq_handle[0];
count = 1;
} else if (type == IFPGA_AFU_IRQ)
- intr_handle = ifpga_irq_handle[vec_start + 1];
+ intr_handle = &ifpga_irq_handle[vec_start + 1];
- intr_handle.type = RTE_INTR_HANDLE_VFIO_MSIX;
+ intr_handle->type = RTE_INTR_HANDLE_VFIO_MSIX;
- ret = rte_intr_efd_enable(&intr_handle, count);
+ ret = rte_intr_efd_enable(intr_handle, count);
if (ret)
return -ENODEV;
- intr_handle.fd = intr_handle.efds[0];
+ intr_handle->fd = intr_handle->efds[0];
IFPGA_RAWDEV_PMD_DEBUG("register %s irq, vfio_fd=%d, fd=%d\n",
- name, intr_handle.vfio_dev_fd,
- intr_handle.fd);
+ name, intr_handle->vfio_dev_fd,
+ intr_handle->fd);
if (type == IFPGA_FME_IRQ) {
struct fpga_fme_err_irq_set err_irq_set;
- err_irq_set.evtfd = intr_handle.efds[0];
+ err_irq_set.evtfd = intr_handle->efds[0];
ret = opae_manager_ifpga_set_err_irq(mgr, &err_irq_set);
if (ret)
@@ -1399,13 +1398,14 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
if (!acc)
return -EINVAL;
- ret = opae_acc_set_irq(acc, vec_start, count, intr_handle.efds);
+ ret = opae_acc_set_irq(acc, vec_start, count,
+ intr_handle->efds);
if (ret)
return -EINVAL;
}
/* register interrupt handler using DPDK API */
- ret = rte_intr_callback_register(&intr_handle,
+ ret = rte_intr_callback_register(intr_handle,
handler, (void *)arg);
if (ret)
return -EINVAL;
--
2.27.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-11-09 18:40:13.109033606 +0000
+++ 0049-raw-ifpga-base-fix-interrupt-handler-instance-usage.patch 2020-11-09 18:40:11.175311967 +0000
@@ -1 +1 @@
-From df016da79b59bf48118deab544d4e1829b0eebe1 Mon Sep 17 00:00:00 2001
+From b010a819fdc87b235c10dfdb99a5e715bd57d396 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit df016da79b59bf48118deab544d4e1829b0eebe1 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index a7463de8e4..e5b938d9d6 100644
+index b8701e155b..acbfdfda27 100644
@@ -28 +29 @@
-@@ -1332,17 +1332,16 @@ int
+@@ -1336,17 +1336,16 @@ int
@@ -51 +52 @@
-@@ -1352,7 +1351,7 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
+@@ -1356,7 +1355,7 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
@@ -60 +61 @@
-@@ -1366,26 +1365,26 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
+@@ -1370,26 +1369,26 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
@@ -95 +96 @@
-@@ -1395,13 +1394,14 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
+@@ -1399,13 +1398,14 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
More information about the stable
mailing list