On Tue, Sep 2, 2025 at 12:52 PM Luca Vizzarro <luca.vizza...@arm.com> wrote:

> Hi Andrew,
>
> Thank you for clarifying. It makes more sense now.
>
> On Thu, Aug 28, 2025 at 08:37:58AM +0000, Andrew Bailey wrote:
> > diff --git a/dts/framework/testbed_model/port.py
> b/dts/framework/testbed_model/port.py
> > index fc58e2b993..e9ad145f97 100644
> > --- a/dts/framework/testbed_model/port.py
> > +++ b/dts/framework/testbed_model/port.py
> > @@ -126,7 +126,12 @@ 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
> > +
> > +        if "TG" in self.node.name:
> > +            return self.current_driver == dpdk_driver and dpdk_driver
> != self.config.os_driver
>
> The `node.name` is an arbitrary name that is chosen by the user.
> Unfortunately this is not a reliable approach.
>
> Another issue is that this logic doesn't really make a lot of sense in
> the context of this property. I'd much rather have a `bound_for_kernel`
> property, and then fix the checks appropriately where these are called.
>

A proposed list comprehension without actually creating the
bound_for_kernel property:

ports_to_bring_up = [p for p in ports if (p.current_driver ==
port.config.os_driver and not p.is_link_up)]

But yes I think it makes sense to add a bound_for_kernel property.


>
>
>
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.

Reply via email to