get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/133914/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 133914,
    "url": "http://patches.dpdk.org/api/patches/133914/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231106171601.160749-14-juraj.linkes@pantheon.tech/",
    "project": {
        "id": 1,
        "url": "http://patches.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": "<20231106171601.160749-14-juraj.linkes@pantheon.tech>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231106171601.160749-14-juraj.linkes@pantheon.tech",
    "date": "2023-11-06T17:15:51",
    "name": "[v5,13/23] dts: port and virtual device docstring update",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ea49d2f0fb556eefc3eba64c228d8555d4d84109",
    "submitter": {
        "id": 1626,
        "url": "http://patches.dpdk.org/api/people/1626/?format=api",
        "name": "Juraj Linkeš",
        "email": "juraj.linkes@pantheon.tech"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20231106171601.160749-14-juraj.linkes@pantheon.tech/mbox/",
    "series": [
        {
            "id": 30173,
            "url": "http://patches.dpdk.org/api/series/30173/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30173",
            "date": "2023-11-06T17:15:38",
            "name": "dts: add dts api docs",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/30173/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/133914/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/133914/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 83909432BB;\n\tMon,  6 Nov 2023 18:18:00 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 54BB742D0B;\n\tMon,  6 Nov 2023 18:16:26 +0100 (CET)",
            "from mail-ej1-f49.google.com (mail-ej1-f49.google.com\n [209.85.218.49]) by mails.dpdk.org (Postfix) with ESMTP id 31003427D9\n for <dev@dpdk.org>; Mon,  6 Nov 2023 18:16:23 +0100 (CET)",
            "by mail-ej1-f49.google.com with SMTP id\n a640c23a62f3a-9ae2cc4d17eso733056466b.1\n for <dev@dpdk.org>; Mon, 06 Nov 2023 09:16:23 -0800 (PST)",
            "from jlinkes-PT-Latitude-5530.. (ip-46.34.243.197.o2inet.sk.\n [46.34.243.197]) by smtp.gmail.com with ESMTPSA id\n s10-20020a170906354a00b009b947aacb4bsm47016eja.191.2023.11.06.09.16.21\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 06 Nov 2023 09:16:22 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=pantheon.tech; s=google; t=1699290983; x=1699895783; 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=nNWqU1DLwXxy+jHTYIQUWcQVb4gb9gLJSwll5Z93zLQ=;\n b=l+m4xufIg9QZumWu0MQAxvqQFPPmV6y3dxqZ1Kg243i5btMMDjg4AorImsYGnZ0Z8Y\n WgU0Fst121eomjL+LH1DrUh9uGpNlVkh/q2QaYTR/JkZ4wvF8o0TNvHvVeXIbAREvRxG\n KpRY922lRwmpEwxQGmBPO9wfpCXcdUykxYllcrgbqCEYJQYKTE57ccylOIPaqxRM6nrS\n MlyTa1WQwQaFBAoL461cJjtROHv8sNGOlh14zenMQiO3viXs0wgpA4eq2qgkoK2wLUxb\n mvLcxCOM5LAarAiqbH7i/PrglMojX3kBFRv/KxotGqZ78GhA+EYAdYOxhosAkMXztoZE\n PBxg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1699290983; x=1699895783;\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=nNWqU1DLwXxy+jHTYIQUWcQVb4gb9gLJSwll5Z93zLQ=;\n b=UoPQFZYN7V/Gd+TmaBMoE3kwjZckYnZR/Ra3V02TvREfdN6cP9kqexPKX7o/Sh1+vQ\n O/8AFywp1OOOxqrfXfMyIsaso7lO2sM7yLThqLNWHH2a4q2sciDNeWP4bPWWelXWeu5L\n Wv3yjZng1kYJKcKDuuzcKDmRlbiy1KuYjsopMlaDzfwSW2A4N3SC3FqqtfZ4+avwqG1B\n TSjaj86ZJ3xeFmZAe32Ra/PVPPPDaUDoraIQ8LMNe9UrUIYmQK/q0QQs4raE/b44RT2c\n r0duap6Vgn+D4t+QeSdABK4tGcKlN3fxXnlZbfGnha3RXXAErPeN8t/GLr+8Sf8WzS5z\n zNmg==",
        "X-Gm-Message-State": "AOJu0YwP5fRM1nTMK/kzm8OK/rCwyvuw0PNokPm+pB4q+CzUDlNHr+9H\n 8nqlyWjMrCaBLFcEd1B0BmUlaFzVTJoOFl4cimageg==",
        "X-Google-Smtp-Source": "\n AGHT+IGmfM1NYWGlKgsBxKwZHJ2LkG9PMMFznx4zkUGnySk+l8TDIqZbK+IuZF3DQzY2jm1gzDDioQ==",
        "X-Received": "by 2002:a17:907:806:b0:9b2:b269:d563 with SMTP id\n wv6-20020a170907080600b009b2b269d563mr15667681ejb.63.1699290982911;\n Mon, 06 Nov 2023 09:16:22 -0800 (PST)",
        "From": "=?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>",
        "To": "thomas@monjalon.net, Honnappa.Nagarahalli@arm.com,\n bruce.richardson@intel.com, jspewock@iol.unh.edu, probb@iol.unh.edu,\n paul.szczepanek@arm.com, yoan.picchi@foss.arm.com",
        "Cc": "dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>",
        "Subject": "[PATCH v5 13/23] dts: port and virtual device docstring update",
        "Date": "Mon,  6 Nov 2023 18:15:51 +0100",
        "Message-Id": "<20231106171601.160749-14-juraj.linkes@pantheon.tech>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20231106171601.160749-1-juraj.linkes@pantheon.tech>",
        "References": "<20230831100407.59865-1-juraj.linkes@pantheon.tech>\n <20231106171601.160749-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       | 16 ++++--\n dts/framework/testbed_model/port.py           | 53 +++++++++++++++----\n dts/framework/testbed_model/virtual_device.py | 17 +++++-\n 3 files changed, 71 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/dts/framework/testbed_model/__init__.py b/dts/framework/testbed_model/__init__.py\nindex 8ced05653b..a02be1f2d9 100644\n--- a/dts/framework/testbed_model/__init__.py\n+++ b/dts/framework/testbed_model/__init__.py\n@@ -2,9 +2,19 @@\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:`SutNode`,\n+    * A traffic generator node: :class:`TGNode`,\n+    * The ports of network interface cards (NICs) present on nodes: :class:`Port`,\n+    * The logical cores of CPUs present on nodes: :class:`LogicalCore`,\n+    * The virtual devices that can be created on nodes: :class:`VirtualDevice`,\n+    * The operating systems running on nodes: :class:`LinuxSession` and :class:`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": [
        "v5",
        "13/23"
    ]
}