From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D135B45955; Tue, 10 Sep 2024 12:17:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59B8F402AB; Tue, 10 Sep 2024 12:17:31 +0200 (CEST) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) by mails.dpdk.org (Postfix) with ESMTP id DEE36400D6 for ; Tue, 10 Sep 2024 12:17:29 +0200 (CEST) Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-5c241feb80dso12187044a12.0 for ; Tue, 10 Sep 2024 03:17:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1725963449; x=1726568249; darn=dpdk.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=aIjyHeVBGYJ5TH6nKRv19RHvJJOMzujg+lShpIaT/ls=; b=AenmrFZv9kGShifTFoqu2omlhpLJr4GUwxcOkVKhMiGDL7+nli9CLRi+b3FeyV284f FltELAV3gGQ4LI2nxfHtXKlYA+U0Tc9kRqdFxPfla56Ar6pFMnACZwYHINsXzEt975rv Uv8ervo0Wmgcth9uf3kaW4KCX6KumsurQyww0t3Twoh6r9w/of+6b3sV02yC58MOFpwp RXwhdGWKs0ensTJQZLHYsqXyGPxLs/4AB9N/6G5p/wc5c7bILud9EeCoHcy1aX6QYIuZ +mEwJ72/aR/LlO7yDooLRmHGm/afyTtaGXQzVMATbCfF+WBJQOIUIR7qG9evWyODA7/8 azew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725963449; x=1726568249; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aIjyHeVBGYJ5TH6nKRv19RHvJJOMzujg+lShpIaT/ls=; b=jM8XegVZtHN8cgcYiB3893gX92RqoHoIGaHeUWpyFICkvgTberzy0UeyvleMJqteEW lL6KuluhCJNScOfaVPiG696Xl/jYvZYTuS0PDX1kFiP/+YNIoIyva7sjUzQArHM7L0eJ S6DcbmCkChnSyJ805sOir3qRFg8Twu3sAMfWQOP7zbUdLy8cIh0wuSkIzCPEp4eBybax NiykHTk7+7U4lyFtpogwzBg3BejXyTVWmba6JtTjDvrK7CkGFL+KqJ9soObOBwogd+uu HQrST8m++/c8dGHVyeZhWMLCIuVbVpZctr1GX/CZ7hLFy2HgIZL06CSTLNxV3Uq9DGzd ljaQ== X-Gm-Message-State: AOJu0Yw1REENHQoG/pyZhz0AjhGm8kktfTPvMGMoSeYv2wVUQQ4BeWh/ AIobiSblddqmonNRERXYx4g+SvIBid8dEdwMDUzKWn0GZBjFjMiq8UsdnA9fGHw= X-Google-Smtp-Source: AGHT+IFDOBH/diWo2fL3RjnYylT7u3s7eFuxCJLsG34vqgZKbODNiMJwsDwDz+dhO5FtYY8wXmqLow== X-Received: by 2002:a17:907:9815:b0:a8d:4c83:d85d with SMTP id a640c23a62f3a-a8ffab6cbf2mr31145766b.12.1725963448982; Tue, 10 Sep 2024 03:17:28 -0700 (PDT) Received: from [10.12.0.236] (81.89.53.154.host.vnet.sk. [81.89.53.154]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25a28408sm458852466b.86.2024.09.10.03.17.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Sep 2024 03:17:28 -0700 (PDT) Message-ID: <7005eea8-2e3a-46e6-8c04-19d2c3800c39@pantheon.tech> Date: Tue, 10 Sep 2024 12:17:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 2/3] dts: rework testbed_model Port objects to contain unique identifiers To: Nicholas Pratte , 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 References: <20240821184305.28028-2-npratte@iol.unh.edu> <20240821184305.28028-4-npratte@iol.unh.edu> Content-Language: en-US From: =?UTF-8?Q?Juraj_Linke=C5=A1?= In-Reply-To: <20240821184305.28028-4-npratte@iol.unh.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 > --- > 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.