<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Sep 2, 2025 at 12:52 PM Luca Vizzarro <<a href="mailto:luca.vizzarro@arm.com">luca.vizzarro@arm.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Andrew,<br>
<br>
Thank you for clarifying. It makes more sense now.<br>
<br>
On Thu, Aug 28, 2025 at 08:37:58AM +0000, Andrew Bailey wrote:<br>
> diff --git a/dts/framework/testbed_model/port.py b/dts/framework/testbed_model/port.py<br>
> index fc58e2b993..e9ad145f97 100644<br>
> --- a/dts/framework/testbed_model/port.py<br>
> +++ b/dts/framework/testbed_model/port.py<br>
> @@ -126,7 +126,12 @@ def original_driver(self) -> str | None:<br>
>      @property<br>
>      def bound_for_dpdk(self) -> bool:<br>
>          """Is the port bound to the driver for DPDK?"""<br>
> -        return self.current_driver == self.config.os_driver_for_dpdk<br>
> +        dpdk_driver = self.config.os_driver_for_dpdk<br>
> +<br>
> +        if "TG" in <a href="http://self.node.name" rel="noreferrer" target="_blank">self.node.name</a>:<br>
> +            return self.current_driver == dpdk_driver and dpdk_driver != self.config.os_driver<br>
<br>
The `<a href="http://node.name" rel="noreferrer" target="_blank">node.name</a>` is an arbitrary name that is chosen by the user.<br>
Unfortunately this is not a reliable approach.<br>
<br>
Another issue is that this logic doesn't really make a lot of sense in<br>
the context of this property. I'd much rather have a `bound_for_kernel`<br>
property, and then fix the checks appropriately where these are called.<br></blockquote><div><br></div><div>A proposed list comprehension without actually creating the bound_for_kernel property:</div><div><br></div><div>ports_to_bring_up = [p for p in ports if (p.current_driver == port.config.os_driver and not p.is_link_up)]</div><div><br></div><div>But yes I think it makes sense to add a bound_for_kernel property.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br></blockquote><div> </div><div>As an aside, I would like to send a patch soon which changes os_driver to kernel_driver and os_driver_for_dpdk to dpdk_driver throughout the DTS codebase.</div></div></div>