get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 109803,
    "url": "http://patches.dpdk.org/api/patches/109803/?format=api",
    "web_url": "http://patches.dpdk.org/project/dts/patch/20220419055622.943321-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": "<20220419055622.943321-1-weix.ling@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20220419055622.943321-1-weix.ling@intel.com",
    "date": "2022-04-19T05:56:22",
    "name": "[V1,2/2] tests/vdev_primary_secondary: add hutplut testcase2",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "b37ae52004a8e704e0dbaccc2f5dda7c117816d2",
    "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/20220419055622.943321-1-weix.ling@intel.com/mbox/",
    "series": [
        {
            "id": 22544,
            "url": "http://patches.dpdk.org/api/series/22544/?format=api",
            "web_url": "http://patches.dpdk.org/project/dts/list/?series=22544",
            "date": "2022-04-19T05:56:22",
            "name": "[V1,1/2] test_plans/vdev_primary_secondary_test_plan: add hutplug testcase2",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/22544/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/109803/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/109803/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 DBF32A00C3;\n\tTue, 19 Apr 2022 07:56:34 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AFDE74068E;\n\tTue, 19 Apr 2022 07:56:34 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id 6DF3140150\n for <dts@dpdk.org>; Tue, 19 Apr 2022 07:56:33 +0200 (CEST)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 Apr 2022 22:56:32 -0700",
            "from unknown (HELO localhost.localdomain) ([10.239.251.222])\n by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 Apr 2022 22:56:30 -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=1650347793; x=1681883793;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=+OXWQDgsMfePhItEWIjj0bTYRCysFYg2yGTUg9z9sUs=;\n b=FbHTLzXITIBZmm2/4pcrgcI4eXFB76ulIrmASh74vde+Z50BdDrkxTaM\n awctx6Uo4YBemn2l/CaXYIU5gD11ADjezljHyFyziNezrXnoqIhZUo5mB\n tom77Uwjiz0so3Wg5cLpI5G3VAG54GKcMaUousxvR/EkoB8QpXnDrgWBb\n IZIrtgJf59YtsuRtIbd/vBXM88sNT4Qw4YbtyVdwYobAIgtjgOjNCp/Ke\n TVDdIcucnLDBUud82llE86/NBOhxL87cn6DHKB4VgHEHXzaNyJODVnDes\n MO7rN3YiF4L+TMR0mOmLUPWm3gO18j6cprVtK9ZbKH9AyKnNbaBMFAvN7 A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6400,9594,10321\"; a=\"261287055\"",
            "E=Sophos;i=\"5.90,271,1643702400\"; d=\"scan'208\";a=\"261287055\"",
            "E=Sophos;i=\"5.90,271,1643702400\"; d=\"scan'208\";a=\"529175203\""
        ],
        "From": "Wei Ling <weix.ling@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "Wei Ling <weix.ling@intel.com>",
        "Subject": "[dts][PATCH V1 2/2] tests/vdev_primary_secondary: add hutplut\n testcase2",
        "Date": "Tue, 19 Apr 2022 13:56:22 +0800",
        "Message-Id": "<20220419055622.943321-1-weix.ling@intel.com>",
        "X-Mailer": "git-send-email 2.25.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": "Add hutplut testcase2.\n\nSigned-off-by: Wei Ling <weix.ling@intel.com>\n---\n tests/TestSuite_vdev_primary_secondary.py | 90 ++++++++++++++++++-----\n 1 file changed, 72 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/tests/TestSuite_vdev_primary_secondary.py b/tests/TestSuite_vdev_primary_secondary.py\nindex 7f054cda..e9f08d82 100644\n--- a/tests/TestSuite_vdev_primary_secondary.py\n+++ b/tests/TestSuite_vdev_primary_secondary.py\n@@ -66,6 +66,7 @@ class TestVdevPrimarySecondary(TestCase):\n         self.pci_info = self.dut.ports_info[0][\"pci\"]\n         self.app_testpmd_path = self.dut.apps_name[\"test-pmd\"]\n         self.app_symmetric_mp_path = self.dut.apps_name[\"symmetric_mp\"]\n+        self.app_hotplug_mp_path = self.dut.apps_name[\"hotplug_mp\"]\n         self.testpmd_name = self.app_testpmd_path.split(\"/\")[-1]\n \n     def set_up(self):\n@@ -89,7 +90,7 @@ class TestVdevPrimarySecondary(TestCase):\n             vm_params[\"opt_mac\"] = \"%s%d\" % (self.virtio_mac, i + 2)\n             vm_params[\"opt_queue\"] = self.queues\n             vm_params[\"opt_server\"] = \"server\"\n-            vm_params[\"opt_settings\"] = \"mrg_rxbuf=on,mq=on,vectors=%d\" % (\n+            vm_params[\"opt_settings\"] = \"mrg_rxbuf=on,csum=on,mq=on,vectors=%d\" % (\n                 2 * self.queues + 2\n             )\n             self.vm.set_vm_device(**vm_params)\n@@ -125,11 +126,13 @@ class TestVdevPrimarySecondary(TestCase):\n         )\n         start_cmd = testcmd + eal_params + vdev1 + vdev2 + para\n         self.dut.send_expect(start_cmd, \"testpmd> \", 120)\n+\n+    def send_packets_from_vhost(self):\n         self.dut.send_expect(\"set fwd txonly\", \"testpmd> \", 120)\n         self.dut.send_expect(\"start\", \"testpmd> \", 120)\n \n-    def launch_examples(self):\n-        example_cmd_auto = (\n+    def launch_symmetric_mp(self):\n+        example_cmd_primary = (\n             self.app_symmetric_mp_path\n             + \" -l 0 -n %d --proc-type=auto -- -p 3 --num-procs=%d --proc-id=0\"\n         )\n@@ -137,48 +140,99 @@ class TestVdevPrimarySecondary(TestCase):\n             self.app_symmetric_mp_path\n             + \" -l 1 -n %d --proc-type=secondary -- -p 3 --num-procs=%d --proc-id=1\"\n         )\n-        final_cmd_first = example_cmd_auto % (self.mem_channels, self.queues)\n+        final_cmd_primary = example_cmd_primary % (self.mem_channels, self.queues)\n         final_cmd_secondary = example_cmd_secondary % (self.mem_channels, self.queues)\n-        self.vhost_first.send_expect(final_cmd_first, \"Lcore\", 120)\n+        self.vhost_primary.send_expect(final_cmd_primary, \"Lcore\", 120)\n         time.sleep(3)\n         self.vhost_secondary.send_expect(final_cmd_secondary, \"Lcore\", 120)\n \n+    def launch_hotplug_mp(self):\n+        example_cmd_primary = (\n+            self.app_hotplug_mp_path\n+            + \" -l 0 -n %d --proc-type=auto -- -p 3 --num-procs=%d --proc-id=0\"\n+        )\n+        example_cmd_secondary = (\n+            self.app_hotplug_mp_path\n+            + \" -l 1 -n %d --proc-type=secondary -- -p 3 --num-procs=%d --proc-id=1\"\n+        )\n+        final_cmd_primary = example_cmd_primary % (self.mem_channels, self.queues)\n+        final_cmd_secondary = example_cmd_secondary % (self.mem_channels, self.queues)\n+        self.vhost_primary.send_expect(final_cmd_primary, \"example>\", 120)\n+        time.sleep(3)\n+        self.vhost_secondary.send_expect(final_cmd_secondary, \"example>\", 120)\n+\n+    def check_etherdev(self, dev_list):\n+        primary_out = self.vhost_primary.send_expect(\"list\", \"example\", 120)\n+        for dev in dev_list:\n+            self.verify(dev in primary_out, \"dev {} not in the list\")\n+        secondary_out = self.vhost_secondary.send_expect(\"list\", \"example\", 120)\n+        for dev in dev_list:\n+            self.verify(dev in secondary_out, \"dev {} not in the list\")\n+\n+    def detach_etherdev_from_primary(self, dev_pci):\n+        self.vhost_primary.send_expect(\"detach {}\".format(dev_pci), \"example\", 120)\n+\n+    def attach_etherdev_from_secondary(self, dev_pci):\n+        self.vhost_secondary.send_expect(\"attach {}\".format(dev_pci), \"example\", 120)\n+\n     def prepare_symmetric_mp(self):\n         out = self.vm_dut.build_dpdk_apps(\"./examples/multi_process/symmetric_mp\")\n         self.verify(\"Error\" not in out, \"compilation symmetric_mp error\")\n \n+    def prepare_hotplug_mp(self):\n+        out = self.vm_dut.build_dpdk_apps(\"./examples/multi_process/hotplug_mp\")\n+        self.verify(\"Error\" not in out, \"compilation hotplug_mp error\")\n+\n     def close_session(self):\n-        self.vm_dut.close_session(self.vhost_first)\n+        self.vm_dut.close_session(self.vhost_primary)\n         self.vm_dut.close_session(self.vhost_secondary)\n \n-    def test_Virtio_primary_and_secondary_process(self):\n-        # start testpmd\n+    def test_virtio_primary_and_secondary_process(self):\n         self.launch_testpmd()\n         self.setup_vm_env()\n-        # Modify code\n         self.prepare_symmetric_mp()\n-        # create 2 new session\n-        self.vhost_first = self.vm_dut.new_session(suite=\"vhost_first\")\n+        self.vhost_primary = self.vm_dut.new_session(suite=\"vhost_primary\")\n         self.vhost_secondary = self.vm_dut.new_session(suite=\"vhsot_secondary\")\n-        # start symmetric_mp\n-        self.launch_examples()\n+        self.launch_symmetric_mp()\n+        self.send_packets_from_vhost()\n         time.sleep(3)\n-        vhost_first_out = self.vhost_first.send_expect(\"^c\", \"#\", 15)\n-        print(vhost_first_out)\n+        vhost_primary_out = self.vhost_primary.send_expect(\"^c\", \"#\", 15)\n+        print(vhost_primary_out)\n         time.sleep(3)\n         vhost_secondary_out = self.vhost_secondary.send_expect(\"^c\", \"#\", 15)\n         print(vhost_secondary_out)\n-        result_first = re.findall(r\"Port \\d: RX - (\\w+)\", vhost_first_out)\n+        result_primary = re.findall(r\"Port \\d: RX - (\\w+)\", vhost_primary_out)\n         result_secondary = re.findall(r\"Port \\d: RX - (\\w+)\", vhost_secondary_out)\n         self.verify(\n-            len(result_first[0]) != 0\n-            and len(result_first[1]) != 0\n+            len(result_primary[0]) != 0\n+            and len(result_primary[1]) != 0\n             and len(result_secondary[0]) != 0\n             and len(result_secondary[1]) != 0,\n             \"RX no data\",\n         )\n         self.dut.send_expect(\"quit\", \"#\", 15)\n \n+    def test_virtio_primay_and_secondary_process_hotplug(self):\n+        self.launch_testpmd()\n+        self.setup_vm_env()\n+        self.prepare_hotplug_mp()\n+        self.vhost_primary = self.vm_dut.new_session(suite=\"vhost_primary\")\n+        self.vhost_secondary = self.vm_dut.new_session(suite=\"vhsot_secondary\")\n+        self.launch_hotplug_mp()\n+        vm_ports = []\n+        for pci_info in self.vm_dut.ports_info:\n+            vm_ports.append(pci_info['pci'])\n+        self.check_etherdev(dev_list=vm_ports)\n+        detach_pci = vm_ports[0]\n+        for _ in range(2):\n+            self.detach_etherdev_from_primary(dev_pci=detach_pci)\n+            vm_ports.remove(detach_pci)\n+            self.check_etherdev(dev_list=vm_ports)\n+            self.attach_etherdev_from_secondary(dev_pci=detach_pci)\n+            vm_ports.append(detach_pci)\n+            self.logger.info(vm_ports)\n+            self.check_etherdev(dev_list=vm_ports)\n+\n     def tear_down(self):\n         \"\"\"\n         Run after each test case.\n",
    "prefixes": [
        "V1",
        "2/2"
    ]
}