From: Stephen Hemminger <stephen@networkplumber.org>
To: Randy Tice <rtice@cisco.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH v4] eal/linux: harden uevent recv error handling
Date: Mon, 17 Aug 2026 19:15:33 -0700 [thread overview]
Message-ID: <20260817191533.5e66840c@phoenix.local> (raw)
In-Reply-To: <20260817201602.120526-1-rtice@cisco.com>
On Mon, 17 Aug 2026 16:16:02 -0400
Randy Tice <rtice@cisco.com> wrote:
> - if (ret < 0 && errno == EAGAIN)
> + if (ret < 0 &&
> + (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) {
> + /* non-blocking or interrupted */
> return;
> - else if (ret <= 0) {
> + } else if (ret < 0 && (errno == ENOBUFS)) {
> + /* non-fatal transient memory condition */
> + EAL_LOG(ERR, "unexpected error on uevent recv: %s",
> + strerror(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);
> --
Since there are multiple error conditions it reads better with single (ret < 0) if followed
by looking at errno.
PS: if you are getting ENOBUFS, the root cause is not having big enough socket receive
buffer and/or starving out the core handling control operations.
If you looks a uevent the internal state of devices is corrupted. Probably need
to figure out how to schedule some form of rescanning.
prev parent reply other threads:[~2026-08-18 2:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 20:16 [PATCH] eal/linux: harden uevent recv error handling Randy Tice
2026-08-13 22:57 ` Stephen Hemminger
2026-08-17 18:53 ` [PATCH v2] " Randy Tice
2026-08-17 19:23 ` [PATCH v3] " Randy Tice
2026-08-17 20:16 ` [PATCH v4] " Randy Tice
2026-08-18 2:15 ` Stephen Hemminger [this message]
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=20260817191533.5e66840c@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=rtice@cisco.com \
/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.