patch 'eal/linux: increase uevent socket buffer' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Oct 27 12:48:17 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/29/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/a9a384ba8e00bb5f8996329ddc4903da0d25bf02

Thanks.

Luca Boccassi

---
>From a9a384ba8e00bb5f8996329ddc4903da0d25bf02 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Wed, 19 Aug 2026 12:08:51 -0700
Subject: [PATCH] eal/linux: increase uevent socket buffer

[ upstream commit 050aadddb3fb3fb1474e0d5d38605c385c067c8d ]

The kernel netlink socket into DPDK can get overrun if DPDK
interrupt thread is not keeping up. To reduce the possibility,
increase the socket receive buffer to 4M.

Fixes: 0d0f478d0483 ("eal/linux: add uevent parse and process")

Reported-by: Randy Tice <rtice at cisco.com>
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Reviewed-by: Long Li <longli at microsoft.com>
---
 lib/eal/linux/eal_dev.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
index 5e60bb018b9..a5800fc5adf 100644
--- a/lib/eal/linux/eal_dev.c
+++ b/lib/eal/linux/eal_dev.c
@@ -31,6 +31,9 @@ static bool hotplug_handle;
 /* Listen only to messages from kernel (not libudev) */
 #define EAL_UEV_GROUP_KERNEL 1
 
+/* Large uevent buffer */
+#define EAL_UEV_MSG_RCVBUF (4 * 1024 * 1024)
+
 /*
  * spinlock for device hot-unplug failure handling. If it try to access bus or
  * device, such as handle sigbus on bus or handle memory failure for device
@@ -102,6 +105,29 @@ static int cmp_dev_name(const struct rte_device *dev,
 	return strcmp(dev->name, name);
 }
 
+/*
+ * To avoid losing uevents increase the netlink receive buffer size,
+ * and override the kernel clamp value if necessary.
+ */
+static int
+dev_uev_set_rcvbuf(int fd, int n)
+{
+	int ret, val;
+	socklen_t len = sizeof(val);
+
+	ret = setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &n, sizeof(n));
+	if (ret < 0)
+		return ret;
+
+	/* kernel may have clamped our request */
+	ret = getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len);
+	if (ret >= 0 && len == sizeof(val) && val == n * 2)
+		return 0; /* request worked */
+
+	/* try again to override kernel restriction */
+	return setsockopt(fd, SOL_SOCKET, SO_RCVBUFFORCE, &n, sizeof(n));
+}
+
 static int
 dev_uev_socket_fd_create(void)
 {
@@ -126,6 +152,9 @@ dev_uev_socket_fd_create(void)
 		goto err;
 	}
 
+	if (dev_uev_set_rcvbuf(fd, EAL_UEV_MSG_RCVBUF) < 0)
+		EAL_LOG(NOTICE, "Failed to set rcvbuf.");
+
 	if (rte_intr_fd_set(intr_handle, fd))
 		goto err;
 
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-10-27 11:43:53.903632749 +0000
+++ 0003-eal-linux-increase-uevent-socket-buffer.patch	2026-10-27 11:43:53.494058830 +0000
@@ -1 +1 @@
-From 050aadddb3fb3fb1474e0d5d38605c385c067c8d Mon Sep 17 00:00:00 2001
+From a9a384ba8e00bb5f8996329ddc4903da0d25bf02 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 050aadddb3fb3fb1474e0d5d38605c385c067c8d ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 5c22c5b16b..254026f386 100644
+index 5e60bb018b9..a5800fc5adf 100644
@@ -24 +25 @@
-@@ -32,6 +32,9 @@ static bool hotplug_handle;
+@@ -31,6 +31,9 @@ static bool hotplug_handle;
@@ -34 +35 @@
-@@ -103,6 +106,29 @@ static int cmp_dev_name(const struct rte_device *dev,
+@@ -102,6 +105,29 @@ static int cmp_dev_name(const struct rte_device *dev,
@@ -64 +65 @@
-@@ -127,6 +153,9 @@ dev_uev_socket_fd_create(void)
+@@ -126,6 +152,9 @@ dev_uev_socket_fd_create(void)


More information about the stable mailing list