DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] net/memif: lifecycle fixes and unit test
@ 2026-10-14  9:12 Sriram Yagnaraman
  2026-10-14  9:12 ` [PATCH 1/6] net/memif: guard against empty Tx burst Sriram Yagnaraman
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Sriram Yagnaraman @ 2026-10-14  9:12 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger, Sriram Yagnaraman, Jakub Grajciar, stable

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 five patches are fixes:

 - guard eth_memif_tx() against an empty burst so a zero-count call
   returns before touching the burst or the ring;
 - close file descriptor 0 instead of leaking it (the close path
   tested for fd > 0 instead of fd >= 0);
 - free the MAC address allocated during probe when a later step
   fails, instead of leaking it;
 - unwind a partially-created device on failure in memif_create(),
   releasing the port and the process-private data rather than
   returning with them registered and leaked;
 - disconnect the device on close so queues and shared regions are
   torn down, and make memif_disconnect() safe to call on a device
   that was configured but never started.

The last patch adds a memif PMD unit test (app/test, memif_pmd_autotest)
that stands up a server/client vdev pair over a loopback socket and
covers dev_info, link state, stats, single- and multi-segment loopback,
stop/start reconnect, empty Tx burst, and close without stop.

Verified: memif_pmd_autotest passes 9/9; check-git-log and checkpatch
are clean across the series.

Sriram Yagnaraman (6):
  net/memif: guard against empty Tx burst
  net/memif: close file descriptor zero
  net/memif: fix MAC address leak on probe failure
  net/memif: unwind partial device on create failure
  net/memif: disconnect on device close
  test/memif: add memif PMD unit test

 app/test/meson.build              |   1 +
 app/test/test_pmd_memif.c         | 574 ++++++++++++++++++++++++++++++
 drivers/net/memif/memif_socket.c  |  14 +-
 drivers/net/memif/rte_eth_memif.c |  59 ++-
 4 files changed, 626 insertions(+), 22 deletions(-)
 create mode 100644 app/test/test_pmd_memif.c

-- 
2.43.7


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-10-15  3:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14  9:12 [PATCH 0/6] net/memif: lifecycle fixes and unit test Sriram Yagnaraman
2026-10-14  9:12 ` [PATCH 1/6] net/memif: guard against empty Tx burst Sriram Yagnaraman
2026-10-14 15:07   ` Stephen Hemminger
2026-10-14  9:12 ` [PATCH 2/6] net/memif: close file descriptor zero Sriram Yagnaraman
2026-10-14  9:12 ` [PATCH 3/6] net/memif: fix MAC address leak on probe failure Sriram Yagnaraman
2026-10-14  9:12 ` [PATCH 4/6] net/memif: unwind partial device on create failure Sriram Yagnaraman
2026-10-14  9:12 ` [PATCH 5/6] net/memif: disconnect on device close Sriram Yagnaraman
2026-10-14  9:12 ` [PATCH 6/6] test/memif: add memif PMD unit test Sriram Yagnaraman
2026-10-15  3:09 ` [PATCH 0/6] net/memif: lifecycle fixes and " Stephen Hemminger

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