Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/134801/?format=api
http://patchwork.dpdk.org/api/patches/134801/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231204102429.106709-14-juraj.linkes@pantheon.tech/", "project": { "id": 1, "url": "http://patchwork.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20231204102429.106709-14-juraj.linkes@pantheon.tech>", "list_archive_url": "https://inbox.dpdk.org/dev/20231204102429.106709-14-juraj.linkes@pantheon.tech", "date": "2023-12-04T10:24:21", "name": "[v9,13/21] dts: port and virtual device docstring update", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "92778512f5d07efbebbe71ec4787ced25f04b9a1", "submitter": { "id": 1626, "url": "http://patchwork.dpdk.org/api/people/1626/?format=api", "name": "Juraj Linkeš", "email": "juraj.linkes@pantheon.tech" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20231204102429.106709-14-juraj.linkes@pantheon.tech/mbox/", "series": [ { "id": 30441, "url": "http://patchwork.dpdk.org/api/series/30441/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30441", "date": "2023-12-04T10:24:08", "name": "dts: docstrings update", "version": 9, "mbox": "http://patchwork.dpdk.org/series/30441/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/134801/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/134801/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 233CA4366A;\n\tMon, 4 Dec 2023 11:26:14 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B2A6342831;\n\tMon, 4 Dec 2023 11:24:50 +0100 (CET)", "from mail-wm1-f47.google.com (mail-wm1-f47.google.com\n [209.85.128.47]) by mails.dpdk.org (Postfix) with ESMTP id CC39641144\n for <dev@dpdk.org>; Mon, 4 Dec 2023 11:24:44 +0100 (CET)", "by mail-wm1-f47.google.com with SMTP id\n 5b1f17b1804b1-40c09fcfa9fso10723505e9.2\n for <dev@dpdk.org>; Mon, 04 Dec 2023 02:24:44 -0800 (PST)", "from jlinkes-PT-Latitude-5530.pantheon.local ([81.89.53.154])\n by smtp.gmail.com with ESMTPSA id\n m28-20020a05600c3b1c00b0040b2b38a1fasm14255415wms.4.2023.12.04.02.24.43\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 04 Dec 2023 02:24:44 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=pantheon.tech; s=google; t=1701685484; x=1702290284; darn=dpdk.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=kLCM/2aeBwtLd6yTf6evW5OSTnsSROs8IoIoBeLdShI=;\n b=Mu4nTgMEnvLyqyN0vViWOn+hGCKXE+XqRvpd0gaGJ7ZJSrjGgt3Mo/DZTI1nOq5Qu4\n JQ0L9l0u66lX741hdV3JgRs/MA83UAsHygkhOch9G9UCjIW9KuZ5y8ZJN+XwGVDQzBQA\n ZyfBkyscACeO2rneqQ4oi/6D7Tkw+FQ9cLJpbAgZl78RsrZFC6D5iUXU5KRVJt0UmgS6\n E2YFHEtGa9m59FINMA2qKchuKcYwlKWyaO+s2SNT8nsLvrhstUYtbgAoD218sEXRnS5H\n L9HGeoMR86VP/0GuGAtfETX/Nvfzkk6Asn51RtfiHw2VrXPYFEMsM17Nl2MrflNZsPhz\n X1kw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1701685484; x=1702290284;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=kLCM/2aeBwtLd6yTf6evW5OSTnsSROs8IoIoBeLdShI=;\n b=aCyIQvL/bMBkWkhihdHPnjOrwzVhHTt9gJjGEaGC26otfAl6EiAyhi9OGbSyJjD+gr\n MieIf5xi7GhrXV/9hSLrE/7hBTmCji33nSqwJOCxW6AAN4G0rY77dMYOKw1f9vHM+joZ\n PbplWF1TGuYUQFnOw1UNy4xaJzlbVuIs1JcSEU1bmjfX619xLMINR9nXiN45vQrcspWu\n PXT9VQd3ySID8lUprC6PXXyryFvg/235K1gdw3uAO66p6+GuGQgKabuSNxx2RCYnn4Aj\n r576xHSXWc/Hs6mKY0Da9cVa8H7NqZ5VU2xXSkTdtC0Rp0syiy7gqSzecD9BqrpcfNS8\n zsRg==", "X-Gm-Message-State": "AOJu0YwTxt2gZMAwVIyi3NpDymb/YmaO1KQ8+zt0/2TiabBQHGKBIzv+\n pp272OPcy0462luBx3gRCZOuYA==", "X-Google-Smtp-Source": "\n AGHT+IFQxBqLbTaSkiQc31rSYPbEfMxV9o9GRu+gtdUdwFWwP9y/B3Oj9yqgfmRGh/2Ka/8PRqWi3Q==", "X-Received": "by 2002:a05:600c:2604:b0:40b:5eed:20a0 with SMTP id\n h4-20020a05600c260400b0040b5eed20a0mr1285834wma.96.1701685484527;\n Mon, 04 Dec 2023 02:24:44 -0800 (PST)", "From": "=?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>", "To": "thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, jspewock@iol.unh.edu,\n probb@iol.unh.edu, paul.szczepanek@arm.com, yoan.picchi@foss.arm.com,\n Luca.Vizzarro@arm.com", "Cc": "dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>", "Subject": "[PATCH v9 13/21] dts: port and virtual device docstring update", "Date": "Mon, 4 Dec 2023 11:24:21 +0100", "Message-Id": "<20231204102429.106709-14-juraj.linkes@pantheon.tech>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20231204102429.106709-1-juraj.linkes@pantheon.tech>", "References": "<20231123151344.162812-1-juraj.linkes@pantheon.tech>\n <20231204102429.106709-1-juraj.linkes@pantheon.tech>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "Format according to the Google format and PEP257, with slight\ndeviations.\n\nSigned-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>\n---\n dts/framework/testbed_model/__init__.py | 17 ++++--\n dts/framework/testbed_model/port.py | 53 +++++++++++++++----\n dts/framework/testbed_model/virtual_device.py | 17 +++++-\n 3 files changed, 72 insertions(+), 15 deletions(-)", "diff": "diff --git a/dts/framework/testbed_model/__init__.py b/dts/framework/testbed_model/__init__.py\nindex 8ced05653b..6086512ca2 100644\n--- a/dts/framework/testbed_model/__init__.py\n+++ b/dts/framework/testbed_model/__init__.py\n@@ -2,9 +2,20 @@\n # Copyright(c) 2022-2023 University of New Hampshire\n # Copyright(c) 2023 PANTHEON.tech s.r.o.\n \n-\"\"\"\n-This package contains the classes used to model the physical traffic generator,\n-system under test and any other components that need to be interacted with.\n+\"\"\"Testbed modelling.\n+\n+This package defines the testbed elements DTS works with:\n+\n+ * A system under test node: :class:`~.sut_node.SutNode`,\n+ * A traffic generator node: :class:`~.tg_node.TGNode`,\n+ * The ports of network interface cards (NICs) present on nodes: :class:`~.port.Port`,\n+ * The logical cores of CPUs present on nodes: :class:`~.cpu.LogicalCore`,\n+ * The virtual devices that can be created on nodes: :class:`~.virtual_device.VirtualDevice`,\n+ * The operating systems running on nodes: :class:`~.linux_session.LinuxSession`\n+ and :class:`~.posix_session.PosixSession`.\n+\n+DTS needs to be able to connect to nodes and understand some of the hardware present on these nodes\n+to properly build and test DPDK.\n \"\"\"\n \n # pylama:ignore=W0611\ndiff --git a/dts/framework/testbed_model/port.py b/dts/framework/testbed_model/port.py\nindex 680c29bfe3..817405bea4 100644\n--- a/dts/framework/testbed_model/port.py\n+++ b/dts/framework/testbed_model/port.py\n@@ -2,6 +2,13 @@\n # Copyright(c) 2022 University of New Hampshire\n # Copyright(c) 2023 PANTHEON.tech s.r.o.\n \n+\"\"\"NIC port model.\n+\n+Basic port information, such as location (the port are identified by their PCI address on a node),\n+drivers and address.\n+\"\"\"\n+\n+\n from dataclasses import dataclass\n \n from framework.config import PortConfig\n@@ -9,24 +16,35 @@\n \n @dataclass(slots=True, frozen=True)\n class PortIdentifier:\n+ \"\"\"The port identifier.\n+\n+ Attributes:\n+ node: The node where the port resides.\n+ pci: The PCI address of the port on `node`.\n+ \"\"\"\n+\n node: str\n pci: str\n \n \n @dataclass(slots=True)\n class Port:\n- \"\"\"\n- identifier: The PCI address of the port on a node.\n-\n- os_driver: The driver used by this port when the OS is controlling it.\n- Example: i40e\n- os_driver_for_dpdk: The driver the device must be bound to for DPDK to use it,\n- Example: vfio-pci.\n+ \"\"\"Physical port on a node.\n \n- Note: os_driver and os_driver_for_dpdk may be the same thing.\n- Example: mlx5_core\n+ The ports are identified by the node they're on and their PCI addresses. The port on the other\n+ side of the connection is also captured here.\n+ Each port is serviced by a driver, which may be different for the operating system (`os_driver`)\n+ and for DPDK (`os_driver_for_dpdk`). For some devices, they are the same, e.g.: ``mlx5_core``.\n \n- peer: The identifier of a port this port is connected with.\n+ Attributes:\n+ identifier: The PCI address of the port on a node.\n+ os_driver: The operating system driver name when the operating system controls the port,\n+ e.g.: ``i40e``.\n+ os_driver_for_dpdk: The operating system driver name for use with DPDK, e.g.: ``vfio-pci``.\n+ peer: The identifier of a port this port is connected with.\n+ The `peer` is on a different node.\n+ mac_address: The MAC address of the port.\n+ logical_name: The logical name of the port. Must be discovered.\n \"\"\"\n \n identifier: PortIdentifier\n@@ -37,6 +55,12 @@ class Port:\n logical_name: str = \"\"\n \n def __init__(self, node_name: str, config: PortConfig):\n+ \"\"\"Initialize the port from `node_name` and `config`.\n+\n+ Args:\n+ node_name: The name of the port's node.\n+ config: The test run configuration of the port.\n+ \"\"\"\n self.identifier = PortIdentifier(\n node=node_name,\n pci=config.pci,\n@@ -47,14 +71,23 @@ def __init__(self, node_name: str, config: PortConfig):\n \n @property\n def node(self) -> str:\n+ \"\"\"The node where the port resides.\"\"\"\n return self.identifier.node\n \n @property\n def pci(self) -> str:\n+ \"\"\"The PCI address of the port.\"\"\"\n return self.identifier.pci\n \n \n @dataclass(slots=True, frozen=True)\n class PortLink:\n+ \"\"\"The physical, cabled connection between the ports.\n+\n+ Attributes:\n+ sut_port: The port on the SUT node connected to `tg_port`.\n+ tg_port: The port on the TG node connected to `sut_port`.\n+ \"\"\"\n+\n sut_port: Port\n tg_port: Port\ndiff --git a/dts/framework/testbed_model/virtual_device.py b/dts/framework/testbed_model/virtual_device.py\nindex eb664d9f17..e9b5e9c3be 100644\n--- a/dts/framework/testbed_model/virtual_device.py\n+++ b/dts/framework/testbed_model/virtual_device.py\n@@ -1,16 +1,29 @@\n # SPDX-License-Identifier: BSD-3-Clause\n # Copyright(c) 2023 PANTHEON.tech s.r.o.\n \n+\"\"\"Virtual devices model.\n+\n+Alongside support for physical hardware, DPDK can create various virtual devices.\n+\"\"\"\n+\n \n class VirtualDevice(object):\n- \"\"\"\n- Base class for virtual devices used by DPDK.\n+ \"\"\"Base class for virtual devices used by DPDK.\n+\n+ Attributes:\n+ name: The name of the virtual device.\n \"\"\"\n \n name: str\n \n def __init__(self, name: str):\n+ \"\"\"Initialize the virtual device.\n+\n+ Args:\n+ name: The name of the virtual device.\n+ \"\"\"\n self.name = name\n \n def __str__(self) -> str:\n+ \"\"\"This corresponds to the name used for DPDK devices.\"\"\"\n return self.name\n", "prefixes": [ "v9", "13/21" ] }{ "id": 134801, "url": "