<div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="background-color:transparent">On Tue, Nov 10, 2026 at 7:50 AM Luca Vizzarro <</span><a href="mailto:Luca.Vizzarro@arm.com" target="_blank" style="background-color:transparent">Luca.Vizzarro@arm.com</a><span style="background-color:transparent">> wrote:</span></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 03/11/2026 22:02, Koushik Bhargav Nimoji wrote:<br>
> diff --git a/dts/api/testbed_model/virtual_device.py b/dts/api/testbed_model/virtual_device.py<br>
> index 1a4794e695..8ac9a625f5 100644<br>
> --- a/dts/api/testbed_model/virtual_device.py<br>
> +++ b/dts/api/testbed_model/virtual_device.py<br>
> @@ -6,6 +6,8 @@<br>
> Alongside support for physical hardware, DPDK can create various virtual devices.<br>
> """<br>
> <br>
> +from api.context import get_ctx<br>
> +<br>
> <br>
> class VirtualDevice:<br>
> """Base class for virtual devices used by DPDK.<br>
> @@ -27,3 +29,9 @@ def __init__(self, name: str) -> None:<br>
> def __str__(self) -> str:<br>
> """This corresponds to the name used for DPDK devices."""<br>
> return <a href="http://self.name" rel="noreferrer" target="_blank">self.name</a><br>
> +<br>
> +<br>
> +def clean_up_vhost() -> None:<br>
> + """Deletes stale vhost-user Unix domain socket files."""<br>
> + ctx = get_ctx()<br>
> + ctx.sut_node.main_session.send_command("rm -rf /tmp/vhost-net*", privileged=True)<br>
I welcome this change but send_command is still something that should be <br>
called by the relevant OSSession class. In theory main_session can be a <br>
session for a host of any OS, be Linux, FreeBSD, Windows etc. Therefore <br>
the changes should be OS-independent.<br>
<br>
I've reviewed the usage better and the test suite shouldn't be able to <br>
arbitrarily create files out of arbitrary paths. We have the class <br>
Artifact to help abstract the remote filesystem away. On remote session <br>
this also takes care of cleanup.<br>
<br>
Instead of introducing this change which has no real ownership in the <br>
framework and api packages, I'd suggest letting the test suite create <br>
the vhost-net using the Artifact class instead.<br></blockquote><div> </div><div>After further digging, I've realized that the vhost socket files are automatically deleted when testpmd quits, I've double checked this when running DTS manually and ensured that even when I abruptly quit DTS the vhost socket files are still deleted. I will remove all clean_up_vhost() calls from my patch in the next version.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> +<br>
> +from typing import TypedDict, cast<br>
> +<br>
> +from scapy.layers.inet import IP<br>
> +from scapy.layers.l2 import Ether<br>
> +from scapy.packet import Raw<br>
> +from typing_extensions import NotRequired<br>
> +<br>
> +from api.capabilities import (<br>
> + LinkTopology,<br>
> + requires_link_topology,<br>
> +)<br>
> +from api.packet import assess_performance_by_packet<br>
> +from api.params.eal import VirtualDevice<br>
> +from api.params.types import LogicalCoreList, RSSSetting, TestPmdParamsDict<br>
> +from api.test import get_current_test_case_name, verify, write_performance_json<br>
> +from api.test_suite import BaseConfig, TestSuite, perf_suite, perf_test<br>
> +from api.testbed_model.virtual_device import clean_up_vhost<br>
> +from api.testpmd import TestPmd<br>
> +from api.testpmd.config import (<br>
> + Params,<br>
> + PortTopology,<br>
> + RXRingParams,<br>
> + SimpleForwardingModes,<br>
> + TXRingParams,<br>
> +)<br>
> +<br>
> +<br>
> +class TestParameter(TypedDict):<br>
> + """Performance test metrics."""<br>
> +<br>
> + frame_size: int<br>
> + num_descriptors: int<br>
> + expected_mpps: float<br>
> + performance_delta: NotRequired[float | None]<br>
> + measured_mpps: NotRequired[float | None]<br>
> + passing: NotRequired[float | None]<br>
I've noticed that this kind of configuration is ubiquitous across <br>
performance test suites. I'd propose to abstract the Config and this <br>
away as a generic PerfSuiteConfig and re-use it accordingly. In that <br>
case you can move away from using a TypedDict and use a Pydantic <br>
BaseConfig instead which will allow you to use more powerful constructs.<br>
<br>
You won't need to use NotRequired – which I am assuming makes doing `| <br>
None` redundant, in that case. Moreover the fields should be documented <br>
appropriately similarly to what was done in the config package.</blockquote><div><br></div><div>I agree, I will create a PerfSuiteConfig in my next version.</div><div><br></div><div>All other mentioned changes will be reflected in my next version as well, thanks!</div></div></div>
</div>