<div dir="ltr"><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> diff --git a/dts/framework/testbed_model/linux_session.py b/dts/framework/testbed_model/linux_session.py<br>
> index 8cc0d09d01..b5cc0a78a9 100644<br>
> --- a/dts/framework/testbed_model/linux_session.py<br>
> +++ b/dts/framework/testbed_model/linux_session.py<br>
> @@ -460,3 +460,7 @@ def configure_ipv4_forwarding(self, enable: bool) -> None:<br>
>           """Overrides :meth:`~.os_session.OSSession.configure_ipv4_forwarding`."""<br>
>           state = 1 if enable else 0<br>
>           self.send_command(f"sysctl -w net.ipv4.ip_forward={state}", privileged=True)<br>
> +<br>
> +    def clean_up_vhost(self) -> None:<br>
> +        """Overrides :meth:`~.os_session.OSSession.clean_up_vhost`."""<br>
> +        self.send_command("rm -rf /tmp/vhost-net*", privileged=True)<br>
<br>
I am not particularly pleased with the idea of deleting every <br>
vhost-net*, just thinking in case this would disrupt any other <br>
application. Would there be any better way of doing this?<br>
<br></blockquote><div><br></div><div>The command should not interfere with other vhost-net files, as I point specifically at the /tmp/vhost-net directory when creating the socket files for the virtual devices in this specific testsuite. This was also the command specified in the <span style="background-color:transparent">pvp_multi_paths_vhost_single_core_perf test plan, so I believe it wouldn't affect other virtual devices.</span></div><div><span style="background-color:transparent"><br></span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> +    def _create_and_transmit(<br>
> +        self,<br>
> +        ring_format: int,<br>
> +        in_order: int,<br>
> +        buffers: int,<br>
> +        vectorized: int,<br>
> +        extra_args: TestPmdParamsDict,<br>
> +    ) -> None:<br>
> +        """Create testpmd instances with specified params and send traffic.<br>
> +<br>
> +        Args:<br>
> +            ring_format: selects the virtio queue descriptor layout.<br>
> +            in_order: toggles in-order packet processing.<br>
> +            buffers: enables mergeable rx buffers.<br>
> +            vectorized: enables SIMD vectorized rx/tx data paths.<br>
> +            extra_args: extra/generic TestPmd arguments.<br>
> +        """<br>
> +        sut_dpdk_driver = self._ctx.sut_node.config.ports[0].os_driver_for_dpdk<br>
> +        vhost_user_vdev = VirtualDevice("net_vhost0,iface=/tmp/vhost-net,queues=1")<br>
> +        virtio_user_vdev = VirtualDevice(<br>
> +            "net_virtio_user0,"<br>
> +            "mac=00:11:22:33:44:10,"<br>
> +            "path=/tmp/vhost-net,"<br>
> +            "queues=1,"<br>
> +            f"packed_vq={ring_format},"<br>
> +            f"mrg_rxbuf={buffers},"<br>
> +            f"in_order={in_order},"<br>
> +            f"vectorized={vectorized}"<br>
> +        )<br>
> +<br>
> +        for params in self.test_parameters:<br>
> +            frame_size = params["frame_size"]<br>
> +            num_descriptors = params["num_descriptors"]<br>
> +<br>
> +            default_args: TestPmdParamsDict = {<br>
> +                "tx_ring": TXRingParams(descriptors=int(num_descriptors)),<br>
> +                "rx_ring": RXRingParams(descriptors=int(num_descriptors)),<br>
> +            }<br>
> +<br>
> +            if sut_dpdk_driver == "mlx5_core":<br>
> +                default_args["burst"] = 64<br>
> +                default_args["mbcache"] = 512<br>
> +            elif sut_dpdk_driver == "i40e":<br>
> +                default_args["rx_queues"] = 1<br>
> +                default_args["tx_queues"] = 1<br>
<br>
This could be a problematic bit as we tried our best in the past to make <br>
test suites as driver-agnostic as possible. Would these undermine that <br>
ability? Perhaps a comment is needed here.<br></blockquote><div><br></div><div>I copied this over from the single_core_forward_perf testsuite, as it was necessary to meet the performance baseline across different drivers. The default burst size for testpmd is 32, but Mellanox NICs typically require burst sizes of 64 and an optimized mbuf cache of 512 as the Mellanox NIC capabilities are higher than the other NICs. Additionally, Intel NICs require rx_queues and tx_queues to be manually set to 1 to ensure hardware does not distribute traffic over multiple queues, which would cause degraded performance.</div><div><br></div><div>As for the other changes mentioned, I will have those in my next version as well. Thanks!</div><div><br></div><div> </div></div></div>