Re: [PATCH v4] eal/linux: harden uevent recv error handling

Stephen Hemminger <[email protected]>
Newsgroups org.dpdk.dev
Message-ID <[email protected]>
On Mon, 17 Aug 2026 16:16:02 -0400
Randy Tice <[email protected]> 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.