DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] eal/linux: harden uevent recv error handling
@ 2026-08-13 20:16 Randy Tice
  0 siblings, 0 replies; only message in thread
From: Randy Tice @ 2026-08-13 20:16 UTC (permalink / raw)
  To: dev; +Cc: Randy Tice

The Linux uevent handler is harded for non-blocking receive behavior

Signed-off-by: Randy Tice <rtice@cisco.com>
---
 lib/eal/linux/eal_dev.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
index ec408649d0..29a889800a 100644
--- a/lib/eal/linux/eal_dev.c
+++ b/lib/eal/linux/eal_dev.c
@@ -241,9 +241,14 @@ dev_uev_handler(__rte_unused void *param)
 
 	ret = recv(rte_intr_fd_get(intr_handle), buf, EAL_UEV_MSG_LEN,
 		   MSG_DONTWAIT);
-	if (ret < 0 && errno == EAGAIN)
+	if (ret < 0 &&
+		(errno == EAGAIN || errno == EWOULDBLOCK))
 		return;
-	else if (ret <= 0) {
+	else if (ret < 0 &&
+		 (errno == ENOBUFS || errno == ENOMEM)) {
+		EAL_LOG(ERR, "unexpected error on uvent recv: %d", errno);
+		return;
+	} else if (ret <= 0) {
 		/* connection is closed or broken, can not up again. */
 		EAL_LOG(ERR, "uevent socket connection is broken.");
 		rte_eal_alarm_set(1, dev_delayed_unregister, NULL);
-- 
2.51.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-13 20:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-13 20:16 [PATCH] eal/linux: harden uevent recv error handling Randy Tice

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox