[PATCH v4 0/9] net/memif: lifecycle fixes and unit test
Stephen Hemminger
stephen at networkplumber.org
Sat Oct 17 23:17:24 CEST 2026
On Fri, 16 Oct 2026 21:58:48 +0200
Sriram Yagnaraman <sriram.yagnaraman at ericsson.com> wrote:
> This series fixes a set of error-path and lifecycle bugs in the memif
> PMD and adds a unit test for the driver.
>
> The first eight patches are fixes:
>
> - guard eth_memif_tx() against an empty burst (nb_pkts == 0);
> - close file descriptor 0 instead of leaking it;
> - do not close the EAL-owned memseg fd in zero-copy mode;
> - free the MAC address allocated during probe on failure;
> - unwind a partially-created device on create failure;
> - refuse connections on a stopped server so it does not come up on a
> stopped port;
> - disconnect on close so a stopped server's control channel is not
> leaked, and make memif_disconnect() safe on a never-started device;
> - fix eth_memif_tx_zc() returning 65535 on an invalid interrupt fd.
>
> The last patch adds a memif PMD unit test (app/test, memif_pmd_autotest):
> a server/client vdev pair over a loopback socket covering dev_info, link
> state, stats, single-segment loopback (slow and fast path), multi-segment
> loopback across a ring wrap, stop/start reconnect, empty Tx burst, close
> without stop, and a stopped server refusing a peer.
>
> Verified: memif_pmd_autotest passes 11/11 (~1.4s); devtools/test-memif.sh
> two-process forwarding OK; each commit builds with -Dwerror=true;
> check-git-log and checkpatch are clean.
>
> Thanks to Stephen Hemminger and the ai-code-review bot for the reviews
> that shaped this series.
Applied to next-net.
More information about the dev
mailing list