From: Patrick Robb <probb@iol.unh.edu>
To: luca.vizzarro@arm.com
Cc: dev@dpdk.org, abailey@iol.unh.edu, dmarx@iol.unh.edu,
knimoji@iol.unh.edu, Paul.Szczepanek@arm.com,
Patrick Robb <probb@iol.unh.edu>
Subject: [PATCH v1 2/2] dts: avoid dpdk resources conflict
Date: Mon, 23 Mar 2026 14:08:18 -0400 [thread overview]
Message-ID: <20260323180818.674041-3-probb@iol.unh.edu> (raw)
In-Reply-To: <20260323180818.674041-1-probb@iol.unh.edu>
When starting and stopping DPDK applications in rapid succession,
there may be a resource conflicts on ports, memory, VFIO, etc.
Even after we send "quit" to the testpmd CLI, some resource
cleanup will happen asynchronously in the background. To avoid a
resource conflict upon starting a subsequent DPDK application,
add a very brief sleep after quitting DPDK applications.
Fixes: bfad0948df75 ("dts: rework interactive shells")
Signed-off-by: Patrick Robb <probb@iol.unh.edu>
Tested-by: Patrick Robb <probb@iol.unh.edu>
---
dts/framework/remote_session/dpdk_shell.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dts/framework/remote_session/dpdk_shell.py b/dts/framework/remote_session/dpdk_shell.py
index 51b97d4ff6..7c79f33908 100644
--- a/dts/framework/remote_session/dpdk_shell.py
+++ b/dts/framework/remote_session/dpdk_shell.py
@@ -6,6 +6,7 @@
Provides a base class to create interactive shells based on DPDK.
"""
+import time
from abc import ABC, abstractmethod
from pathlib import PurePath
@@ -84,3 +85,11 @@ def _make_real_path(self) -> PurePath:
Adds the remote DPDK build directory to the path.
"""
return get_ctx().dpdk_build.remote_dpdk_build_dir.joinpath(self.path)
+
+ def close(self) -> None:
+ """Overrides :meth:`~.interactive_shell.close`."""
+ # Allow time for VFIO and hardware resources to be released by the kernel after the
+ # DPDK process exits. Without this delay, sequential testpmd instances may have EAL
+ # errors when trying to acquire the same devices.
+ time.sleep(1)
+ return super().close()
--
2.49.0
next prev parent reply other threads:[~2026-03-23 18:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 18:08 [PATCH v1 0/2] dts: dpdk shell bug fixes Patrick Robb
2026-03-23 18:08 ` [PATCH v1 1/2] dts: always use ethdev ports to check capabilities Patrick Robb
2026-03-23 19:14 ` Andrew Bailey
2026-03-23 18:08 ` Patrick Robb [this message]
2026-03-23 19:15 ` [PATCH v1 2/2] dts: avoid dpdk resources conflict Andrew Bailey
2026-03-23 19:24 ` Andrew Bailey
2026-03-23 20:20 ` [PATCH v2 0/2] dts: dpdk shell bug fixes Patrick Robb
2026-03-23 20:20 ` [PATCH v2 1/2] dts: always use ethdev ports to check capabilities Patrick Robb
2026-03-23 20:20 ` [PATCH v2 2/2] dts: avoid dpdk resources conflict Patrick Robb
2026-03-24 0:52 ` [PATCH v3 1/2] dts: always use ethdev ports to check capabilities Patrick Robb
2026-03-24 0:52 ` [PATCH v3 2/2] dts: avoid dpdk resources conflict Patrick Robb
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=20260323180818.674041-3-probb@iol.unh.edu \
--to=probb@iol.unh.edu \
--cc=Paul.Szczepanek@arm.com \
--cc=abailey@iol.unh.edu \
--cc=dev@dpdk.org \
--cc=dmarx@iol.unh.edu \
--cc=knimoji@iol.unh.edu \
--cc=luca.vizzarro@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox