patch 'net/mlx5: check DevX disconnect/error interrupt events' has been queued to stable release 24.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Mar 19 23:01:57 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.5
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/21/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1a8fd6aef2d65935bf77a691174edc80ab5197f1
Thanks.
Luca Boccassi
---
>From 1a8fd6aef2d65935bf77a691174edc80ab5197f1 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor at redhat.com>
Date: Tue, 3 Mar 2026 18:58:18 +0000
Subject: [PATCH] net/mlx5: check DevX disconnect/error interrupt events
[ upstream commit bf0bbe03b6db90478216961fd5cfff984a8c5391 ]
A busy-loop may occur when there are disconnect/error events
such as EPOLLERR, EPOLLHUP or EPOLLRDHUP on Linux for the devx
interrupt fd.
This may happen if the interrupt fd is deleted, if the device
is unbound from mlx5_core kernel driver or if the device is
removed by the mlx5 kernel driver as part of LAG setup.
As the interrupt is not removed or condition reset, it causes
an interrupt processing busy-loop, which leads to the dpdk-intr
thread going to 100% CPU.
e.g.
epoll_wait
(6, [{events=EPOLLIN|EPOLLRDHUP, data={u32=28, u64=28}}], 8, -1) = 1
read(28, 0x7f1f5c7fc2f0, 40)
= -1 EAGAIN (Resource temporarily unavailable)
epoll_wait
(6, [{events=EPOLLIN|EPOLLRDHUP, data={u32=28, u64=28}}], 8, -1) = 1
read(28, 0x7f1f5c7fc2f0, 40)
= -1 EAGAIN (Resource temporarily unavailable)
In order to prevent a busy-loop use the eal API
rte_intr_active_events_flags() to get the interrupt events and check
for disconnect/error.
If there is a disconnect/error event, unregister the devx callback.
Bugzilla ID: 1873
Fixes: f15db67df09c ("net/mlx5: accelerate DV flow counter query")
Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
drivers/net/mlx5/linux/mlx5_ethdev_os.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 954c35ae06..49190f8101 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -857,6 +857,26 @@ mlx5_dev_interrupt_handler_devx(void *cb_arg)
sizeof(struct mlx5dv_devx_async_cmd_hdr)];
} out;
uint8_t *buf = out.buf + sizeof(out.cmd_resp);
+ uint32_t events = rte_intr_active_events_flags();
+
+ if (events & (RTE_INTR_EVENT_HUP | RTE_INTR_EVENT_RDHUP | RTE_INTR_EVENT_ERR)) {
+ /*
+ * Disconnect or Error event that cannot be cleared by reading.
+ * Unregister callback to prevent interrupt busy-looping.
+ */
+ DRV_LOG(WARNING, "disconnect or error event for mlx5 devx interrupt on fd %d"
+ " (events=0x%x)",
+ rte_intr_fd_get(sh->intr_handle_devx), events);
+
+ if (rte_intr_callback_unregister_pending(sh->intr_handle_devx,
+ mlx5_dev_interrupt_handler_devx,
+ (void *)sh, NULL) < 0) {
+ DRV_LOG(WARNING,
+ "unable to unregister mlx5 devx interrupt callback on fd %d",
+ rte_intr_fd_get(sh->intr_handle_devx));
+ }
+ return;
+ }
while (!mlx5_glue->devx_get_async_cmd_comp(sh->devx_comp,
&out.cmd_resp,
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-03-19 22:00:48.006740503 +0000
+++ 0005-net-mlx5-check-DevX-disconnect-error-interrupt-event.patch 2026-03-19 22:00:47.762359372 +0000
@@ -1 +1 @@
-From bf0bbe03b6db90478216961fd5cfff984a8c5391 Mon Sep 17 00:00:00 2001
+From 1a8fd6aef2d65935bf77a691174edc80ab5197f1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bf0bbe03b6db90478216961fd5cfff984a8c5391 ]
+
@@ -36 +37,0 @@
-Cc: stable at dpdk.org
@@ -46 +47 @@
-index 18819a4a0f..4bbc590e91 100644
+index 954c35ae06..49190f8101 100644
@@ -49 +50 @@
-@@ -859,6 +859,26 @@ mlx5_dev_interrupt_handler_devx(void *cb_arg)
+@@ -857,6 +857,26 @@ mlx5_dev_interrupt_handler_devx(void *cb_arg)
More information about the stable
mailing list