patch 'net/nbl: fix hardware stats interrupt nesting' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Thu Feb 26 14:09:37 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.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 03/02/26. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/e1dd133babdb94237fc72c6eebdca5a216bac1b4
Thanks.
Kevin
---
>From e1dd133babdb94237fc72c6eebdca5a216bac1b4 Mon Sep 17 00:00:00 2001
From: Dimon Zhao <dimon.zhao at nebula-matrix.com>
Date: Wed, 14 Jan 2026 22:18:07 -0800
Subject: [PATCH] net/nbl: fix hardware stats interrupt nesting
[ upstream commit 3808404c49aa68de55c3602bac20bd496aaaaeba ]
The timer interrupt handler periodically queries and updates
hw_stats via mailbox.
Since mailbox operations rely on interrupts for packet reception,
this causes interrupt nesting.
To resolve this, trigger a task from the interrupt handler and
start a dedicated thread to execute this task,
eliminating the nested interrupt scenario.
Fixes: c9726a719ca1 ("net/nbl: support dropped packets counter")
Signed-off-by: Dimon Zhao <dimon.zhao at nebula-matrix.com>
---
drivers/net/nbl/nbl_dev/nbl_dev.c | 56 ++++++++++++++++++++++++++++++-
drivers/net/nbl/nbl_dev/nbl_dev.h | 2 ++
2 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/drivers/net/nbl/nbl_dev/nbl_dev.c b/drivers/net/nbl/nbl_dev/nbl_dev.c
index 6ebd40ed5d..2b0413fb7c 100644
--- a/drivers/net/nbl/nbl_dev/nbl_dev.c
+++ b/drivers/net/nbl/nbl_dev/nbl_dev.c
@@ -169,9 +169,35 @@ alloc_uvn_stat_pkt_drop_fail:
}
+static uint32_t nbl_dev_thread_hw_stats_task(void *param)
+{
+ struct rte_eth_dev *eth_dev = param;
+ struct nbl_adapter *adapter = ETH_DEV_TO_NBL_DEV_PF_PRIV(eth_dev);
+ struct nbl_dev_mgt *dev_mgt = NBL_ADAPTER_TO_DEV_MGT(adapter);
+ struct nbl_dev_net_mgt *net_dev = NBL_DEV_MGT_TO_NET_DEV(dev_mgt);
+ char unused[16];
+ ssize_t nr;
+
+ while (true) {
+ nr = read(net_dev->fd[0], &unused, sizeof(unused));
+ if (nr <= 0)
+ break;
+
+ nbl_dev_update_hw_stats(eth_dev);
+ }
+
+ return 0;
+}
+
static void nbl_dev_update_hw_stats_handler(void *param)
{
struct rte_eth_dev *eth_dev = param;
+ struct nbl_adapter *adapter = ETH_DEV_TO_NBL_DEV_PF_PRIV(eth_dev);
+ struct nbl_dev_mgt *dev_mgt = NBL_ADAPTER_TO_DEV_MGT(adapter);
+ struct nbl_dev_net_mgt *net_dev = NBL_DEV_MGT_TO_NET_DEV(dev_mgt);
+ char notify_byte = 0;
+ ssize_t nw;
- nbl_dev_update_hw_stats(eth_dev);
+ nw = write(net_dev->fd[1], ¬ify_byte, 1);
+ RTE_SET_USED(nw);
rte_eal_alarm_set(NBL_ALARM_INTERNAL, nbl_dev_update_hw_stats_handler, eth_dev);
@@ -188,4 +214,21 @@ static int nbl_dev_hw_stats_start(struct rte_eth_dev *eth_dev)
int ret;
+ ret = pipe(net_dev->fd);
+ if (ret) {
+ NBL_LOG(ERR, "hw_stats pipe failed, ret %d", ret);
+ return ret;
+ }
+
+ ret = rte_thread_create_internal_control(&net_dev->tid, "nbl_hw_stats_thread",
+ nbl_dev_thread_hw_stats_task, eth_dev);
+ if (ret) {
+ NBL_LOG(ERR, "create hw_stats thread failed, ret %d", ret);
+ close(net_dev->fd[0]);
+ close(net_dev->fd[1]);
+ net_dev->fd[0] = -1;
+ net_dev->fd[1] = -1;
+ return ret;
+ }
+
if (!common->is_vf) {
ret = disp_ops->get_ustore_total_pkt_drop_stats(NBL_DEV_MGT_TO_DISP_PRIV(dev_mgt),
@@ -262,6 +305,17 @@ static void nbl_dev_txrx_stop(struct rte_eth_dev *eth_dev)
static int nbl_dev_hw_stats_stop(struct rte_eth_dev *eth_dev)
{
+ struct nbl_adapter *adapter = ETH_DEV_TO_NBL_DEV_PF_PRIV(eth_dev);
+ struct nbl_dev_mgt *dev_mgt = NBL_ADAPTER_TO_DEV_MGT(adapter);
+ struct nbl_dev_net_mgt *net_dev = NBL_DEV_MGT_TO_NET_DEV(dev_mgt);
+
rte_eal_alarm_cancel(nbl_dev_update_hw_stats_handler, eth_dev);
+ /* closing pipe to cause hw_stats thread to exit */
+ close(net_dev->fd[0]);
+ close(net_dev->fd[1]);
+ net_dev->fd[0] = -1;
+ net_dev->fd[1] = -1;
+ rte_thread_join(net_dev->tid, NULL);
+
return 0;
}
diff --git a/drivers/net/nbl/nbl_dev/nbl_dev.h b/drivers/net/nbl/nbl_dev/nbl_dev.h
index 21d87a372d..bfe2b06deb 100644
--- a/drivers/net/nbl/nbl_dev/nbl_dev.h
+++ b/drivers/net/nbl/nbl_dev/nbl_dev.h
@@ -61,4 +61,6 @@ struct nbl_dev_net_mgt {
struct nbl_hw_stats hw_stats;
bool hw_stats_inited;
+ rte_thread_t tid;
+ int fd[2];
};
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-26 10:16:50.778269319 +0000
+++ 0095-net-nbl-fix-hardware-stats-interrupt-nesting.patch 2026-02-26 10:16:47.038459618 +0000
@@ -1 +1 @@
-From 3808404c49aa68de55c3602bac20bd496aaaaeba Mon Sep 17 00:00:00 2001
+From e1dd133babdb94237fc72c6eebdca5a216bac1b4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3808404c49aa68de55c3602bac20bd496aaaaeba ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list