get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 121775,
    "url": "https://patches.dpdk.org/api/patches/121775/?format=api",
    "web_url": "https://patches.dpdk.org/project/dts/patch/20230110164431.19390-4-hongbox.li@intel.com/",
    "project": {
        "id": 3,
        "url": "https://patches.dpdk.org/api/projects/3/?format=api",
        "name": "DTS",
        "link_name": "dts",
        "list_id": "dts.dpdk.org",
        "list_email": "dts@dpdk.org",
        "web_url": "",
        "scm_url": "git://dpdk.org/tools/dts",
        "webscm_url": "http://git.dpdk.org/tools/dts/",
        "list_archive_url": "https://inbox.dpdk.org/dts",
        "list_archive_url_format": "https://inbox.dpdk.org/dts/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230110164431.19390-4-hongbox.li@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20230110164431.19390-4-hongbox.li@intel.com",
    "date": "2023-01-10T16:44:26",
    "name": "[V3,3/8] tests/tso: split performance plan and suite",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "8b08aba1838266076719b61c4ac3c63c084d521f",
    "submitter": {
        "id": 2804,
        "url": "https://patches.dpdk.org/api/people/2804/?format=api",
        "name": "Li, HongboX",
        "email": "hongbox.li@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dts/patch/20230110164431.19390-4-hongbox.li@intel.com/mbox/",
    "series": [
        {
            "id": 26458,
            "url": "https://patches.dpdk.org/api/series/26458/?format=api",
            "web_url": "https://patches.dpdk.org/project/dts/list/?series=26458",
            "date": "2023-01-10T16:44:23",
            "name": "split performance plan and suite",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/26458/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/121775/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/121775/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dts-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 55D10423A1;\n\tTue, 10 Jan 2023 09:24:59 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4B87540E6E;\n\tTue, 10 Jan 2023 09:24:59 +0100 (CET)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by mails.dpdk.org (Postfix) with ESMTP id 3292440689\n for <dts@dpdk.org>; Tue, 10 Jan 2023 09:24:57 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 10 Jan 2023 00:24:56 -0800",
            "from unknown (HELO cvl_100g_103.icx.intel.com) ([10.239.252.93])\n by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 10 Jan 2023 00:24:55 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1673339097; x=1704875097;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=pskFys0f8Hc/kvJ77pZrHYkmk+OjoV9KIceVgLzX38Q=;\n b=er5x2hDsCrnQu3haw78GzYQLvQEgq6O6byTHy/HswrAqAzTm0N1Kpjq8\n 1tWmbAvPtjdvqgHMMpWJZdCPlTAyZ7YV4zH63wnrSsZlNlP2R3zMt0Env\n OderxkVFF3nowzjr2ZYjydwjXyQrKZP0hK72D9i+2HrKa5s1v9oSRagea\n FMM5/LA4jxQSKjscc+9mpei4bdPeIaloIU+8GSi5TySQI9D70+hpP9Udx\n RinrR1p7Buj9/B4WA7BPcIM5uYTHjlAmLDGZ0n/ier3CDe1C78AeL4OLL\n E9V6erTdRI29lygrBILiNChmxdzpwqsmonsCsDHQUNHdjTcB9+f74Dv7R w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10585\"; a=\"387543501\"",
            "E=Sophos;i=\"5.96,314,1665471600\"; d=\"scan'208\";a=\"387543501\"",
            "E=McAfee;i=\"6500,9779,10585\"; a=\"799339213\"",
            "E=Sophos;i=\"5.96,314,1665471600\"; d=\"scan'208\";a=\"799339213\""
        ],
        "From": "Hongbo Li <hongbox.li@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "Hongbo Li <hongbox.li@intel.com>",
        "Subject": "[dts][PATCH V3 3/8] tests/tso: split performance plan and suite",
        "Date": "Wed, 11 Jan 2023 00:44:26 +0800",
        "Message-Id": "<20230110164431.19390-4-hongbox.li@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20230110164431.19390-1-hongbox.li@intel.com>",
        "References": "<20230110164431.19390-1-hongbox.li@intel.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dts@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "test suite reviews and discussions <dts.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dts>,\n <mailto:dts-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dts/>",
        "List-Post": "<mailto:dts@dpdk.org>",
        "List-Help": "<mailto:dts-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dts>,\n <mailto:dts-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dts-bounces@dpdk.org"
    },
    "content": "split performance plan and suite\n\nSigned-off-by: Hongbo Li <hongbox.li@intel.com>\n---\n test_plans/perf_tso_test_plan.rst |  87 +++++++++\n test_plans/tso_test_plan.rst      |  34 ----\n tests/TestSuite_perf_tso.py       | 302 ++++++++++++++++++++++++++++++\n tests/TestSuite_tso.py            | 113 -----------\n 4 files changed, 389 insertions(+), 147 deletions(-)\n create mode 100644 test_plans/perf_tso_test_plan.rst\n create mode 100644 tests/TestSuite_perf_tso.py",
    "diff": "diff --git a/test_plans/perf_tso_test_plan.rst b/test_plans/perf_tso_test_plan.rst\nnew file mode 100644\nindex 00000000..026291ca\n--- /dev/null\n+++ b/test_plans/perf_tso_test_plan.rst\n@@ -0,0 +1,87 @@\n+.. SPDX-License-Identifier: BSD-3-Clause\n+   Copyright(c) 2015-2017 Intel Corporation\n+\n+=========================================\n+Transmit Segmentation Offload (TSO) Tests\n+=========================================\n+\n+Description\n+===========\n+\n+This document provides the plan for testing the TSO (Transmit Segmentation\n+Offload, also called Large Send offload - LSO) feature of\n+Intel Ethernet Controller, including Intel 82599 10GbE Ethernet Controller and\n+Intel® Ethernet Converged Network Adapter XL710-QDA2. TSO enables the TCP/IP stack to\n+pass to the network device a larger ULP datagram than the Maximum Transmit\n+Unit Size (MTU). NIC divides the large ULP datagram to multiple segments\n+according to the MTU size.\n+\n+\n+Prerequisites\n+=============\n+\n+Hardware:\n+   Intel® Ethernet 700 Series, Intel® Ethernet 800 Series and 82599/500 Series\n+\n+The DUT must take one of the Ethernet controller ports connected to a port on another\n+device that is controlled by the Scapy packet generator.\n+\n+The Ethernet interface identifier of the port that Scapy will use must be known.\n+On tester, all offload feature should be disabled on tx port, and start rx port capture::\n+\n+  ifconfig <tx port> mtu 9000\n+  ethtool -K <tx port> rx off tx off tso off gso off gro off lro off\n+  ip l set <tx port> up\n+  tcpdump -n -e -i <rx port> -s 0 -w /tmp/cap\n+\n+\n+On DUT, run pmd with parameter \"--enable-rx-cksum\". Then enable TSO on tx port\n+and checksum on rx port. The test commands is below::\n+\n+  #enable hw checksum on rx port\n+  csum set ip hw 0\n+  csum set udp hw 0\n+  csum set tcp hw 0\n+  csum set sctp hw 0\n+  set fwd csum\n+\n+  # enable TSO on tx port\n+  *tso set 800 1\n+\n+\n+\n+Test case: TSO performance\n+==========================\n+\n+Set the packet stream to be sent out from packet generator before testing as\n+below.\n+\n++-------+---------+---------+---------+----------+----------+\n+| Frame | 1S/1C/1T| 1S/1C/1T| 1S/2C/1T| 1S/2C/2T | 1S/2C/2T |\n+| Size  |         |         |         |          |          |\n++-------+---------+---------+---------+----------+----------+\n+|  64   |         |         |         |          |          |\n++-------+---------+---------+---------+----------+----------+\n+|  65   |         |         |         |          |          |\n++-------+---------+---------+---------+----------+----------+\n+|  128  |         |         |         |          |          |\n++-------+---------+---------+---------+----------+----------+\n+|  256  |         |         |         |          |          |\n++-------+---------+---------+---------+----------+----------+\n+|  512  |         |         |         |          |          |\n++-------+---------+---------+---------+----------+----------+\n+|  1024 |         |         |         |          |          |\n++-------+---------+---------+---------+----------+----------+\n+|  1280 |         |         |         |          |          |\n++-------+---------+---------+---------+----------+----------+\n+|  1518 |         |         |         |          |          |\n++-------+---------+---------+---------+----------+----------+\n+\n+Then run the test application as below::\n+\n+   ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xffffffff -n 2 -- -i --rxd=512 --txd=512\n+   --burst=32 --rxfreet=64 --mbcache=128 --portmask=0x3 --txpt=36 --txht=0 --txwt=0\n+   --txfreet=32 --txrst=32 --enable-rx-cksum\n+\n+The -n command is used to select the number of memory channels. It should match the\n+number of memory channels on that setup.\ndiff --git a/test_plans/tso_test_plan.rst b/test_plans/tso_test_plan.rst\nindex e5122bb9..a44d6eba 100644\n--- a/test_plans/tso_test_plan.rst\n+++ b/test_plans/tso_test_plan.rst\n@@ -161,38 +161,4 @@ Test nvgre() in scapy::\n \n     sendp([Ether(dst=\"%s\",src=\"52:00:00:00:00:00\")/IP(src=\"192.168.1.1\",dst=\"192.168.1.2\",proto=47)/GRE(key_present=1,proto=0x6558,key=0x00001000)/Ether(dst=\"%s\",src=\"52:00:00:00:00:00\")/IP(src=\"192.168.1.1\",dst=\"192.168.1.2\")/TCP(sport=1021,dport=1021)/(\"X\"*%s)], iface=\"%s\")\n \n-Test case: TSO performance\n-==========================\n-\n-Set the packet stream to be sent out from packet generator before testing as\n-below.\n-\n-+-------+---------+---------+---------+----------+----------+\n-| Frame | 1S/1C/1T| 1S/1C/1T| 1S/2C/1T| 1S/2C/2T | 1S/2C/2T |\n-| Size  |         |         |         |          |          |\n-+-------+---------+---------+---------+----------+----------+\n-|  64   |         |         |         |          |          |\n-+-------+---------+---------+---------+----------+----------+\n-|  65   |         |         |         |          |          |\n-+-------+---------+---------+---------+----------+----------+\n-|  128  |         |         |         |          |          |\n-+-------+---------+---------+---------+----------+----------+\n-|  256  |         |         |         |          |          |\n-+-------+---------+---------+---------+----------+----------+\n-|  512  |         |         |         |          |          |\n-+-------+---------+---------+---------+----------+----------+\n-|  1024 |         |         |         |          |          |\n-+-------+---------+---------+---------+----------+----------+\n-|  1280 |         |         |         |          |          |\n-+-------+---------+---------+---------+----------+----------+\n-|  1518 |         |         |         |          |          |\n-+-------+---------+---------+---------+----------+----------+\n-\n-Then run the test application as below::\n \n-   ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xffffffff -n 2 -- -i --rxd=512 --txd=512\n-   --burst=32 --rxfreet=64 --mbcache=128 --portmask=0x3 --txpt=36 --txht=0 --txwt=0\n-   --txfreet=32 --txrst=32 --enable-rx-cksum\n-\n-The -n command is used to select the number of memory channels. It should match the\n-number of memory channels on that setup.\ndiff --git a/tests/TestSuite_perf_tso.py b/tests/TestSuite_perf_tso.py\nnew file mode 100644\nindex 00000000..95933307\n--- /dev/null\n+++ b/tests/TestSuite_perf_tso.py\n@@ -0,0 +1,302 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2010-2014 Intel Corporation\n+#\n+\n+\"\"\"\n+DPDK Test suite.\n+\n+Tests for TSO.\n+\n+\"\"\"\n+import os\n+import re\n+import time\n+\n+import framework.utils as utils\n+from framework.packet import Packet\n+from framework.pktgen import PacketGeneratorHelper\n+from framework.settings import HEADER_SIZE\n+from framework.test_case import TestCase\n+\n+DEFAULT_MUT = 1500\n+TSO_MTU = 9000\n+\n+\n+class TestTSO(TestCase):\n+    dut_ports = []\n+\n+    def set_up_all(self):\n+        \"\"\"\n+        Run at the start of each test suite.\n+        \"\"\"\n+        # Based on h/w type, choose how many ports to use\n+        self.dut_ports = self.dut.get_ports(self.nic)\n+\n+        # Verify that enough ports are available\n+        self.verify(len(self.dut_ports) >= 2, \"Insufficient ports for testing\")\n+\n+        # Verify that enough threads are available\n+        self.portMask = utils.create_mask([self.dut_ports[0], self.dut_ports[1]])\n+        self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])\n+        core_config = \"1S/2C/1T\"\n+        cores = self.dut.get_core_list(core_config, socket=self.ports_socket)\n+        self.verify(cores is not None, \"Insufficient cores for speed testing\")\n+\n+        self.loading_sizes = [128, 800, 801, 1700, 2500]\n+\n+        self.test_result = {\"header\": [], \"data\": []}\n+\n+        self.eal_param = self.dut.create_eal_parameters(\n+            cores=core_config, socket=self.ports_socket, ports=self.dut_ports\n+        )\n+        self.headers_size = HEADER_SIZE[\"eth\"] + HEADER_SIZE[\"ip\"] + HEADER_SIZE[\"tcp\"]\n+\n+        self.tester.send_expect(\n+            \"ifconfig %s mtu %s\"\n+            % (\n+                self.tester.get_interface(\n+                    self.tester.get_local_port(self.dut_ports[0])\n+                ),\n+                TSO_MTU,\n+            ),\n+            \"# \",\n+        )\n+        # get dts output path\n+        if self.logger.log_path.startswith(os.sep):\n+            self.output_path = self.logger.log_path\n+        else:\n+            cur_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))\n+            self.output_path = os.sep.join([cur_path, self.logger.log_path])\n+        # create an instance to set stream field setting\n+        self.pktgen_helper = PacketGeneratorHelper()\n+        self.path = self.dut.apps_name[\"test-pmd\"]\n+\n+    def set_up(self):\n+        \"\"\"\n+        Run before each test case.\n+        \"\"\"\n+        pass\n+\n+    def tcpdump_start_sniffing(self, ifaces=[]):\n+        \"\"\"\n+        Starts tcpdump in the background to sniff the tester interface where\n+        the packets are transmitted to and from the self.dut.\n+        All the captured packets are going to be stored in a file for a\n+        post-analysis.\n+        \"\"\"\n+\n+        for iface in ifaces:\n+            command = (\n+                \"tcpdump -w /tmp/tcpdump_{0}.pcap -i {0} 2>tcpdump_{0}.out &\"\n+            ).format(iface)\n+            del_cmd = (\"rm -f /tmp/tcpdump_{0}.pcap\").format(iface)\n+            self.tester.send_expect(del_cmd, \"#\")\n+            self.tester.send_expect(command, \"#\")\n+\n+    def tcpdump_stop_sniff(self):\n+        \"\"\"\n+        Stops the tcpdump process running in the background.\n+        \"\"\"\n+        self.tester.send_expect(\"killall tcpdump\", \"#\")\n+        time.sleep(1)\n+        self.tester.send_expect('echo \"Cleaning buffer\"', \"#\")\n+        time.sleep(1)\n+\n+    def tcpdump_command(self, command):\n+        \"\"\"\n+        Sends a tcpdump related command and returns an integer from the output\n+        \"\"\"\n+\n+        result = self.tester.send_expect(command, \"#\")\n+        return int(result.strip())\n+\n+    def number_of_packets(self, iface):\n+        \"\"\"\n+        By reading the file generated by tcpdump it counts how many packets were\n+        forwarded by the sample app and received in the self.tester. The sample app\n+        will add a known MAC address for the test to look for.\n+        \"\"\"\n+\n+        command = (\n+            \"tcpdump -A -nn -e -v -r /tmp/tcpdump_{iface}.pcap 2>/dev/null | \"\n+            + 'grep -c \"seq\"'\n+        )\n+        return self.tcpdump_command(command.format(**locals()))\n+\n+    def tcpdump_scanner(self, scanner):\n+        \"\"\"\n+        Execute scanner to return results\n+        \"\"\"\n+        scanner_result = self.tester.send_expect(scanner, \"#\", 60)\n+        fially_result = re.findall(r\"length( \\d+)\", scanner_result)\n+        return list(fially_result)\n+\n+    def number_of_bytes(self, iface):\n+        \"\"\"\n+        Get the length of loading_sizes\n+        \"\"\"\n+        scanner = 'tcpdump  -vv -r /tmp/tcpdump_{iface}.pcap 2>/dev/null | grep \"seq\"  | grep \"length\"'\n+        return self.tcpdump_scanner(scanner.format(**locals()))\n+\n+    def get_chksum_value_and_verify(self, dump_pcap, Nic_list):\n+        packet = Packet()\n+        pkts = packet.read_pcapfile(dump_pcap, self.tester)\n+        for pkt in pkts:\n+            chksum_list_rx = re.findall(r\"chksum\\s*=\\s*(0x\\w+)\", pkt.show(dump=True))\n+            pkt[\"IP\"].chksum = None\n+            if \"VXLAN\" in pkt:\n+                pkt[\"UDP\"].chksum = None\n+                pkt[\"VXLAN\"][\"IP\"].chksum = None\n+                pkt[\"VXLAN\"][\"TCP\"].chksum = None\n+            elif \"GRE\" in pkt:\n+                pkt[\"GRE\"][\"IP\"].chksum = None\n+                pkt[\"GRE\"][\"TCP\"].chksum = None\n+            chksum_list_good = re.findall(r\"chksum\\s*=\\s*(0x\\w+)\", pkt.show2(dump=True))\n+            if self.nic in Nic_list and \"VXLAN\" in pkt:\n+                self.verify(\n+                    chksum_list_rx[0] == chksum_list_good[0]\n+                    and chksum_list_rx[2] == chksum_list_good[2]\n+                    and chksum_list_rx[3] == chksum_list_good[3],\n+                    \"The obtained chksum value is incorrect.\",\n+                )\n+            else:\n+                self.verify(\n+                    chksum_list_rx == chksum_list_good,\n+                    \"The obtained chksum value is incorrect.\",\n+                )\n+\n+    def test_perf_TSO_2ports(self):\n+        \"\"\"\n+        TSO Performance Benchmarking with 2 ports.\n+        \"\"\"\n+\n+        # set header table\n+        header_row = [\"Fwd Core\", \"Frame Size\", \"Throughput\", \"Rate\"]\n+        self.test_result[\"header\"] = header_row\n+        self.result_table_create(header_row)\n+        self.test_result[\"data\"] = []\n+\n+        test_configs = [\"1S/1C/1T\", \"1S/1C/2T\", \"1S/2C/2T\"]\n+        core_offset = 3\n+        # prepare traffic generator input\n+        tgen_input = []\n+\n+        # run testpmd for each core config\n+        for configs in test_configs:\n+            cores = configs.split(\"/\")[1]\n+            thread = configs.split(\"/\")[-1]\n+            thread_num = int(int(thread[:-1]) // int(cores[:-1]))\n+            _cores = str(core_offset + int(cores[0])) + \"C\"\n+            core_config = \"/\".join([\"1S\", _cores, str(thread_num) + \"T\"])\n+            corelist = self.dut.get_core_list(core_config, self.ports_socket)\n+            core_list = corelist[(core_offset - 1) * thread_num :]\n+            if \"2T\" in core_config:\n+                core_list = core_list[1:2] + core_list[0::2] + core_list[1::2][1:]\n+            _core_list = core_list[thread_num - 1 :]\n+            self.eal_param = self.dut.create_eal_parameters(\n+                cores=_core_list, socket=self.ports_socket, ports=self.dut_ports\n+            )\n+            command_line = (\n+                \"%s %s -- -i --rxd=512 --txd=512 --burst=32 --rxfreet=64 --mbcache=128 --portmask=%s --max-pkt-len=%s --txpt=36 --txht=0 --txwt=0 --txfreet=32 --txrst=32 \"\n+                % (self.path, self.eal_param, self.portMask, TSO_MTU)\n+            )\n+            info = \"Executing PMD using cores: {0} of config {1}\".format(\n+                _core_list, configs\n+            )\n+            self.logger.info(info)\n+            self.dut.send_expect(command_line, \"testpmd> \", 120)\n+            self.dut.send_expect(\"port stop all\", \"testpmd> \", 120)\n+            for i in range(2):\n+                self.dut.send_expect(\n+                    \"csum set ip hw %d\" % self.dut_ports[i], \"testpmd> \", 120\n+                )\n+                self.dut.send_expect(\n+                    \"csum set udp hw %d\" % self.dut_ports[i], \"testpmd> \", 120\n+                )\n+                self.dut.send_expect(\n+                    \"csum set tcp hw %d\" % self.dut_ports[i], \"testpmd> \", 120\n+                )\n+                self.dut.send_expect(\n+                    \"csum set sctp hw %d\" % self.dut_ports[i], \"testpmd> \", 120\n+                )\n+                self.dut.send_expect(\n+                    \"csum set outer-ip hw %d\" % self.dut_ports[i], \"testpmd> \", 120\n+                )\n+                self.dut.send_expect(\n+                    \"csum parse-tunnel on %d\" % self.dut_ports[i], \"testpmd> \", 120\n+                )\n+            self.dut.send_expect(\"tso set 800 %d\" % self.dut_ports[1], \"testpmd> \", 120)\n+            self.dut.send_expect(\"set fwd csum\", \"testpmd> \", 120)\n+            self.dut.send_expect(\"port start all\", \"testpmd> \", 120)\n+            self.dut.send_expect(\"set promisc all off\", \"testpmd> \", 120)\n+            self.dut.send_expect(\"start\", \"testpmd> \")\n+            for loading_size in self.loading_sizes:\n+                frame_size = loading_size + self.headers_size\n+                wirespeed = self.wirespeed(self.nic, frame_size, 2)\n+\n+                # create pcap file\n+                self.logger.info(\"Running with frame size %d \" % frame_size)\n+                payload_size = frame_size - self.headers_size\n+                for _port in range(2):\n+                    mac = self.dut.get_mac_address(self.dut_ports[_port])\n+\n+                    pcap = os.sep.join([self.output_path, \"dts{0}.pcap\".format(_port)])\n+                    self.tester.scapy_append(\n+                        'wrpcap(\"%s\", [Ether(dst=\"%s\",src=\"52:00:00:00:00:01\")/IP(src=\"192.168.1.1\",dst=\"192.168.1.2\")/TCP(sport=1021,dport=1021)/(\"X\"*%d)])'\n+                        % (pcap, mac, payload_size)\n+                    )\n+                    tgen_input.append(\n+                        (\n+                            self.tester.get_local_port(self.dut_ports[_port]),\n+                            self.tester.get_local_port(self.dut_ports[1 - _port]),\n+                            \"%s\" % pcap,\n+                        )\n+                    )\n+                self.tester.scapy_execute()\n+\n+                # clear streams before add new streams\n+                self.tester.pktgen.clear_streams()\n+                # run packet generator\n+                streams = self.pktgen_helper.prepare_stream_from_tginput(\n+                    tgen_input, 100, None, self.tester.pktgen\n+                )\n+                _, pps = self.tester.pktgen.measure_throughput(stream_ids=streams)\n+                self.verify(pps > 0, \"No traffic detected\")\n+                pps /= 1000000.0\n+                percentage = pps * 100 / wirespeed\n+                data_row = [\n+                    configs,\n+                    frame_size,\n+                    \"{:.3f} Mpps\".format(pps),\n+                    \"{:.3f}%\".format(percentage),\n+                ]\n+                self.result_table_add(data_row)\n+            self.dut.send_expect(\"stop\", \"testpmd> \")\n+            self.dut.send_expect(\"quit\", \"# \", 30)\n+            time.sleep(5)\n+\n+        # Print results\n+        self.result_table_print()\n+\n+    def tear_down(self):\n+        \"\"\"\n+        Run after each test case.\n+        \"\"\"\n+        self.dut.send_expect(\"quit\", \"# \")\n+        self.dut.kill_all()\n+        time.sleep(2)\n+\n+    def tear_down_all(self):\n+        \"\"\"\n+        Run after each test suite.\n+        \"\"\"\n+        self.tester.send_expect(\n+            \"ifconfig %s mtu %s\"\n+            % (\n+                self.tester.get_interface(\n+                    self.tester.get_local_port(self.dut_ports[0])\n+                ),\n+                DEFAULT_MUT,\n+            ),\n+            \"# \",\n+        )\ndiff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py\nindex 8cbd7a70..acefbec1 100755\n--- a/tests/TestSuite_tso.py\n+++ b/tests/TestSuite_tso.py\n@@ -454,119 +454,6 @@ class TestTSO(TestCase):\n                     )\n             self.get_chksum_value_and_verify(dump_pcap, Nic_list)\n \n-    def test_perf_TSO_2ports(self):\n-        \"\"\"\n-        TSO Performance Benchmarking with 2 ports.\n-        \"\"\"\n-\n-        # set header table\n-        header_row = [\"Fwd Core\", \"Frame Size\", \"Throughput\", \"Rate\"]\n-        self.test_result[\"header\"] = header_row\n-        self.result_table_create(header_row)\n-        self.test_result[\"data\"] = []\n-\n-        test_configs = [\"1S/1C/1T\", \"1S/1C/2T\", \"1S/2C/2T\"]\n-        core_offset = 3\n-        # prepare traffic generator input\n-        tgen_input = []\n-\n-        # run testpmd for each core config\n-        for configs in test_configs:\n-            cores = configs.split(\"/\")[1]\n-            thread = configs.split(\"/\")[-1]\n-            thread_num = int(int(thread[:-1]) // int(cores[:-1]))\n-            _cores = str(core_offset + int(cores[0])) + \"C\"\n-            core_config = \"/\".join([\"1S\", _cores, str(thread_num) + \"T\"])\n-            corelist = self.dut.get_core_list(core_config, self.ports_socket)\n-            core_list = corelist[(core_offset - 1) * thread_num :]\n-            if \"2T\" in core_config:\n-                core_list = core_list[1:2] + core_list[0::2] + core_list[1::2][1:]\n-            _core_list = core_list[thread_num - 1 :]\n-            self.eal_param = self.dut.create_eal_parameters(\n-                cores=_core_list, socket=self.ports_socket, ports=self.dut_ports\n-            )\n-            command_line = (\n-                \"%s %s -- -i --rxd=512 --txd=512 --burst=32 --rxfreet=64 --mbcache=128 --portmask=%s --max-pkt-len=%s --txpt=36 --txht=0 --txwt=0 --txfreet=32 --txrst=32 \"\n-                % (self.path, self.eal_param, self.portMask, TSO_MTU)\n-            )\n-            info = \"Executing PMD using cores: {0} of config {1}\".format(\n-                _core_list, configs\n-            )\n-            self.logger.info(info)\n-            self.dut.send_expect(command_line, \"testpmd> \", 120)\n-            self.dut.send_expect(\"port stop all\", \"testpmd> \", 120)\n-            for i in range(2):\n-                self.dut.send_expect(\n-                    \"csum set ip hw %d\" % self.dut_ports[i], \"testpmd> \", 120\n-                )\n-                self.dut.send_expect(\n-                    \"csum set udp hw %d\" % self.dut_ports[i], \"testpmd> \", 120\n-                )\n-                self.dut.send_expect(\n-                    \"csum set tcp hw %d\" % self.dut_ports[i], \"testpmd> \", 120\n-                )\n-                self.dut.send_expect(\n-                    \"csum set sctp hw %d\" % self.dut_ports[i], \"testpmd> \", 120\n-                )\n-                self.dut.send_expect(\n-                    \"csum set outer-ip hw %d\" % self.dut_ports[i], \"testpmd> \", 120\n-                )\n-                self.dut.send_expect(\n-                    \"csum parse-tunnel on %d\" % self.dut_ports[i], \"testpmd> \", 120\n-                )\n-            self.dut.send_expect(\"tso set 800 %d\" % self.dut_ports[1], \"testpmd> \", 120)\n-            self.dut.send_expect(\"set fwd csum\", \"testpmd> \", 120)\n-            self.dut.send_expect(\"port start all\", \"testpmd> \", 120)\n-            self.dut.send_expect(\"set promisc all off\", \"testpmd> \", 120)\n-            self.dut.send_expect(\"start\", \"testpmd> \")\n-            for loading_size in self.loading_sizes:\n-                frame_size = loading_size + self.headers_size\n-                wirespeed = self.wirespeed(self.nic, frame_size, 2)\n-\n-                # create pcap file\n-                self.logger.info(\"Running with frame size %d \" % frame_size)\n-                payload_size = frame_size - self.headers_size\n-                for _port in range(2):\n-                    mac = self.dut.get_mac_address(self.dut_ports[_port])\n-\n-                    pcap = os.sep.join([self.output_path, \"dts{0}.pcap\".format(_port)])\n-                    self.tester.scapy_append(\n-                        'wrpcap(\"%s\", [Ether(dst=\"%s\",src=\"52:00:00:00:00:01\")/IP(src=\"192.168.1.1\",dst=\"192.168.1.2\")/TCP(sport=1021,dport=1021)/(\"X\"*%d)])'\n-                        % (pcap, mac, payload_size)\n-                    )\n-                    tgen_input.append(\n-                        (\n-                            self.tester.get_local_port(self.dut_ports[_port]),\n-                            self.tester.get_local_port(self.dut_ports[1 - _port]),\n-                            \"%s\" % pcap,\n-                        )\n-                    )\n-                self.tester.scapy_execute()\n-\n-                # clear streams before add new streams\n-                self.tester.pktgen.clear_streams()\n-                # run packet generator\n-                streams = self.pktgen_helper.prepare_stream_from_tginput(\n-                    tgen_input, 100, None, self.tester.pktgen\n-                )\n-                _, pps = self.tester.pktgen.measure_throughput(stream_ids=streams)\n-                self.verify(pps > 0, \"No traffic detected\")\n-                pps /= 1000000.0\n-                percentage = pps * 100 / wirespeed\n-                data_row = [\n-                    configs,\n-                    frame_size,\n-                    \"{:.3f} Mpps\".format(pps),\n-                    \"{:.3f}%\".format(percentage),\n-                ]\n-                self.result_table_add(data_row)\n-            self.dut.send_expect(\"stop\", \"testpmd> \")\n-            self.dut.send_expect(\"quit\", \"# \", 30)\n-            time.sleep(5)\n-\n-        # Print results\n-        self.result_table_print()\n-\n     def tear_down(self):\n         \"\"\"\n         Run after each test case.\n",
    "prefixes": [
        "V3",
        "3/8"
    ]
}