patch 'raw/ntb: avoid disabling interrupt twice' has been queued to stable release 22.11.3

Xueming Li xuemingl at nvidia.com
Thu Aug 10 01:48:14 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=008fdd0e07b47e782154c8142c7d930ef1798cdd

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 008fdd0e07b47e782154c8142c7d930ef1798cdd Mon Sep 17 00:00:00 2001
From: Junfeng Guo <junfeng.guo at intel.com>
Date: Wed, 28 Jun 2023 17:12:18 +0800
Subject: [PATCH] raw/ntb: avoid disabling interrupt twice
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit a10529f4025eaef0c9803d845b9afc1d5fb17b59 ]

During EAL cleanup stage, all bus devices are cleaned up properly.
In the meantime, the ntb example app will also do the device cleanup
process, which may call the dev ops '*dev->dev_ops->dev_close' twice.

If this dev ops for ntb was called twice, the interrupt handle for
EAL will be disabled twice and will lead to error for the second
time. Like this: "EAL: Error disabling MSI-X interrupts for fd xx"

Thus, this patch added the check process for disabling interrupt in
dev_close ops, to ensure that interrupt only be disabled once.

Fixes: 1cab1a40ea9b ("bus: cleanup devices on shutdown")

Signed-off-by: Junfeng Guo <junfeng.guo at intel.com>
Tested-by: Wei Ling <weix.ling at intel.com>
Acked-by: Jingjing Wu <jingjing.wu at intel.com>
---
 drivers/raw/ntb/ntb.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c
index 76e98fe515..0ed4c14592 100644
--- a/drivers/raw/ntb/ntb.c
+++ b/drivers/raw/ntb/ntb.c
@@ -1045,6 +1045,11 @@ ntb_dev_close(struct rte_rawdev *dev)
 	hw->queue_pairs = 0;
 
 	intr_handle = hw->pci_dev->intr_handle;
+	/* Disable interrupt only once */
+	if (!rte_intr_nb_efd_get(intr_handle) &&
+	    !rte_intr_max_intr_get(intr_handle))
+		return 0;
+
 	/* Clean datapath event and vec mapping */
 	rte_intr_efd_disable(intr_handle);
 	rte_intr_vec_list_free(intr_handle);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.545301600 +0800
+++ 0052-raw-ntb-avoid-disabling-interrupt-twice.patch	2023-08-09 21:51:18.194352000 +0800
@@ -1 +1 @@
-From a10529f4025eaef0c9803d845b9afc1d5fb17b59 Mon Sep 17 00:00:00 2001
+From 008fdd0e07b47e782154c8142c7d930ef1798cdd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit a10529f4025eaef0c9803d845b9afc1d5fb17b59 ]
@@ -18 +20,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list