DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Juraj Linkeš" <juraj.linkes@pantheon.tech>
To: Nicholas Pratte <npratte@iol.unh.edu>,
	yoan.picchi@foss.arm.com, luca.vizzarro@arm.com,
	probb@iol.unh.edu, paul.szczepanek@arm.com,
	Honnappa.Nagarahalli@arm.com, dmarx@iol.unh.edu,
	jspewock@iol.unh.edu, alex.chapman@arm.com
Cc: dev@dpdk.org
Subject: Re: [PATCH v1 2/3] dts: rework testbed_model Port objects to contain unique identifiers
Date: Tue, 10 Sep 2024 12:17:27 +0200	[thread overview]
Message-ID: <7005eea8-2e3a-46e6-8c04-19d2c3800c39@pantheon.tech> (raw)
In-Reply-To: <20240821184305.28028-4-npratte@iol.unh.edu>



On 21. 8. 2024 20:43, Nicholas Pratte wrote:
> In order to leverage the usability of unique identifiers on ports, the
> testbed_model Port object needs some refactoring/trimming of obsolete or
> needless attributes.
> 
> Bugzilla ID: 1478
> 
> Signed-off-by: Nicholas Pratte <npratte@iol.unh.edu>
> ---
>   dts/framework/testbed_model/port.py | 45 +++++++----------------------
>   1 file changed, 10 insertions(+), 35 deletions(-)
> 
> diff --git a/dts/framework/testbed_model/port.py b/dts/framework/testbed_model/port.py
> index 817405bea4..75bc38f16e 100644
> --- a/dts/framework/testbed_model/port.py
> +++ b/dts/framework/testbed_model/port.py
> @@ -14,43 +14,30 @@
>   from framework.config import PortConfig
>   
>   
> -@dataclass(slots=True, frozen=True)
> -class PortIdentifier:
> -    """The port identifier.
> -
> -    Attributes:
> -        node: The node where the port resides.
> -        pci: The PCI address of the port on `node`.
> -    """
> -
> -    node: str
> -    pci: str
> -
> -
>   @dataclass(slots=True)
>   class Port:
>       """Physical port on a node.
>   
> -    The ports are identified by the node they're on and their PCI addresses. The port on the other
> -    side of the connection is also captured here.
> +    The ports are identified using a unique, user-defined name/identifier.
>       Each port is serviced by a driver, which may be different for the operating system (`os_driver`)
>       and for DPDK (`os_driver_for_dpdk`). For some devices, they are the same, e.g.: ``mlx5_core``.
>   
>       Attributes:
> -        identifier: The PCI address of the port on a node.
> +        node_name: Node the port exists on.

This would be more accurate as "The name of the node the port exists 
on.". It's not a big deal since the type is str, but being explicit is 
better.

> +        name: User-defined unique identifier of the port.
> +        pci: The pci address assigned to the port.
>           os_driver: The operating system driver name when the operating system controls the port,
>               e.g.: ``i40e``.
>           os_driver_for_dpdk: The operating system driver name for use with DPDK, e.g.: ``vfio-pci``.
> -        peer: The identifier of a port this port is connected with.
> -            The `peer` is on a different node.
>           mac_address: The MAC address of the port.
>           logical_name: The logical name of the port. Must be discovered.
>       """
>   
> -    identifier: PortIdentifier
> +    node: str

Let's rename this to node_name. This is only used in one place in the 
framework so it's not a big change and it better reflects what the 
variable stores.


  parent reply	other threads:[~2024-09-10 10:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21 18:43 [PATCH v1 0/3] dts: rework topology definition in dts config Nicholas Pratte
2024-08-21 18:43 ` [PATCH v1 1/3] dts: rework port attributes in config module Nicholas Pratte
2024-09-04 18:18   ` Jeremy Spewock
2024-09-10 10:11   ` Juraj Linkeš
2024-08-21 18:43 ` [PATCH v1 2/3] dts: rework testbed_model Port objects to contain unique identifiers Nicholas Pratte
2024-09-04 18:18   ` Jeremy Spewock
2024-09-10 10:17   ` Juraj Linkeš [this message]
2024-08-21 18:43 ` [PATCH v1 3/3] dts: rework test suite and dts runner to include test_run configs Nicholas Pratte
2024-09-04 18:18   ` Jeremy Spewock
2024-09-10 11:05     ` Juraj Linkeš

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=7005eea8-2e3a-46e6-8c04-19d2c3800c39@pantheon.tech \
    --to=juraj.linkes@pantheon.tech \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=alex.chapman@arm.com \
    --cc=dev@dpdk.org \
    --cc=dmarx@iol.unh.edu \
    --cc=jspewock@iol.unh.edu \
    --cc=luca.vizzarro@arm.com \
    --cc=npratte@iol.unh.edu \
    --cc=paul.szczepanek@arm.com \
    --cc=probb@iol.unh.edu \
    --cc=yoan.picchi@foss.arm.com \
    /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).