get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 139546,
    "url": "https://patches.dpdk.org/api/patches/139546/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20240419135216.106445-1-juraj.linkes@pantheon.tech/",
    "project": {
        "id": 1,
        "url": "https://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": "<20240419135216.106445-1-juraj.linkes@pantheon.tech>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240419135216.106445-1-juraj.linkes@pantheon.tech",
    "date": "2024-04-19T13:52:16",
    "name": "[v1] dts: remove the OS UDP test suite",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2c70425d1c5ccb1d07d758d0535b5d09cffd9b1b",
    "submitter": {
        "id": 1626,
        "url": "https://patches.dpdk.org/api/people/1626/?format=api",
        "name": "Juraj Linkeš",
        "email": "juraj.linkes@pantheon.tech"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20240419135216.106445-1-juraj.linkes@pantheon.tech/mbox/",
    "series": [
        {
            "id": 31793,
            "url": "https://patches.dpdk.org/api/series/31793/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=31793",
            "date": "2024-04-19T13:52:16",
            "name": "[v1] dts: remove the OS UDP test suite",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/31793/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/139546/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/139546/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 4971C43EB0;\n\tFri, 19 Apr 2024 15:52:21 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0DBAB402D9;\n\tFri, 19 Apr 2024 15:52:21 +0200 (CEST)",
            "from mail-ej1-f50.google.com (mail-ej1-f50.google.com\n [209.85.218.50]) by mails.dpdk.org (Postfix) with ESMTP id 59DD0402D4\n for <dev@dpdk.org>; Fri, 19 Apr 2024 15:52:18 +0200 (CEST)",
            "by mail-ej1-f50.google.com with SMTP id\n a640c23a62f3a-a52582ecde4so191374966b.0\n for <dev@dpdk.org>; Fri, 19 Apr 2024 06:52:18 -0700 (PDT)",
            "from jlinkes-PT-Latitude-5530.pantheon.local ([84.245.121.75])\n by smtp.gmail.com with ESMTPSA id\n ju23-20020a170906e91700b00a558d5d28b6sm404224ejb.73.2024.04.19.06.52.16\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 19 Apr 2024 06:52:17 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=pantheon.tech; s=google; t=1713534738; x=1714139538; darn=dpdk.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=84NU6jJE+y6/gxJpJupr6roBwQQhxntC2am7pGP2nR0=;\n b=nQF3Gcb/mINjPG4rpeUsOBJWzZpHPvtv2HPa532TgnOeIQWvQLMfKr8Yt4JVOqnHot\n kQ5bg+gPN9htPbPT0yXSExMBS1tslV9U8cFqDu0uD9C5Wgg9wkAYMs3p+Zl4rMLJu9wb\n t56jeESAfyj/0SaWX3dWWbmiCbQ6iCL1Yrf6RhsPgUcFw/WaNqDUClccn0YXvjrS5Rw1\n gLauIE31sGsiQIFIhVarHCwXd7c6BCzN7Ycj/y0tjMyXywNFOQXoQfrUJjNcPBT0uRDp\n tGoBFMH4FV/RdS7YOZBFtDkTEEvjg1qyrbTPAXCapOOcqMGkI+lE/sU0Pqap2xWhBl8t\n 9trA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1713534738; x=1714139538;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=84NU6jJE+y6/gxJpJupr6roBwQQhxntC2am7pGP2nR0=;\n b=FehFExdlg/xG7TpFWJs4luzpaWQV26mHb2QT2DkluXwBvWZKpb1xaqLpuPz0SOojXh\n eefmPi1PE1UQ9jIA+OjsH9HTL+prMpk5uf4uHR+FF/fL5P0Fmw9tcunDZWk2ipBr7gXQ\n +pj9fnJRGrkYL7TjmmbC6h1K11J5qgxm5xWjfB7aLD0YDZ36pm5zbfPc+7evEQYWhhyp\n boGt4d9HZVHNLCkVr5jV+nE7Th1WBS+nMAtdey/NlF5SAPiN37Rv8E+NPJWgcHlNAPaQ\n O0ihJgpJZEMZPGpmTJD3QWDUg2TvMK/GoVTFtEN7vEYqiNQhsopkJUz+onbemB6Mz3up\n gy/g==",
        "X-Gm-Message-State": "AOJu0YwR/YjOtGDg9ZDnBLf2B76LZkyAlY5scZ9oyaDjBSsaxy+3zkwn\n /kOKJSCcl86rlwlT+lfNYtPHQmoVeI/nCPoCqTdTRdHPJMbTJlov5IS+WYhMcpE=",
        "X-Google-Smtp-Source": "\n AGHT+IGhJFAs5YckWtrYNnRStpCs9X4SBsPCcgdB5wiyXVo1gkj74M8MTBNIgB5Sjl4qoV8ozbRS6A==",
        "X-Received": "by 2002:a17:906:bc98:b0:a55:68b2:4186 with SMTP id\n lv24-20020a170906bc9800b00a5568b24186mr1533958ejb.45.1713534738038;\n Fri, 19 Apr 2024 06:52:18 -0700 (PDT)",
        "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, Luca.Vizzarro@arm.com,\n npratte@iol.unh.edu",
        "Cc": "dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>",
        "Subject": "[PATCH v1] dts: remove the OS UDP test suite",
        "Date": "Fri, 19 Apr 2024 15:52:16 +0200",
        "Message-Id": "<20240419135216.106445-1-juraj.linkes@pantheon.tech>",
        "X-Mailer": "git-send-email 2.34.1",
        "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": "The test suite served as a demonstration of the Scapy traffic generator\nimplementation. Now that we have a test suite that uses DPDK code (via\ntestpmd), there is no reason to keep the test suite, as there's no\nexpectation it'll be actually used in any setup.\n\nSigned-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>\n---\n dts/conf.yaml                                |  1 -\n dts/framework/config/conf_yaml_schema.json   |  1 -\n dts/framework/test_suite.py                  | 36 -------------\n dts/framework/testbed_model/linux_session.py | 27 +---------\n dts/framework/testbed_model/node.py          | 29 +----------\n dts/framework/testbed_model/os_session.py    | 36 +------------\n dts/framework/testbed_model/sut_node.py      |  9 ----\n dts/tests/TestSuite_os_udp.py                | 53 --------------------\n 8 files changed, 4 insertions(+), 188 deletions(-)\n delete mode 100644 dts/tests/TestSuite_os_udp.py",
    "diff": "diff --git a/dts/conf.yaml b/dts/conf.yaml\nindex 8068345dd5..d61fb39303 100644\n--- a/dts/conf.yaml\n+++ b/dts/conf.yaml\n@@ -16,7 +16,6 @@ executions:\n     skip_smoke_tests: false # optional\n     test_suites: # the following test suites will be run in their entirety\n       - hello_world\n-      - os_udp\n     # The machine running the DPDK test executable\n     system_under_test_node:\n       node_name: \"SUT 1\"\ndiff --git a/dts/framework/config/conf_yaml_schema.json b/dts/framework/config/conf_yaml_schema.json\nindex 4731f4511d..105671a639 100644\n--- a/dts/framework/config/conf_yaml_schema.json\n+++ b/dts/framework/config/conf_yaml_schema.json\n@@ -186,7 +186,6 @@\n       \"type\": \"string\",\n       \"enum\": [\n         \"hello_world\",\n-        \"os_udp\",\n         \"pmd_buffer_scatter\"\n       ]\n     },\ndiff --git a/dts/framework/test_suite.py b/dts/framework/test_suite.py\nindex 9c3b516002..9758a283de 100644\n--- a/dts/framework/test_suite.py\n+++ b/dts/framework/test_suite.py\n@@ -139,42 +139,6 @@ def tear_down_test_case(self) -> None:\n         This is done after *each* test case.\n         \"\"\"\n \n-    def configure_testbed_ipv4(self, restore: bool = False) -> None:\n-        \"\"\"Configure IPv4 addresses on all testbed ports.\n-\n-        The configured ports are:\n-\n-        * SUT ingress port,\n-        * SUT egress port,\n-        * TG ingress port,\n-        * TG egress port.\n-\n-        Args:\n-            restore: If :data:`True`, will remove the configuration instead.\n-        \"\"\"\n-        delete = True if restore else False\n-        enable = False if restore else True\n-        self._configure_ipv4_forwarding(enable)\n-        self.sut_node.configure_port_ip_address(\n-            self._sut_ip_address_egress, self._sut_port_egress, delete\n-        )\n-        self.sut_node.configure_port_state(self._sut_port_egress, enable)\n-        self.sut_node.configure_port_ip_address(\n-            self._sut_ip_address_ingress, self._sut_port_ingress, delete\n-        )\n-        self.sut_node.configure_port_state(self._sut_port_ingress, enable)\n-        self.tg_node.configure_port_ip_address(\n-            self._tg_ip_address_ingress, self._tg_port_ingress, delete\n-        )\n-        self.tg_node.configure_port_state(self._tg_port_ingress, enable)\n-        self.tg_node.configure_port_ip_address(\n-            self._tg_ip_address_egress, self._tg_port_egress, delete\n-        )\n-        self.tg_node.configure_port_state(self._tg_port_egress, enable)\n-\n-    def _configure_ipv4_forwarding(self, enable: bool) -> None:\n-        self.sut_node.configure_ipv4_forwarding(enable)\n-\n     def send_packet_and_capture(\n         self,\n         packet: Packet,\ndiff --git a/dts/framework/testbed_model/linux_session.py b/dts/framework/testbed_model/linux_session.py\nindex 5d24030c3d..e3fd0534ce 100644\n--- a/dts/framework/testbed_model/linux_session.py\n+++ b/dts/framework/testbed_model/linux_session.py\n@@ -10,8 +10,7 @@\n \"\"\"\n \n import json\n-from ipaddress import IPv4Interface, IPv6Interface\n-from typing import TypedDict, Union\n+from typing import TypedDict\n \n from typing_extensions import NotRequired\n \n@@ -179,25 +178,6 @@ def _update_port_attr(self, port: Port, attr_value: str | None, attr_name: str)\n                 f\"Attempted to get '{attr_name}' of port {port.pci}, but it doesn't exist.\"\n             )\n \n-    def configure_port_state(self, port: Port, enable: bool) -> None:\n-        \"\"\"Overrides :meth:`~.os_session.OSSession.configure_port_state`.\"\"\"\n-        state = \"up\" if enable else \"down\"\n-        self.send_command(f\"ip link set dev {port.logical_name} {state}\", privileged=True)\n-\n-    def configure_port_ip_address(\n-        self,\n-        address: Union[IPv4Interface, IPv6Interface],\n-        port: Port,\n-        delete: bool,\n-    ) -> None:\n-        \"\"\"Overrides :meth:`~.os_session.OSSession.configure_port_ip_address`.\"\"\"\n-        command = \"del\" if delete else \"add\"\n-        self.send_command(\n-            f\"ip address {command} {address} dev {port.logical_name}\",\n-            privileged=True,\n-            verify=True,\n-        )\n-\n     def configure_port_mtu(self, mtu: int, port: Port) -> None:\n         \"\"\"Overrides :meth:`~.os_session.OSSession.configure_port_mtu`.\"\"\"\n         self.send_command(\n@@ -205,8 +185,3 @@ def configure_port_mtu(self, mtu: int, port: Port) -> None:\n             privileged=True,\n             verify=True,\n         )\n-\n-    def configure_ipv4_forwarding(self, enable: bool) -> None:\n-        \"\"\"Overrides :meth:`~.os_session.OSSession.configure_ipv4_forwarding`.\"\"\"\n-        state = 1 if enable else 0\n-        self.send_command(f\"sysctl -w net.ipv4.ip_forward={state}\", privileged=True)\ndiff --git a/dts/framework/testbed_model/node.py b/dts/framework/testbed_model/node.py\nindex 74061f6262..df5742d761 100644\n--- a/dts/framework/testbed_model/node.py\n+++ b/dts/framework/testbed_model/node.py\n@@ -13,8 +13,7 @@\n \"\"\"\n \n from abc import ABC\n-from ipaddress import IPv4Interface, IPv6Interface\n-from typing import Any, Callable, Type, Union\n+from typing import Any, Callable, Type\n \n from framework.config import (\n     OS,\n@@ -100,8 +99,6 @@ def __init__(self, node_config: NodeConfiguration):\n     def _init_ports(self) -> None:\n         self.ports = [Port(self.name, port_config) for port_config in self.config.ports]\n         self.main_session.update_ports(self.ports)\n-        for port in self.ports:\n-            self.configure_port_state(port)\n \n     def set_up_execution(self, execution_config: ExecutionConfiguration) -> None:\n         \"\"\"Execution setup steps.\n@@ -269,30 +266,6 @@ def _setup_hugepages(self) -> None:\n                 self.config.hugepages.amount, self.config.hugepages.force_first_numa\n             )\n \n-    def configure_port_state(self, port: Port, enable: bool = True) -> None:\n-        \"\"\"Enable/disable `port`.\n-\n-        Args:\n-            port: The port to enable/disable.\n-            enable: :data:`True` to enable, :data:`False` to disable.\n-        \"\"\"\n-        self.main_session.configure_port_state(port, enable)\n-\n-    def configure_port_ip_address(\n-        self,\n-        address: Union[IPv4Interface, IPv6Interface],\n-        port: Port,\n-        delete: bool = False,\n-    ) -> None:\n-        \"\"\"Add an IP address to `port` on this node.\n-\n-        Args:\n-            address: The IP address with mask in CIDR format. Can be either IPv4 or IPv6.\n-            port: The port to which to add the address.\n-            delete: If :data:`True`, will delete the address from the port instead of adding it.\n-        \"\"\"\n-        self.main_session.configure_port_ip_address(address, port, delete)\n-\n     def close(self) -> None:\n         \"\"\"Close all connections and free other resources.\"\"\"\n         if self.main_session:\ndiff --git a/dts/framework/testbed_model/os_session.py b/dts/framework/testbed_model/os_session.py\nindex d5bf7e0401..6d51e080ff 100644\n--- a/dts/framework/testbed_model/os_session.py\n+++ b/dts/framework/testbed_model/os_session.py\n@@ -21,11 +21,11 @@\n     the :attr:`~.node.Node.main_session` translates that to ``rm -rf`` if the node's OS is Linux\n     and other commands for other OSs. It also translates the path to match the underlying OS.\n \"\"\"\n+\n from abc import ABC, abstractmethod\n from collections.abc import Iterable\n-from ipaddress import IPv4Interface, IPv6Interface\n from pathlib import PurePath\n-from typing import Type, TypeVar, Union\n+from typing import Type, TypeVar\n \n from framework.config import Architecture, NodeConfiguration, NodeInfo\n from framework.logger import DTSLogger\n@@ -388,30 +388,6 @@ def update_ports(self, ports: list[Port]) -> None:\n             ports: The ports to update.\n         \"\"\"\n \n-    @abstractmethod\n-    def configure_port_state(self, port: Port, enable: bool) -> None:\n-        \"\"\"Enable/disable `port` in the operating system.\n-\n-        Args:\n-            port: The port to configure.\n-            enable: If :data:`True`, enable the port, otherwise shut it down.\n-        \"\"\"\n-\n-    @abstractmethod\n-    def configure_port_ip_address(\n-        self,\n-        address: Union[IPv4Interface, IPv6Interface],\n-        port: Port,\n-        delete: bool,\n-    ) -> None:\n-        \"\"\"Configure an IP address on `port` in the operating system.\n-\n-        Args:\n-            address: The address to configure.\n-            port: The port to configure.\n-            delete: If :data:`True`, remove the IP address, otherwise configure it.\n-        \"\"\"\n-\n     @abstractmethod\n     def configure_port_mtu(self, mtu: int, port: Port) -> None:\n         \"\"\"Configure `mtu` on `port`.\n@@ -420,11 +396,3 @@ def configure_port_mtu(self, mtu: int, port: Port) -> None:\n             mtu: Desired MTU value.\n             port: Port to set `mtu` on.\n         \"\"\"\n-\n-    @abstractmethod\n-    def configure_ipv4_forwarding(self, enable: bool) -> None:\n-        \"\"\"Enable IPv4 forwarding in the operating system.\n-\n-        Args:\n-            enable: If :data:`True`, enable the forwarding, otherwise disable it.\n-        \"\"\"\ndiff --git a/dts/framework/testbed_model/sut_node.py b/dts/framework/testbed_model/sut_node.py\nindex 97aa26d419..ee3168d92b 100644\n--- a/dts/framework/testbed_model/sut_node.py\n+++ b/dts/framework/testbed_model/sut_node.py\n@@ -10,7 +10,6 @@\n An SUT node is where this SUT runs.\n \"\"\"\n \n-\n import os\n import tarfile\n import time\n@@ -429,14 +428,6 @@ def run_dpdk_app(\n             f\"{app_path} {eal_args}\", timeout, privileged=True, verify=True\n         )\n \n-    def configure_ipv4_forwarding(self, enable: bool) -> None:\n-        \"\"\"Enable/disable IPv4 forwarding on the node.\n-\n-        Args:\n-            enable: If :data:`True`, enable the forwarding, otherwise disable it.\n-        \"\"\"\n-        self.main_session.configure_ipv4_forwarding(enable)\n-\n     def create_interactive_shell(\n         self,\n         shell_cls: Type[InteractiveShellType],\ndiff --git a/dts/tests/TestSuite_os_udp.py b/dts/tests/TestSuite_os_udp.py\ndeleted file mode 100644\nindex b4784dd95e..0000000000\n--- a/dts/tests/TestSuite_os_udp.py\n+++ /dev/null\n@@ -1,53 +0,0 @@\n-# SPDX-License-Identifier: BSD-3-Clause\n-# Copyright(c) 2023 PANTHEON.tech s.r.o.\n-\n-\"\"\"Basic IPv4 OS routing test suite.\n-\n-Configure SUT node to route traffic from if1 to if2.\n-Send a packet to the SUT node, verify it comes back on the second port on the TG node.\n-\"\"\"\n-\n-from scapy.layers.inet import IP, UDP  # type: ignore[import]\n-from scapy.layers.l2 import Ether  # type: ignore[import]\n-\n-from framework.test_suite import TestSuite\n-\n-\n-class TestOsUdp(TestSuite):\n-    \"\"\"IPv4 UDP OS routing test suite.\"\"\"\n-\n-    def set_up_suite(self) -> None:\n-        \"\"\"Set up the test suite.\n-\n-        Setup:\n-            Bind the SUT ports to the OS driver, configure the ports and configure the SUT\n-            to route traffic from if1 to if2.\n-        \"\"\"\n-        self.sut_node.bind_ports_to_driver(for_dpdk=False)\n-        self.configure_testbed_ipv4()\n-\n-    def test_os_udp(self) -> None:\n-        \"\"\"Basic UDP IPv4 traffic test case.\n-\n-        Steps:\n-            Send a UDP packet.\n-        Verify:\n-            The packet with proper addresses arrives at the other TG port.\n-        \"\"\"\n-        packet = Ether() / IP() / UDP()\n-\n-        received_packets = self.send_packet_and_capture(packet)\n-\n-        expected_packet = self.get_expected_packet(packet)\n-\n-        self.verify_packets(expected_packet, received_packets)\n-\n-    def tear_down_suite(self) -> None:\n-        \"\"\"Tear down the test suite.\n-\n-        Teardown:\n-            Remove the SUT port configuration configured in setup.\n-        \"\"\"\n-        self.configure_testbed_ipv4(restore=True)\n-        # Assume other suites will likely need dpdk driver\n-        self.sut_node.bind_ports_to_driver(for_dpdk=True)\n",
    "prefixes": [
        "v1"
    ]
}