From: Dean Marx <dmarx@iol.unh.edu>
To: patrickrobb1997@gmail.com, luca.vizzarro@arm.com,
yoan.picchi@foss.arm.com, Honnappa.Nagarahalli@arm.com,
paul.szczepanek@arm.com
Cc: dev@dpdk.org, Dean Marx <dmarx@iol.unh.edu>
Subject: [PATCH v1 4/8] dts: move utils from framework to API
Date: Thu, 23 Apr 2026 13:03:16 -0400 [thread overview]
Message-ID: <20260423170331.33193-5-dmarx@iol.unh.edu> (raw)
In-Reply-To: <20260423170331.33193-1-dmarx@iol.unh.edu>
The utils module is used to generate a set of random
packets in certain test suites. Move this to the API.
Signed-off-by: Dean Marx <dmarx@iol.unh.edu>
---
dts/api/cryptodev/config.py | 2 +-
dts/api/packet.py | 2 +-
dts/api/test_suite.py | 2 +-
dts/api/testpmd/config.py | 2 +-
dts/api/testpmd/types.py | 2 +-
dts/{framework => api}/utils.py | 0
dts/framework/config/node.py | 2 +-
dts/framework/config/test_run.py | 2 +-
dts/framework/remote_session/dpdk.py | 2 +-
dts/tests/TestSuite_l2fwd.py | 2 +-
| 2 +-
dts/tests/TestSuite_smoke_tests.py | 2 +-
dts/tests/TestSuite_softnic.py | 2 +-
13 files changed, 12 insertions(+), 12 deletions(-)
rename dts/{framework => api}/utils.py (100%)
diff --git a/dts/api/cryptodev/config.py b/dts/api/cryptodev/config.py
index 69ff7aa59a..a88e70d45c 100644
--- a/dts/api/cryptodev/config.py
+++ b/dts/api/cryptodev/config.py
@@ -6,9 +6,9 @@
from enum import auto
from typing import Literal
+from api.utils import StrEnum
from framework.params import Params, Switch
from framework.params.eal import EalParams
-from framework.utils import StrEnum
Silent = Literal[""]
diff --git a/dts/api/packet.py b/dts/api/packet.py
index 2bf31aa753..2be00ad48a 100644
--- a/dts/api/packet.py
+++ b/dts/api/packet.py
@@ -35,8 +35,8 @@
from api.testbed_model.traffic_generator.performance_traffic_generator import (
PerformanceTrafficStats,
)
+from api.utils import get_packet_summaries
from framework.context import get_ctx
-from framework.utils import get_packet_summaries
def send_packet_and_capture(
diff --git a/dts/api/test_suite.py b/dts/api/test_suite.py
index be13485f9b..7feb35a9f8 100644
--- a/dts/api/test_suite.py
+++ b/dts/api/test_suite.py
@@ -32,9 +32,9 @@
from api.exception import ConfigurationError, InternalError
from api.testbed_model.capability import TestProtocol
from api.testbed_model.topology import Topology
+from api.utils import to_pascal_case
from framework.config.common import FrozenModel
from framework.logger import DTSLogger, get_dts_logger
-from framework.utils import to_pascal_case
if TYPE_CHECKING:
from framework.context import Context
diff --git a/dts/api/testpmd/config.py b/dts/api/testpmd/config.py
index e71a3e1ef0..8b688834ee 100644
--- a/dts/api/testpmd/config.py
+++ b/dts/api/testpmd/config.py
@@ -13,6 +13,7 @@
from pathlib import PurePath
from typing import Literal, NamedTuple
+from api.utils import StrEnum
from framework.params import (
Params,
Switch,
@@ -24,7 +25,6 @@
str_from_flag_value,
)
from framework.params.eal import EalParams
-from framework.utils import StrEnum
class PortTopology(StrEnum):
diff --git a/dts/api/testpmd/types.py b/dts/api/testpmd/types.py
index 0d322aece2..5c847b4bd6 100644
--- a/dts/api/testpmd/types.py
+++ b/dts/api/testpmd/types.py
@@ -15,8 +15,8 @@
from typing_extensions import Self
+from api.utils import REGEX_FOR_MAC_ADDRESS, StrEnum
from framework.parser import ParserFn, TextParser
-from framework.utils import REGEX_FOR_MAC_ADDRESS, StrEnum
RxTxLiteralSwitch = Literal["rx", "tx"]
diff --git a/dts/framework/utils.py b/dts/api/utils.py
similarity index 100%
rename from dts/framework/utils.py
rename to dts/api/utils.py
diff --git a/dts/framework/config/node.py b/dts/framework/config/node.py
index 63062a31b5..d7122d13d8 100644
--- a/dts/framework/config/node.py
+++ b/dts/framework/config/node.py
@@ -14,7 +14,7 @@
from pydantic import Field, model_validator
from typing_extensions import Self
-from framework.utils import REGEX_FOR_IDENTIFIER, REGEX_FOR_PCI_ADDRESS, StrEnum
+from api.utils import REGEX_FOR_IDENTIFIER, REGEX_FOR_PCI_ADDRESS, StrEnum
from .common import FrozenModel
diff --git a/dts/framework/config/test_run.py b/dts/framework/config/test_run.py
index 1b051fbadf..10901c740d 100644
--- a/dts/framework/config/test_run.py
+++ b/dts/framework/config/test_run.py
@@ -28,7 +28,7 @@
from typing_extensions import TYPE_CHECKING, Self
from api.exception import InternalError
-from framework.utils import REGEX_FOR_PORT_LINK, StrEnum
+from api.utils import REGEX_FOR_PORT_LINK, StrEnum
from .common import FrozenModel, load_fields_from_settings
diff --git a/dts/framework/remote_session/dpdk.py b/dts/framework/remote_session/dpdk.py
index 91173e0796..1a4fec8ec9 100644
--- a/dts/framework/remote_session/dpdk.py
+++ b/dts/framework/remote_session/dpdk.py
@@ -18,6 +18,7 @@
from api.testbed_model.node import Node
from api.testbed_model.os_session import OSSession
from api.testbed_model.virtual_device import VirtualDevice
+from api.utils import MesonArgs, TarCompressionFormat
from framework.config.test_run import (
DPDKBuildConfiguration,
DPDKBuildOptionsConfiguration,
@@ -33,7 +34,6 @@
from framework.logger import DTSLogger, get_dts_logger
from framework.params.eal import EalParams
from framework.remote_session.remote_session import CommandResult
-from framework.utils import MesonArgs, TarCompressionFormat
@dataclass(slots=True, frozen=True)
diff --git a/dts/tests/TestSuite_l2fwd.py b/dts/tests/TestSuite_l2fwd.py
index 63f771d594..0b0b7bc931 100644
--- a/dts/tests/TestSuite_l2fwd.py
+++ b/dts/tests/TestSuite_l2fwd.py
@@ -22,8 +22,8 @@
from api.testbed_model.cpu import LogicalCoreCount
from api.testpmd import TestPmd
from api.testpmd.config import EthPeer, SimpleForwardingModes
+from api.utils import generate_random_packets
from framework.context import filter_cores
-from framework.utils import generate_random_packets
@requires_nic_capability(NicCapability.PHYSICAL_FUNCTION)
--git a/dts/tests/TestSuite_pmd_rss.py b/dts/tests/TestSuite_pmd_rss.py
index dae90ee2d5..162e08ccbc 100644
--- a/dts/tests/TestSuite_pmd_rss.py
+++ b/dts/tests/TestSuite_pmd_rss.py
@@ -31,7 +31,7 @@
RSSOffloadTypesFlag,
TestPmdVerbosePacket,
)
-from framework.utils import StrEnum
+from api.utils import StrEnum
class Config(BaseConfig):
diff --git a/dts/tests/TestSuite_smoke_tests.py b/dts/tests/TestSuite_smoke_tests.py
index 157dec7585..b3eb325fc0 100644
--- a/dts/tests/TestSuite_smoke_tests.py
+++ b/dts/tests/TestSuite_smoke_tests.py
@@ -22,9 +22,9 @@
from api.test_suite import TestSuite, func_test
from api.testbed_model.linux_session import LinuxSession
from api.testpmd import TestPmd
+from api.utils import REGEX_FOR_PCI_ADDRESS
from framework.config.node import PortConfig
from framework.settings import SETTINGS
-from framework.utils import REGEX_FOR_PCI_ADDRESS
@requires_link_topology(LinkTopology.NO_LINK)
diff --git a/dts/tests/TestSuite_softnic.py b/dts/tests/TestSuite_softnic.py
index 0696933053..05a6d3aa18 100644
--- a/dts/tests/TestSuite_softnic.py
+++ b/dts/tests/TestSuite_softnic.py
@@ -22,7 +22,7 @@
from api.testbed_model.virtual_device import VirtualDevice
from api.testpmd import TestPmd
from api.testpmd.config import EthPeer
-from framework.utils import generate_random_packets
+from api.utils import generate_random_packets
@requires_nic_capability(NicCapability.PHYSICAL_FUNCTION)
--
2.52.0
next prev parent reply other threads:[~2026-04-23 17:04 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 15:53 [PATCH v1 0/4] dts: add dynamic queue configuration test suite jspewock
2024-06-25 15:53 ` [PATCH v1 1/4] dts: add send_packets to test suites and rework packet addressing jspewock
2024-06-25 15:53 ` [PATCH v1 2/4] dts: add port queue modification and forwarding stats to testpmd jspewock
2024-06-25 15:53 ` [PATCH v1 3/4] dts: add dynamic queue test suite jspewock
2024-06-25 15:53 ` [PATCH v1 4/4] dts: add dynamic queue conf to the yaml schema jspewock
2024-07-03 21:58 ` [PATCH v2 0/4] dts: add dynamic queue configuration test suite jspewock
2024-07-03 21:58 ` [PATCH v2 1/4] dts: add send_packets to test suites and rework packet addressing jspewock
2024-07-03 21:58 ` [PATCH v2 2/4] dts: add port queue modification and forwarding stats to testpmd jspewock
2024-07-03 21:58 ` [PATCH v2 3/4] dts: add dynamic queue test suite jspewock
2024-07-03 21:58 ` [PATCH v2 4/4] dts: add dynamic queue conf to the yaml schema jspewock
2024-07-24 15:07 ` [PATCH v3 0/4] dts: add dynamic queue configuration test suite jspewock
2024-07-24 15:07 ` [PATCH v3 1/4] dts: add send_packets to test suites and rework packet addressing jspewock
2024-07-26 14:37 ` Nicholas Pratte
2024-07-26 19:00 ` Nicholas Pratte
2024-07-26 19:13 ` Jeremy Spewock
2024-08-29 19:42 ` Nicholas Pratte
2024-07-24 15:07 ` [PATCH v3 2/4] dts: add port queue modification and forwarding stats to testpmd jspewock
2024-07-24 15:07 ` [PATCH v3 3/4] dts: add dynamic queue test suite jspewock
2024-07-24 15:07 ` [PATCH v3 4/4] dts: add dynamic queue conf to the yaml schema jspewock
2024-09-04 15:49 ` [PATCH v4 0/2] dts: add dynamic queue configuration test suite jspewock
2024-09-04 15:49 ` [PATCH v4 1/2] dts: add port queue modification and forwarding stats to testpmd jspewock
2024-09-04 15:49 ` [PATCH v4 2/2] dts: add dynamic queue test suite jspewock
2024-09-25 19:20 ` [PATCH v5 0/2] dts: add dynamic queue configuration " jspewock
2024-09-25 19:20 ` [PATCH v5 1/2] dts: add port queue modification and forwarding stats to testpmd jspewock
2024-09-25 19:20 ` [PATCH v5 2/2] dts: add dynamic queue test suite jspewock
2024-11-05 16:58 ` [PATCH v6 0/2] dts: add dynamic queue configuration " Dean Marx
2024-11-05 16:58 ` [PATCH v6 1/2] dts: add port queue modification and forwarding stats to testpmd Dean Marx
2024-11-18 23:25 ` Patrick Robb
2024-11-18 23:36 ` Patrick Robb
2024-11-05 16:58 ` [PATCH v6 2/2] dts: add dynamic queue test suite Dean Marx
2024-11-18 23:24 ` Patrick Robb
2024-11-18 23:24 ` Patrick Robb
2026-04-23 17:03 ` [PATCH v1 0/8] dts: move test suite imports from framework to API Dean Marx
2026-04-23 17:03 ` [PATCH v1 1/8] dts: move test suite module " Dean Marx
2026-04-23 17:03 ` [PATCH v1 2/8] dts: move testbed model " Dean Marx
2026-04-23 17:03 ` [PATCH v1 3/8] dts: move exception module " Dean Marx
2026-04-23 17:03 ` Dean Marx [this message]
2026-04-23 17:03 ` [PATCH v1 5/8] dts: move context " Dean Marx
2026-04-23 17:03 ` [PATCH v1 6/8] dts: move params directory " Dean Marx
2026-04-23 17:03 ` [PATCH v1 7/8] dts: separate Linux session into interface and logic Dean Marx
2026-04-23 17:03 ` [PATCH v1 8/8] dts: update API rst files for doc build Dean Marx
2026-04-23 19:04 ` [PATCH v2 0/7] dts: move test suite imports from framework to API Dean Marx
2026-04-23 19:04 ` [PATCH v2 1/7] dts: move test suite module " Dean Marx
2026-04-23 19:04 ` [PATCH v2 2/7] dts: move testbed model " Dean Marx
2026-04-23 19:04 ` [PATCH v2 3/7] dts: move exception module " Dean Marx
2026-04-23 19:04 ` [PATCH v2 4/7] dts: move utils " Dean Marx
2026-04-23 19:04 ` [PATCH v2 5/7] dts: move context " Dean Marx
2026-04-23 19:04 ` [PATCH v2 6/7] dts: move params directory " Dean Marx
2026-04-23 19:04 ` [PATCH v2 7/7] dts: separate Linux session into interface and logic Dean Marx
2026-04-24 17:01 ` [PATCH v3 0/7] dts: move test suite imports from framework to API Dean Marx
2026-04-24 17:01 ` [PATCH v3 1/7] dts: move exception module " Dean Marx
2026-04-24 17:01 ` [PATCH v3 2/7] dts: move utils " Dean Marx
2026-04-24 17:01 ` [PATCH v3 3/7] dts: move context " Dean Marx
2026-04-24 17:01 ` [PATCH v3 4/7] dts: move testbed model " Dean Marx
2026-04-24 17:01 ` [PATCH v3 5/7] dts: move test suite module " Dean Marx
2026-04-24 17:01 ` [PATCH v3 6/7] dts: move params directory " Dean Marx
2026-04-24 17:01 ` [PATCH v3 7/7] dts: separate Linux session into interface and logic Dean Marx
2026-04-28 18:08 ` [PATCH v4 0/7] dts: move test suite imports from framework to API Dean Marx
2026-04-28 18:08 ` [PATCH v4 1/7] dts: move exception module " Dean Marx
2026-04-28 18:08 ` [PATCH v4 2/7] dts: move utils " Dean Marx
2026-04-28 18:08 ` [PATCH v4 3/7] dts: move context " Dean Marx
2026-04-28 18:08 ` [PATCH v4 4/7] dts: move testbed model " Dean Marx
2026-04-28 18:08 ` [PATCH v4 5/7] dts: move test suite module " Dean Marx
2026-04-28 18:08 ` [PATCH v4 6/7] dts: move params directory " Dean Marx
2026-04-28 18:08 ` [PATCH v4 7/7] dts: separate Linux session into interface and logic Dean Marx
2026-04-30 21:09 ` [PATCH v4 0/7] dts: move test suite imports from framework to API Dean Marx
2026-04-30 21:09 ` [PATCH v4 1/7] dts: move exception module " Dean Marx
2026-04-30 21:09 ` [PATCH v4 2/7] dts: move utils " Dean Marx
2026-04-30 21:09 ` [PATCH v4 3/7] dts: move context " Dean Marx
2026-04-30 21:09 ` [PATCH v4 4/7] dts: move testbed model " Dean Marx
2026-04-30 21:09 ` [PATCH v4 5/7] dts: move test suite module " Dean Marx
2026-04-30 21:09 ` [PATCH v4 6/7] dts: move params directory " Dean Marx
2026-04-30 21:09 ` [PATCH v4 7/7] dts: separate Linux session into interface and logic Dean Marx
2026-04-30 22:06 ` [PATCH v4 0/7] dts: move test suite imports from framework to API Dean Marx
2026-04-30 22:06 ` [PATCH v4 1/7] dts: move exception module " Dean Marx
2026-04-30 22:06 ` [PATCH v4 2/7] dts: move utils " Dean Marx
2026-04-30 22:06 ` [PATCH v4 3/7] dts: move context " Dean Marx
2026-04-30 22:06 ` [PATCH v4 4/7] dts: move testbed model " Dean Marx
2026-04-30 22:06 ` [PATCH v4 5/7] dts: move test suite module " Dean Marx
2026-04-30 22:06 ` [PATCH v4 6/7] dts: move params directory " Dean Marx
2026-04-30 22:06 ` [PATCH v4 7/7] dts: separate Linux session into interface and logic Dean Marx
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=20260423170331.33193-5-dmarx@iol.unh.edu \
--to=dmarx@iol.unh.edu \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=dev@dpdk.org \
--cc=luca.vizzarro@arm.com \
--cc=patrickrobb1997@gmail.com \
--cc=paul.szczepanek@arm.com \
--cc=yoan.picchi@foss.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