get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 129104,
    "url": "http://patches.dpdk.org/api/patches/129104/?format=api",
    "web_url": "http://patches.dpdk.org/project/dts/patch/20230629083752.632829-1-weix.ling@intel.com/",
    "project": {
        "id": 3,
        "url": "http://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": "<20230629083752.632829-1-weix.ling@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20230629083752.632829-1-weix.ling@intel.com",
    "date": "2023-06-29T08:37:52",
    "name": "[V2] tests/ntb: add support host and client pic list option in launch_ntb_fwd()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2d862cf6b66355f70d69078ebc457d71d893a378",
    "submitter": {
        "id": 1828,
        "url": "http://patches.dpdk.org/api/people/1828/?format=api",
        "name": "Ling, WeiX",
        "email": "weix.ling@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dts/patch/20230629083752.632829-1-weix.ling@intel.com/mbox/",
    "series": [
        {
            "id": 28707,
            "url": "http://patches.dpdk.org/api/series/28707/?format=api",
            "web_url": "http://patches.dpdk.org/project/dts/list/?series=28707",
            "date": "2023-06-29T08:37:52",
            "name": "[V2] tests/ntb: add support host and client pic list option in launch_ntb_fwd()",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/28707/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/129104/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/129104/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 BCD8442D8A;\n\tThu, 29 Jun 2023 10:38:06 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8DE5C40EDB;\n\tThu, 29 Jun 2023 10:38:06 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 3AA28406B7\n for <dts@dpdk.org>; Thu, 29 Jun 2023 10:38:04 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 29 Jun 2023 01:38:03 -0700",
            "from unknown (HELO dut222..) ([10.239.252.222])\n by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 29 Jun 2023 01:38:01 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1688027885; x=1719563885;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=FKdu5XOCekV5pIBfc+0a505yhMCR51K3jwL1kEE6Llk=;\n b=n/Ca2rmr1Ju7SQJQI6eNRrxEMtPo0RWMzxxWNiW+HKWc5ZXFv/lQIhmh\n 9VH0HN0WGV0Yb3VxGquFTHh8naWknZAnRhPtmySgPNbHVhCJpPWVqxlxx\n D5l4gnRCCi2I814sjyIV2XJO2pdd4HJjuFTwYaby8r6g/xT8mekkP0on1\n PMXr/imyRWjpbcbr8qHJKRXlTRfsghkE5hGp+7VAOky9MW1n9DCcswc9A\n JEhm/AcN8c2O3uJax0/XrKzoYhS2xRy9WfRwe2h0czSbaTbo9bDQ1UNUg\n ehVCL5W6ZwVh+UNphADDDevq7Mt7tZQhzBTP5EFAmY+bpMIYoB+aezs2C w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10755\"; a=\"341636838\"",
            "E=Sophos;i=\"6.01,168,1684825200\"; d=\"scan'208\";a=\"341636838\"",
            "E=McAfee;i=\"6600,9927,10755\"; a=\"752572154\"",
            "E=Sophos;i=\"6.01,168,1684825200\"; d=\"scan'208\";a=\"752572154\""
        ],
        "X-ExtLoop1": "1",
        "From": "Wei Ling <weix.ling@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "Wei Ling <weix.ling@intel.com>",
        "Subject": "[dts][PATCH V2] tests/ntb: add support host and client pic list\n option in launch_ntb_fwd()",
        "Date": "Thu, 29 Jun 2023 16:37:52 +0800",
        "Message-Id": "<20230629083752.632829-1-weix.ling@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "MIME-Version": "1.0",
        "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": "1.TestCase 1 and 2 only need NTB pci, but testcase 3 need NTB pci and\n  NIC pci to start dpdk-ntb app, so modify the launch_ntb_fwd() function\n  to support host_ports and client_ports option.\n\n2.Optimize the send_file_and_verify() to check the print info after\n  execute `ntb> send /tmp/ntb.txt` command on host ntb server and client\n  ntb server to verify the send and receive file sucessed or not.\n\nSigned-off-by: Wei Ling <weix.ling@intel.com>\n---\nv1: \n   1)Add support host and client pic list option in launch_ntb_fwd()\n     function.\n   2)Optimize the send_file_and_verify() to check the print info.\n\nv2:\n   1)Add `-- -i ` to enter the interactive mode when start dpdk-ntb\n     in testsuite sync with testplan.\n   2)Add `--` before params, such as `--buf-size=65407` `--burst=32`\n     in testsuite sync with testplan.\n\n tests/TestSuite_ntb.py | 57 ++++++++++++++++++++++++++++++++----------\n 1 file changed, 44 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/tests/TestSuite_ntb.py b/tests/TestSuite_ntb.py\nindex 38d36689..72121ebd 100644\n--- a/tests/TestSuite_ntb.py\n+++ b/tests/TestSuite_ntb.py\n@@ -114,19 +114,21 @@ class TestNtb(TestCase):\n         ntb = self.get_ntb_port(self.ntb_client)\n         ntb.bind_driver(driver)\n \n-    def launch_ntb_fwd(self, **param):\n+    def launch_ntb_fwd(self, host_ports, client_ports, **param):\n         \"\"\"\n         launch ntb_fwd on ntb host and ntb client\n         \"\"\"\n-        cmd_opt = \" \".join([\"{}={}\".format(key, param[key]) for key in param.keys()])\n+        cmd_opt = \"-- -i \" + \" \".join(\n+            [\"--{}={}\".format(key, param[key]) for key in param.keys()]\n+        )\n \n         self.get_core_list()\n         app = self.dut.apps_name[\"ntb\"]\n         eal_host = self.ntb_host.create_eal_parameters(\n-            cores=self.host_core_list, ports=[self.get_ntb_port(self.ntb_host).pci]\n+            cores=self.host_core_list, ports=host_ports\n         )\n         eal_client = self.ntb_client.create_eal_parameters(\n-            cores=self.client_core_list, ports=[self.get_ntb_port(self.ntb_client).pci]\n+            cores=self.client_core_list, ports=client_ports\n         )\n         host_cmd_line = \" \".join([app, eal_host, cmd_opt])\n         client_cmd_line = \" \".join([app, eal_client, cmd_opt])\n@@ -219,17 +221,34 @@ class TestNtb(TestCase):\n         src_file = \"{}/ntb.txt\".format(self.out_path)\n         base_dir = self.ntb_client.base_dir.replace(\"~\", \"/root\")\n         dst_file = \"{}/ntb_recv_file0\".format(base_dir)\n-        content = \"ntb!123\"\n+        host_content = \"ntb!123\"\n         self.ntb_client.alt_session.send_expect(\"rm {}\".format(dst_file), \"# \")\n         self.ntb_host.alt_session.send_expect(\n-            \"echo '{}' >{}\".format(content, src_file), \"# \"\n+            \"echo '{}' >{}\".format(host_content, src_file), \"# \"\n         )\n-        self.ntb_host.send_expect(\"send {}\".format(src_file), \"ntb> \", 30)\n-        time.sleep(3)\n+        # check the print info after send file on NTB host server\n+        host_out = self.ntb_host.send_expect(\"send {}\".format(src_file), \"ntb> \", 30)\n+        host_reg = (\n+            \"send {}\\r\\r\\nSending file, size is \\d+\\r\\nDone sending file.\".format(\n+                src_file\n+            )\n+        )\n+        host_info = re.findall(host_reg, host_out)\n+        self.verify(len(host_info) == 1, \"Send File FAILED!\")\n+\n+        # check the print info after send file on NTB client server\n+        client_out = self.ntb_client.get_session_output()\n+        client_reg = \" Received file \\(size: \\d+\\) from peer to ntb_recv_file0.\\r\\n\"\n+        client_info = re.findall(client_reg, client_out)\n+        self.verify(len(client_info) == 1, \"Recieve File FAILED!\")\n \n         # Check file received on client.\n-        cnt = self.ntb_client.alt_session.send_expect(\"cat %s\" % dst_file, \"# \")\n-        self.verify(cnt == content, \"the content can't match with the sent\")\n+        client_content = self.ntb_client.alt_session.send_expect(\n+            \"cat %s\" % dst_file, \"# \"\n+        )\n+        self.verify(\n+            client_content == host_content, \"the content can't match with the sent\"\n+        )\n \n     def send_pkg_and_verify(self):\n         for frame_size in self.frame_sizes:\n@@ -255,7 +274,9 @@ class TestNtb(TestCase):\n         self.set_driver(driver)\n         self.ntb_bind_driver(driver)\n \n-        self.launch_ntb_fwd(**{\"buf-size\": 65407})\n+        host_ports = [self.get_ntb_port(self.ntb_host).pci]\n+        client_ports = [self.get_ntb_port(self.ntb_client).pci]\n+        self.launch_ntb_fwd(host_ports, client_ports, **{\"buf-size\": 65407})\n         self.start_ntb_fwd_on_dut(self.ntb_host, fwd_mode=\"file-trans\")\n         self.start_ntb_fwd_on_dut(self.ntb_client, fwd_mode=\"file-trans\")\n         self.send_file_and_verify()\n@@ -265,7 +286,9 @@ class TestNtb(TestCase):\n         self.set_driver(driver)\n         self.ntb_bind_driver(driver)\n \n-        self.launch_ntb_fwd(**{\"buf-size\": 65407})\n+        host_ports = [self.get_ntb_port(self.ntb_host).pci]\n+        client_ports = [self.get_ntb_port(self.ntb_client).pci]\n+        self.launch_ntb_fwd(host_ports, client_ports, **{\"buf-size\": 65407})\n         self.start_ntb_fwd_on_dut(self.ntb_host, fwd_mode=\"rxonly\")\n         self.start_ntb_fwd_on_dut(self.ntb_client, fwd_mode=\"txonly\")\n         time.sleep(1)\n@@ -278,7 +301,15 @@ class TestNtb(TestCase):\n         self.port_bind_driver(driver)\n \n         self.create_table()\n-        self.launch_ntb_fwd(**{\"burst\": 32})\n+        host_ports = [\n+            self.get_ntb_port(self.ntb_host).pci,\n+            self.ntb_host.ports_info[0][\"pci\"],\n+        ]\n+        client_ports = [\n+            self.get_ntb_port(self.ntb_client).pci,\n+            self.ntb_client.ports_info[0][\"pci\"],\n+        ]\n+        self.launch_ntb_fwd(host_ports, client_ports, **{\"burst\": 32})\n         self.start_ntb_fwd_on_dut(self.ntb_host, fwd_mode=\"iofwd\")\n         self.start_ntb_fwd_on_dut(self.ntb_client, fwd_mode=\"iofwd\")\n         self.send_pkg_and_verify()\n",
    "prefixes": [
        "V2"
    ]
}