DPDK patches and discussions
 help / color / mirror / Atom feed
From: Luca Vizzarro <luca.vizzarro@arm.com>
To: Andrew Bailey <abailey@iol.unh.edu>
Cc: dev@dpdk.org, dmarx@iol.unh.edu, probb@iol.unh.edu
Subject: Re: [PATCH v3] dts: enable port binding on the TG
Date: Tue, 2 Sep 2025 17:52:33 +0100	[thread overview]
Message-ID: <175683053809.93271.2049800112988455963.luca.vizzarro@arm.com> (raw)
In-Reply-To: <20250828123758.20451-1-abailey@iol.unh.edu>

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.

From my understanding of the commit body this is due to the condition in
the list comprehension in ports_to_bring_up not covering this corner
case. If this is right, then this condition should be updated
accordingly.

> +
> +        return self.current_driver == dpdk_driver
>  
>      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..b35a519719 100644
> --- a/dts/framework/testbed_model/topology.py
> +++ b/dts/framework/testbed_model/topology.py
> @@ -250,6 +253,41 @@ def _bind_ports_to_drivers(
> <snip>
> +        ctx = get_ctx()
> +        prepare_node(ctx.tg_node)
> +        prepare_node(ctx.sut_node)
> +        # ctx.tg_node.main_session.bring_up_link(self.sut_ports)

Like Patrick said, this should be removed.

  parent reply	other threads:[~2025-09-02 16:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-08 18:21 [PATCH 1/2] dts: introduce abstract class for TG and SUT DPDK runtime environments Andrew Bailey
2025-08-08 18:21 ` [PATCH 2/2] dts: enable port binding on the TG Andrew Bailey
2025-08-28 12:37   ` [PATCH v3] " Andrew Bailey
2025-08-28 12:50     ` Luca Vizzarro
2025-08-28 15:17       ` Andrew Bailey
2025-08-28 12:54     ` Patrick Robb
2025-09-02 16:52     ` Luca Vizzarro [this message]
2025-08-11 11:17 ` [PATCH 1/2] dts: introduce abstract class for TG and SUT DPDK runtime environments Luca Vizzarro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=175683053809.93271.2049800112988455963.luca.vizzarro@arm.com \
    --to=luca.vizzarro@arm.com \
    --cc=abailey@iol.unh.edu \
    --cc=dev@dpdk.org \
    --cc=dmarx@iol.unh.edu \
    --cc=probb@iol.unh.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).