[PATCH v4] dts: enable port binding on the TG

Luca Vizzarro luca.vizzarro at arm.com
Tue Sep 9 17:39:27 CEST 2025


Hi Andrew,

thank you for this, just some minor comments.

On Mon, Sep 08, 2025 at 01:36:18PM +0000, Andrew Bailey wrote:
> diff --git a/dts/framework/testbed_model/port.py b/dts/framework/testbed_model/port.py
> index fc58e2b993..8f9b5c3931 100644
> --- a/dts/framework/testbed_model/port.py
> +++ b/dts/framework/testbed_model/port.py
> @@ -126,7 +126,8 @@ def original_driver(self) -> str | None:
>      @property
>      def bound_for_dpdk(self) -> bool:
>          """Is the port bound to the driver for DPDK?"""
> -        return self.current_driver == self.config.os_driver_for_dpdk
> +        dpdk_driver = self.config.os_driver_for_dpdk
> +        return self.current_driver == dpdk_driver

unnecessary change, this can stay as it was to avoid change noise. (we
don't want to pollute the versioning as it makes it harder to navigate)

> 
>      def configure_mtu(self, mtu: int):
>          """Configure the port's MTU value.
> diff --git a/dts/framework/testbed_model/topology.py b/dts/framework/testbed_model/topology.py
> index 899ea0ad3a..370bcc3c03 100644
> --- a/dts/framework/testbed_model/topology.py
> +++ b/dts/framework/testbed_model/topology.py
> @@ -232,7 +235,14 @@ def configure_ports(
> 
>          self._bind_ports_to_drivers(node, ports, drivers)
> 
> -        ports_to_bring_up = [p for p in ports if not (p.bound_for_dpdk or p.is_link_up)]
> +        ports_to_bring_up = [
> +            p
> +            for p in ports
> +            if not (
> +                (p.bound_for_dpdk and p.config.os_driver_for_dpdk != p.config.os_driver)
> +                or p.is_link_up
> +            )
> +        ]

This is fine, it's just not particularly readable. I'd say to either add
some comments to make the logic clearer, or just make the logic clearer
(feel free to implement a `bound_for_kernel` if it can aid you).

Best,
Luca


More information about the dev mailing list