get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 130215,
    "url": "http://patchwork.dpdk.org/api/patches/130215/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230811212929.21983-3-jspewock@iol.unh.edu/",
    "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": "<20230811212929.21983-3-jspewock@iol.unh.edu>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230811212929.21983-3-jspewock@iol.unh.edu",
    "date": "2023-08-11T21:28:38",
    "name": "[RFC,v1,1/1] dts: add scatter test suite",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "dec856f3d833d0e1c1555846ff0d0158ba179bfe",
    "submitter": {
        "id": 2772,
        "url": "http://patchwork.dpdk.org/api/people/2772/?format=api",
        "name": "Jeremy Spewock",
        "email": "jspewock@iol.unh.edu"
    },
    "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/20230811212929.21983-3-jspewock@iol.unh.edu/mbox/",
    "series": [
        {
            "id": 29200,
            "url": "http://patchwork.dpdk.org/api/series/29200/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29200",
            "date": "2023-08-11T21:28:37",
            "name": "Add scatter to DTS",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/29200/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/130215/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/130215/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 83CD143038;\n\tFri, 11 Aug 2023 23:30:08 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8184E43247;\n\tFri, 11 Aug 2023 23:30:05 +0200 (CEST)",
            "from mail-io1-f100.google.com (mail-io1-f100.google.com\n [209.85.166.100])\n by mails.dpdk.org (Postfix) with ESMTP id 796834323A\n for <dev@dpdk.org>; Fri, 11 Aug 2023 23:30:04 +0200 (CEST)",
            "by mail-io1-f100.google.com with SMTP id\n ca18e2360f4ac-790cc395896so84397639f.1\n for <dev@dpdk.org>; Fri, 11 Aug 2023 14:30:04 -0700 (PDT)",
            "from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84])\n by smtp-relay.gmail.com with ESMTPS id\n ge11-20020a056638680b00b0042b39d0f5f6sm192447jab.67.2023.08.11.14.30.03\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Fri, 11 Aug 2023 14:30:03 -0700 (PDT)",
            "from iol.unh.edu (unknown\n [IPv6:2606:4100:3880:1271:90f9:1b64:f6e6:867f])\n by postal.iol.unh.edu (Postfix) with ESMTP id 4FA116052471;\n Fri, 11 Aug 2023 17:30:03 -0400 (EDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=iol.unh.edu; s=unh-iol; t=1691789404; x=1692394204;\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=dcbz2aR+9mPVSqXNwrszhvQHCrwuY9LGsVN1/LV88AU=;\n b=L9lnY3Yxm/PydWGptanwdlaSJoGjeBfZpNqAAoGZNzpgXlXnpKF0CYZyAeE/LqUdWR\n OOdhWsTR5iqo4PvmFzfFu3MKGGKyEIQanvCmMog4zmHQT+nFtJ3jy+Pt3cq8Dtz/iu44\n G8ewIc6UTHZ2BaweBamvRIrPOwyCZNGeTpIVE=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20221208; t=1691789404; x=1692394204;\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=dcbz2aR+9mPVSqXNwrszhvQHCrwuY9LGsVN1/LV88AU=;\n b=L4IeoDn6HhcGC7pIH9JcUaYeeBhEJ/AVGCdWh4MJCEwtUqpIWC8K/TvB4LYeQTJQ+N\n nFX/FDekZFUHv4rdZiv2qmvHKKf7eXw0bqhsmhdPoyORl9juxn+W2iFS6K8HV0PZa/Ie\n 9A9ZWnxAwVHwgci2Ko4k3I21/r72uA2A8tpYWE4fZT/jg4Pm8hsoTDJd3WzCKkEp/d6Z\n GzK/alPSGqkVyq49uFk+/w9cLKt2/Xs+GJfOA86O7CnoG4O82TTV8jWW1+oYy4Wfaj+a\n i6A08KNqAurziI8K41hXr+A7wCRh6RmSNjUjLD6RTk1AvhpYLTu2lT4dbY71anARUSex\n HvbA==",
        "X-Gm-Message-State": "AOJu0YyqOCL/omMH9CI6p7RKY4T1qRwQapQHs+IJ4hpGa2zalMPEK8Y2\n tGFJu8q4+GN+it5d1w1EsLk+iSb6/H5eR1MJlvFEIcpSbCzLHw==",
        "X-Google-Smtp-Source": "\n AGHT+IELE4IhFshd4jcQF9NypaH7r/N8b1YxTcD//Q3wTJeTxKMI7LosD5kR92W9xEobvfvIcqkoniB5T2Qt",
        "X-Received": "by 2002:a05:6e02:1a81:b0:349:969f:faf4 with SMTP id\n k1-20020a056e021a8100b00349969ffaf4mr4007976ilv.20.1691789403923;\n Fri, 11 Aug 2023 14:30:03 -0700 (PDT)",
        "X-Relaying-Domain": "iol.unh.edu",
        "From": "jspewock@iol.unh.edu",
        "To": "Honnappa.Nagarahalli@arm.com, thomas@monjalon.net, lijuan.tu@intel.com,\n wathsala.vithanage@arm.com, probb@iol.unh.edu, juraj.linkes@pantheon.tech",
        "Cc": "dev@dpdk.org,\n\tJeremy Spewock <jspewock@iol.unh.edu>",
        "Subject": "[RFC v1 1/1] dts: add scatter test suite",
        "Date": "Fri, 11 Aug 2023 17:28:38 -0400",
        "Message-ID": "<20230811212929.21983-3-jspewock@iol.unh.edu>",
        "X-Mailer": "git-send-email 2.41.0",
        "In-Reply-To": "<20230811212929.21983-2-jspewock@iol.unh.edu>",
        "References": "<20230811212929.21983-2-jspewock@iol.unh.edu>",
        "MIME-Version": "1.0",
        "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": "From: Jeremy Spewock <jspewock@iol.unh.edu>\n\nAdds a new test suite that tests the support of scattered packets in\npoll mode drivers. It is a rewrite of the existing scatter test suite in\nthe DTS repository of the DPDK project.\n\nSigned-off-by: Jeremy Spewock <jspewock@iol.unh.edu>\n---\n .../remote_session/remote/testpmd_shell.py    | 30 ++++++++-\n dts/framework/testbed_model/__init__.py       |  2 +\n dts/framework/testbed_model/hw/__init__.py    |  1 +\n dts/framework/testbed_model/hw/port.py        |  9 +++\n dts/framework/testbed_model/sut_node.py       |  5 +-\n dts/tests/TestSuite_scatter.py                | 62 +++++++++++++++++++\n 6 files changed, 107 insertions(+), 2 deletions(-)\n create mode 100644 dts/tests/TestSuite_scatter.py",
    "diff": "diff --git a/dts/framework/remote_session/remote/testpmd_shell.py b/dts/framework/remote_session/remote/testpmd_shell.py\nindex 1455b5a199..4feed3bdb8 100644\n--- a/dts/framework/remote_session/remote/testpmd_shell.py\n+++ b/dts/framework/remote_session/remote/testpmd_shell.py\n@@ -3,6 +3,8 @@\n \n from pathlib import PurePath\n from typing import Callable\n+from framework.settings import SETTINGS\n+import time\n \n from .interactive_shell import InteractiveShell\n \n@@ -29,7 +31,7 @@ def _start_application(\n         self, get_privileged_command: Callable[[str], str] | None\n     ) -> None:\n         \"\"\"See \"_start_application\" in InteractiveShell.\"\"\"\n-        self._app_args += \" -- -i\"\n+        self._app_args += \" -i\"\n         super()._start_application(get_privileged_command)\n \n     def get_devices(self) -> list[TestPmdDevice]:\n@@ -47,3 +49,29 @@ def get_devices(self) -> list[TestPmdDevice]:\n             if \"device name:\" in line.lower():\n                 dev_list.append(TestPmdDevice(line))\n         return dev_list\n+\n+    def wait_link_status_up(self, port_id: int, timeout=SETTINGS.timeout) -> bool:\n+        \"\"\"Wait until the link status on the given port is \"up\".\n+\n+        Arguments:\n+            port_id: Port to check the link status on.\n+            timeout: time to wait for the link to come up.\n+\n+        Returns:\n+            If the link came up in time or not.\n+        \"\"\"\n+        time_to_stop = time.time() + timeout\n+        while time.time() < time_to_stop:\n+            port_info = self.send_command(f\"show port info {port_id}\")\n+            if \"Link status: up\" in port_info:\n+                break\n+            time.sleep(0.5)\n+        else:\n+            self._logger.error(\n+                f\"The link for port {port_id} did not come up in the given timeout.\"\n+            )\n+        return \"Link status: up\" in port_info\n+\n+    def close(self) -> None:\n+        self.send_command(\"exit\", \"\")\n+        return super().close()\ndiff --git a/dts/framework/testbed_model/__init__.py b/dts/framework/testbed_model/__init__.py\nindex 5cbb859e47..ead25aea8e 100644\n--- a/dts/framework/testbed_model/__init__.py\n+++ b/dts/framework/testbed_model/__init__.py\n@@ -17,6 +17,8 @@\n     LogicalCoreListFilter,\n     VirtualDevice,\n     lcore_filter,\n+    Port,\n+    PortLink\n )\n from .node import Node\n from .sut_node import SutNode\ndiff --git a/dts/framework/testbed_model/hw/__init__.py b/dts/framework/testbed_model/hw/__init__.py\nindex 88ccac0b0e..5719af2017 100644\n--- a/dts/framework/testbed_model/hw/__init__.py\n+++ b/dts/framework/testbed_model/hw/__init__.py\n@@ -12,6 +12,7 @@\n     LogicalCoreListFilter,\n )\n from .virtual_device import VirtualDevice\n+from .port import Port, PortLink\n \n \n def lcore_filter(\ndiff --git a/dts/framework/testbed_model/hw/port.py b/dts/framework/testbed_model/hw/port.py\nindex 680c29bfe3..97cfd01b6b 100644\n--- a/dts/framework/testbed_model/hw/port.py\n+++ b/dts/framework/testbed_model/hw/port.py\n@@ -27,6 +27,7 @@ class Port:\n         Example: mlx5_core\n \n     peer: The identifier of a port this port is connected with.\n+    logical_name: The logical name of the port (e.g. ens162)\n     \"\"\"\n \n     identifier: PortIdentifier\n@@ -35,6 +36,7 @@ class Port:\n     peer: PortIdentifier\n     mac_address: str = \"\"\n     logical_name: str = \"\"\n+    _id: int | None\n \n     def __init__(self, node_name: str, config: PortConfig):\n         self.identifier = PortIdentifier(\n@@ -44,6 +46,7 @@ def __init__(self, node_name: str, config: PortConfig):\n         self.os_driver = config.os_driver\n         self.os_driver_for_dpdk = config.os_driver_for_dpdk\n         self.peer = PortIdentifier(node=config.peer_node, pci=config.peer_pci)\n+        self._id = None\n \n     @property\n     def node(self) -> str:\n@@ -53,6 +56,12 @@ def node(self) -> str:\n     def pci(self) -> str:\n         return self.identifier.pci\n \n+    @property\n+    def id(self) -> int:\n+        if self._id is None:\n+            self._id = self.pci.split(\".\")[-1]\n+        return self._id\n+\n \n @dataclass(slots=True, frozen=True)\n class PortLink:\ndiff --git a/dts/framework/testbed_model/sut_node.py b/dts/framework/testbed_model/sut_node.py\nindex 202aebfd06..8779c1e1b0 100644\n--- a/dts/framework/testbed_model/sut_node.py\n+++ b/dts/framework/testbed_model/sut_node.py\n@@ -360,6 +360,7 @@ def create_interactive_shell(\n         timeout: float = SETTINGS.timeout,\n         privileged: bool = False,\n         eal_parameters: EalParameters | str | None = None,\n+        app_parameters: str | None = None\n     ) -> InteractiveShellType:\n         \"\"\"Factory method for creating a handler for an interactive session.\n \n@@ -374,6 +375,8 @@ def create_interactive_shell(\n             eal_parameters: List of EAL parameters to use to launch the app. If this\n                 isn't provided or an empty string is passed, it will default to calling\n                 create_eal_parameters().\n+            app_parameters: Additional arguments to pass into the application on the\n+                command-line.\n         Returns:\n             Instance of the desired interactive application.\n         \"\"\"\n@@ -387,5 +390,5 @@ def create_interactive_shell(\n             )\n \n         return super().create_interactive_shell(\n-            shell_cls, timeout, privileged, str(eal_parameters)\n+            shell_cls, timeout, privileged, f\"{eal_parameters} -- {app_parameters}\"\n         )\ndiff --git a/dts/tests/TestSuite_scatter.py b/dts/tests/TestSuite_scatter.py\nnew file mode 100644\nindex 0000000000..898d56e288\n--- /dev/null\n+++ b/dts/tests/TestSuite_scatter.py\n@@ -0,0 +1,62 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2023 University of New Hampshire\n+\n+from framework.test_suite import TestSuite\n+from framework.testbed_model import PortLink\n+from framework.remote_session import TestPmdShell\n+\n+\n+class Scatter(TestSuite):\n+    port_link_for_testing: PortLink\n+    mbsize: int\n+\n+    def set_up_suite(self) -> None:\n+        self.verify(\n+            len(self._port_links) > 0,\n+            \"Must have at least one port link to run scatter\"\n+        )\n+        self.port_link_for_testing = self._port_links[0]\n+        self.mbsize = 1024  # TODO: make this 2048 for some NICs like in old DTS\n+        self.tg_node.main_session.send_command(\n+            f\"ifconfig {self.port_link_for_testing.tg_port.logical_name} mtu 9000\"\n+        )\n+\n+    def scatter_pktgen_send_packet(self, pktsize: int) -> None:\n+        \"\"\"Generate and send packet to the SUT.\n+\n+        Functional test for scatter packets.\n+\n+        Args:\n+            pktsize: Size of the packet to generate and send.\n+        \"\"\"\n+        dest_mac = self.port_link_for_testing.sut_port.mac_address\n+        # TODO: Need to create the packet and then send it and receive\n+\n+    def test_scatter_mbuf_2048(self) -> None:\n+        \"\"\"\n+        Test:\n+            Start testpmd and run functional test with preset mbsize.\n+        \"\"\"\n+        testpmd = self.sut_node.create_interactive_shell(\n+            TestPmdShell,\n+            app_parameters=f\"--mbcache=200 \\\n+                            --mbuf-size={self.mbsize} \\\n+                            --portmask=0x1 \\\n+                            --max-pkt-len=9000 \\\n+                            --port-topology=loop \\\n+                            --tx-offloads=0x00008000\"\n+        )\n+        testpmd.send_command(\"set fwd mac\")\n+        testpmd.send_command(\"start\")\n+        link_is_up = testpmd.wait_link_status_up(self.port_link_for_testing.sut_port.id)\n+        self.verify(link_is_up, \"Link never came up in TestPMD.\")\n+\n+        for offset in [-1, 0, 1, 4, 5]:\n+            self.scatter_pktgen_send_packet(self.mbsize + offset)\n+\n+        testpmd.send_command(\"stop\")\n+\n+    def tear_down_suite(self) -> None:\n+        self.tg_node.main_session.send_command(\n+            f\"ifconfig {self.port_link_for_testing.tg_port.logical_name} mtu 1500\"\n+        )\n",
    "prefixes": [
        "RFC",
        "v1",
        "1/1"
    ]
}