get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 129536,
    "url": "http://patchwork.dpdk.org/api/patches/129536/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dts/patch/20230714152304.1129546-1-songx.jiale@intel.com/",
    "project": {
        "id": 3,
        "url": "http://patchwork.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": "<20230714152304.1129546-1-songx.jiale@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20230714152304.1129546-1-songx.jiale@intel.com",
    "date": "2023-07-14T15:23:04",
    "name": "[V1] framework/dut: optimize scripts",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "65e693ce67214d1c2f756abd4e9ad3ea4f9f3f6f",
    "submitter": {
        "id": 2352,
        "url": "http://patchwork.dpdk.org/api/people/2352/?format=api",
        "name": "Jiale, SongX",
        "email": "songx.jiale@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dts/patch/20230714152304.1129546-1-songx.jiale@intel.com/mbox/",
    "series": [
        {
            "id": 28939,
            "url": "http://patchwork.dpdk.org/api/series/28939/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dts/list/?series=28939",
            "date": "2023-07-14T15:23:04",
            "name": "[V1] framework/dut: optimize scripts",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/28939/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/129536/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/129536/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 C8DF942E6E;\n\tFri, 14 Jul 2023 09:08:45 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C01D440A81;\n\tFri, 14 Jul 2023 09:08:45 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id 987C240685\n for <dts@dpdk.org>; Fri, 14 Jul 2023 09:08:44 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Jul 2023 00:08:43 -0700",
            "from unknown (HELO dpdk.sh.intel.com) ([10.239.252.241])\n by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Jul 2023 00:08:42 -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=1689318524; x=1720854524;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=UHnjDi5ISxiKFBYhWs+dbytoIJl1psQrimrlj4OkMqU=;\n b=ezjhiMoNmQbVY0KEq/1wEjKuyaHd1e3XfRdoYAm49IYSBrF5D673Gy/f\n d9G9BHiC8/aT4XA9q7XJZZ4luQ1dBHWiRQiqOQ5TH1SLxulQyDrpbLd7+\n CvdjxQ2qlCu8XYrwM+fYJfoS9vQbWIQSQmmdDWOY4agVI8p5sF/nRqWyR\n xPcWkRfzuFIfjh6dLpdKnHd7o1GJsJpPJfYIf3cr0u/r34aN2d61H20oP\n aN66IYgSgRsW3vo1GCsf28hhPUG9dZd1R17y547edYCYrnAPk14Ali6fT\n qs5U8gylUEJ5bxn2q0MnmpC7reYmnvjwg+zapWmFmQPWXInPqTqx+2iJ9 w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10770\"; a=\"355347393\"",
            "E=Sophos;i=\"6.01,204,1684825200\"; d=\"scan'208\";a=\"355347393\"",
            "E=McAfee;i=\"6600,9927,10770\"; a=\"757473597\"",
            "E=Sophos;i=\"6.01,204,1684825200\"; d=\"scan'208\";a=\"757473597\""
        ],
        "X-ExtLoop1": "1",
        "From": "Jiale Song <songx.jiale@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "Jiale Song <songx.jiale@intel.com>",
        "Subject": "[dts] [PATCH V1] framework/dut: optimize scripts",
        "Date": "Fri, 14 Jul 2023 23:23:04 +0800",
        "Message-Id": "<20230714152304.1129546-1-songx.jiale@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": "1. delete unnecessary waiting time. the iavf driver does not need to\nexecute a separate wait, which is invalid and only increases the invalid\nwaiting time.\n2. when the NIC name is N/A or empty, the name cannot be changed no\nmatter how long it is waiting. after obtaining N/A, it is necessary to\nrebind the driver of the NIC.\n\nSigned-off-by: Jiale Song <songx.jiale@intel.com>\n---\n framework/dut.py | 48 +++++++++++++++---------------------------------\n 1 file changed, 15 insertions(+), 33 deletions(-)",
    "diff": "diff --git a/framework/dut.py b/framework/dut.py\nindex 0adb2786..61ef2839 100644\n--- a/framework/dut.py\n+++ b/framework/dut.py\n@@ -416,50 +416,32 @@ class Dut(Crb):\n \n                 port = GetNicObj(self, domain_id, bus_id, devfun_id)\n \n-                self.send_expect(\n-                    \"echo %s > /sys/bus/pci/devices/%s\\:%s\\:%s/driver/unbind\"\n-                    % (pci_bus, domain_id, bus_id, devfun_id),\n-                    \"# \",\n-                    timeout=30,\n-                )\n-                # bind to linux kernel driver\n-                if not self.is_container:\n-                    self.send_expect(\"modprobe %s\" % driver, \"# \", timeout=30)\n-                self.send_expect(\n-                    \"echo %s > /sys/bus/pci/drivers/%s/bind\" % (pci_bus, driver),\n-                    \"# \",\n-                    timeout=30,\n-                )\n                 pull_retries = 5\n                 itf = \"N/A\"\n                 while pull_retries > 0:\n+                    self.send_expect(\n+                        \"echo %s > /sys/bus/pci/devices/%s\\:%s\\:%s/driver/unbind\"\n+                        % (pci_bus, domain_id, bus_id, devfun_id),\n+                        \"# \",\n+                        timeout=30,\n+                    )\n+                    # bind to linux kernel driver\n+                    if not self.is_container:\n+                        self.send_expect(\"modprobe %s\" % driver, \"# \", timeout=30)\n+                    self.send_expect(\n+                        \"echo %s > /sys/bus/pci/drivers/%s/bind\" % (pci_bus, driver),\n+                        \"# \",\n+                        timeout=30,\n+                    )\n+                    time.sleep(1)\n                     if port_info[\"port_id\"] == 1:\n                         itf = port.get_interface_name()\n                     else:\n                         itf = port.get_interface2_name()\n                     if not itf or itf == \"N/A\":\n-                        time.sleep(1)\n                         pull_retries -= 1\n                     else:\n                         break\n-                else:\n-                    # try to bind nic with iavf\n-                    if driver == \"iavf\":\n-                        self.send_expect(\"modprobe %s\" % driver, \"# \")\n-                        self.send_expect(\n-                            \"echo %s > /sys/bus/pci/drivers/%s/bind\"\n-                            % (pci_bus, driver),\n-                            \"# \",\n-                        )\n-                        pull_retries = 5\n-                        itf = \"N/A\"\n-                        while pull_retries > 0:\n-                            itf = port.get_interface_name()\n-                            if not itf or itf == \"N/A\":\n-                                time.sleep(1)\n-                                pull_retries -= 1\n-                            else:\n-                                break\n                 if itf == \"N/A\":\n                     self.logger.warning(\"Fail to bind the device with the linux driver\")\n                 else:\n",
    "prefixes": [
        "V1"
    ]
}