From: Randy Tice <rtice@cisco.com>
To: dev@dpdk.org
Cc: Randy Tice <rtice@cisco.com>
Subject: [PATCH] eal/linux: harden uevent recv error handling
Date: Thu, 13 Aug 2026 16:16:56 -0400 [thread overview]
Message-ID: <20260813201656.65649-1-rtice@cisco.com> (raw)
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
next reply other threads:[~2026-08-13 20:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 20:16 Randy Tice [this message]
2026-08-13 22:57 ` [PATCH] eal/linux: harden uevent recv error handling Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260813201656.65649-1-rtice@cisco.com \
--to=rtice@cisco.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.