get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 119816,
    "url": "http://patches.dpdk.org/api/patches/119816/?format=api",
    "web_url": "http://patches.dpdk.org/project/dts/patch/20221114072704.124179-1-hongbox.li@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": "<20221114072704.124179-1-hongbox.li@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20221114072704.124179-1-hongbox.li@intel.com",
    "date": "2022-11-14T07:27:04",
    "name": "[V1] tests/TestSuite_ice_iavf_fdir:ensure that the environment can be cleaned up after an exception occurs in the case",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "f713c36a5464c3e2494bac1e4d3a7c8e75040652",
    "submitter": {
        "id": 2804,
        "url": "http://patches.dpdk.org/api/people/2804/?format=api",
        "name": "Li, HongboX",
        "email": "hongbox.li@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dts/patch/20221114072704.124179-1-hongbox.li@intel.com/mbox/",
    "series": [
        {
            "id": 25748,
            "url": "http://patches.dpdk.org/api/series/25748/?format=api",
            "web_url": "http://patches.dpdk.org/project/dts/list/?series=25748",
            "date": "2022-11-14T07:27:04",
            "name": "[V1] tests/TestSuite_ice_iavf_fdir:ensure that the environment can be cleaned up after an exception occurs in the case",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/25748/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/119816/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/119816/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 C3BFDA0C1C;\n\tMon, 14 Nov 2022 09:26:48 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 99B3840150;\n\tMon, 14 Nov 2022 09:26:48 +0100 (CET)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by mails.dpdk.org (Postfix) with ESMTP id 232104014F\n for <dts@dpdk.org>; Mon, 14 Nov 2022 09:26:45 +0100 (CET)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Nov 2022 00:26:44 -0800",
            "from unknown (HELO localhost.localdomain) ([10.239.252.19])\n by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Nov 2022 00:26:43 -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=1668414406; x=1699950406;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=54EInaLwnBJoqrAQ975Eub/vW+igp65vxVAT+x06Tec=;\n b=HNhSXRQ/KoQAJtEyn2O4JFaT9ZC09wx6KSek6k/jt6Qh/S/YSu0tQvUV\n zAD1qQOqheK3wcN1v2UEEP9KxdGl9nnkb7Y9A+9uQyWsucqSQT3e4Isb6\n mSd9lYQrAbdHdoFQ0f22RTotdJtc4DIZ5YP/jNUUYwZl7cB0BqgNg3vK+\n lvzLPitZya04khqvR0aRYGHFMw1lYCXmvDyUx6TrGZH59njicvP2n9Pm/\n ZdA0pMpeOp+dOZfb4q5vaKXszspNq4otGcJc9jSrvmkfTXlBOfHwe29K+\n GUIDdDf2cmakXGvwQsTtLKVp6XdP5C4+MkBdvVHuFS6chjH/b1ST1KDOX A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10530\"; a=\"311917011\"",
            "E=Sophos;i=\"5.96,161,1665471600\"; d=\"scan'208\";a=\"311917011\"",
            "E=McAfee;i=\"6500,9779,10530\"; a=\"638387497\"",
            "E=Sophos;i=\"5.96,161,1665471600\"; d=\"scan'208\";a=\"638387497\""
        ],
        "From": "Hongbo Li <hongbox.li@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "Hongbo Li <hongbox.li@intel.com>",
        "Subject": "[dts][PATCH V1] tests/TestSuite_ice_iavf_fdir:ensure that the\n environment can be cleaned up after an exception occurs in the case",
        "Date": "Mon, 14 Nov 2022 07:27:04 +0000",
        "Message-Id": "<20221114072704.124179-1-hongbox.li@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.If testcase throws an exception, the vf will not be cleaned, and cause other cases to fail.\n2.By adding finally statements, the case will clean up the test environment whether it passes or not.\n\nSigned-off-by: Hongbo Li <hongbox.li@intel.com>\n---\n tests/TestSuite_ice_iavf_fdir.py | 297 ++++++++++++++++---------------\n 1 file changed, 149 insertions(+), 148 deletions(-)",
    "diff": "diff --git a/tests/TestSuite_ice_iavf_fdir.py b/tests/TestSuite_ice_iavf_fdir.py\nindex d6ca832a..453b36cb 100644\n--- a/tests/TestSuite_ice_iavf_fdir.py\n+++ b/tests/TestSuite_ice_iavf_fdir.py\n@@ -10283,166 +10283,167 @@ class TestICEIAVFFdir(TestCase):\n         self.session_third.send_expect(\"ifconfig %s up\" % self.pf1_intf, \"# \", 15)\n         time.sleep(1)\n \n-        # send matched packets\n-        self.tester.scapy_append(\n-            'sendp([%s], iface=\"%s\")' % (pkts[\"pf\"][0], self.tester_iface0)\n-        )\n-        self.tester.scapy_append(\n-            'sendp([%s], iface=\"%s\")' % (pkts[\"pf\"][1], self.tester_iface1)\n-        )\n-        self.tester.scapy_execute()\n-        time.sleep(1)\n-\n-        out_pf0 = self.session_third.send_expect(\"ethtool -S %s\" % self.pf0_intf, \"# \")\n-        self.verify(\n-            \"rx_queue_1_packets: 1\" in out_pf0,\n-            \"the packet is not redirected to expected queue of pf0\",\n-        )\n-        out_pf1 = self.session_third.send_expect(\"ethtool -S %s\" % self.pf1_intf, \"# \")\n-        self.verify(\"rx_dropped: 1\" in out_pf1, \"the packet is not dropped pf1\")\n-\n-        out_vf00 = self.send_pkts_getouput(pkts[\"matched\"][0])\n-        rfc.check_iavf_fdir_mark(\n-            out_vf00, pkt_num=1, check_param={\"port_id\": 0, \"queue\": [2, 3]}, stats=True\n-        )\n-        out_vf01 = self.send_pkts_getouput(pkts[\"matched\"][1])\n-        rfc.check_iavf_fdir_mark(\n-            out_vf01,\n-            pkt_num=1,\n-            check_param={\"port_id\": 1, \"queue\": 6, \"mark_id\": 0},\n-            stats=True,\n-        )\n-\n-        self.send_packets(pkts[\"matched\"][2], pf_id=1)\n-        out_info = self.session_secondary.get_session_before(timeout=2)\n-        out_pkt = self.session_secondary.send_expect(\"stop\", \"testpmd> \")\n-        out_vf10 = out_info + out_pkt\n-        self.session_secondary.send_expect(\"start\", \"testpmd> \")\n-        rfc.check_iavf_fdir_mark(\n-            out_vf10,\n-            pkt_num=1,\n-            check_param={\"port_id\": 0, \"queue\": 6, \"mark_id\": 1},\n-            stats=True,\n-        )\n+        try:\n+            # send matched packets\n+            self.tester.scapy_append(\n+                'sendp([%s], iface=\"%s\")' % (pkts[\"pf\"][0], self.tester_iface0)\n+            )\n+            self.tester.scapy_append(\n+                'sendp([%s], iface=\"%s\")' % (pkts[\"pf\"][1], self.tester_iface1)\n+            )\n+            self.tester.scapy_execute()\n+            time.sleep(1)\n \n-        self.send_packets(pkts[\"matched\"][3], pf_id=1)\n-        out_info = self.session_secondary.get_session_before(timeout=2)\n-        out_pkt = self.session_secondary.send_expect(\"stop\", \"testpmd> \")\n-        out_vf11 = out_info + out_pkt\n-        self.session_secondary.send_expect(\"start\", \"testpmd> \")\n-        rfc.check_iavf_fdir_mark(\n-            out_vf11, pkt_num=1, check_param={\"port_id\": 1, \"drop\": 1}, stats=True\n-        )\n+            out_pf0 = self.session_third.send_expect(\"ethtool -S %s\" % self.pf0_intf, \"# \")\n+            self.verify(\n+                \"rx_queue_1_packets: 1\" in out_pf0,\n+                \"the packet is not redirected to expected queue of pf0\",\n+            )\n+            out_pf1 = self.session_third.send_expect(\"ethtool -S %s\" % self.pf1_intf, \"# \")\n+            self.verify(\"rx_dropped: 1\" in out_pf1, \"the packet is not dropped pf1\")\n \n-        # send mismatched packets\n-        out_vf00 = self.send_pkts_getouput(pkts[\"mismatched\"][0])\n-        rfc.check_iavf_fdir_mark(\n-            out_vf00,\n-            pkt_num=1,\n-            check_param={\"port_id\": 0, \"queue\": [2, 3]},\n-            stats=False,\n-        )\n-        out_vf01 = self.send_pkts_getouput(pkts[\"mismatched\"][1])\n-        rfc.check_iavf_fdir_mark(\n-            out_vf01,\n-            pkt_num=1,\n-            check_param={\"port_id\": 1, \"queue\": 6, \"mark_id\": 0},\n-            stats=False,\n-        )\n+            out_vf00 = self.send_pkts_getouput(pkts[\"matched\"][0])\n+            rfc.check_iavf_fdir_mark(\n+                out_vf00, pkt_num=1, check_param={\"port_id\": 0, \"queue\": [2, 3]}, stats=True\n+            )\n+            out_vf01 = self.send_pkts_getouput(pkts[\"matched\"][1])\n+            rfc.check_iavf_fdir_mark(\n+                out_vf01,\n+                pkt_num=1,\n+                check_param={\"port_id\": 1, \"queue\": 6, \"mark_id\": 0},\n+                stats=True,\n+            )\n \n-        self.send_packets(pkts[\"mismatched\"][2], pf_id=1)\n-        out_info = self.session_secondary.get_session_before(timeout=2)\n-        out_pkt = self.session_secondary.send_expect(\"stop\", \"testpmd> \")\n-        out_vf10 = out_info + out_pkt\n-        self.session_secondary.send_expect(\"start\", \"testpmd> \")\n-        rfc.check_iavf_fdir_mark(\n-            out_vf10,\n-            pkt_num=1,\n-            check_param={\"port_id\": 0, \"queue\": 6, \"mark_id\": 1},\n-            stats=False,\n-        )\n+            self.send_packets(pkts[\"matched\"][2], pf_id=1)\n+            out_info = self.session_secondary.get_session_before(timeout=2)\n+            out_pkt = self.session_secondary.send_expect(\"stop\", \"testpmd> \")\n+            out_vf10 = out_info + out_pkt\n+            self.session_secondary.send_expect(\"start\", \"testpmd> \")\n+            rfc.check_iavf_fdir_mark(\n+                out_vf10,\n+                pkt_num=1,\n+                check_param={\"port_id\": 0, \"queue\": 6, \"mark_id\": 1},\n+                stats=True,\n+            )\n \n-        self.send_packets(pkts[\"mismatched\"][3], pf_id=1)\n-        out_info = self.session_secondary.get_session_before(timeout=2)\n-        out_pkt = self.session_secondary.send_expect(\"stop\", \"testpmd> \")\n-        out_vf11 = out_info + out_pkt\n-        self.session_secondary.send_expect(\"start\", \"testpmd> \")\n-        rfc.check_iavf_fdir_mark(\n-            out_vf11, pkt_num=1, check_param={\"port_id\": 1, \"drop\": 1}, stats=False\n-        )\n+            self.send_packets(pkts[\"matched\"][3], pf_id=1)\n+            out_info = self.session_secondary.get_session_before(timeout=2)\n+            out_pkt = self.session_secondary.send_expect(\"stop\", \"testpmd> \")\n+            out_vf11 = out_info + out_pkt\n+            self.session_secondary.send_expect(\"start\", \"testpmd> \")\n+            rfc.check_iavf_fdir_mark(\n+                out_vf11, pkt_num=1, check_param={\"port_id\": 1, \"drop\": 1}, stats=True\n+            )\n \n-        # flush all the rules\n-        self.dut.send_expect(\"flow flush 0\", \"testpmd> \")\n-        self.dut.send_expect(\"flow flush 1\", \"testpmd> \")\n-        self.session_secondary.send_expect(\"flow flush 0\", \"testpmd> \")\n-        self.session_secondary.send_expect(\"flow flush 1\", \"testpmd> \")\n+            # send mismatched packets\n+            out_vf00 = self.send_pkts_getouput(pkts[\"mismatched\"][0])\n+            rfc.check_iavf_fdir_mark(\n+                out_vf00,\n+                pkt_num=1,\n+                check_param={\"port_id\": 0, \"queue\": [2, 3]},\n+                stats=False,\n+            )\n+            out_vf01 = self.send_pkts_getouput(pkts[\"mismatched\"][1])\n+            rfc.check_iavf_fdir_mark(\n+                out_vf01,\n+                pkt_num=1,\n+                check_param={\"port_id\": 1, \"queue\": 6, \"mark_id\": 0},\n+                stats=False,\n+            )\n \n-        self.session_third.send_expect(\n-            \"ethtool -N %s delete %d\" % (self.pf0_intf, int(m0.group(1))), \"# \"\n-        )\n-        self.session_third.send_expect(\n-            \"ethtool -N %s delete %d\" % (self.pf1_intf, int(m1.group(1))), \"# \"\n-        )\n-        self.session_third.send_expect(\n-            \"ethtool -n %s\" % (self.pf0_intf), \"Total 0 rules\"\n-        )\n-        self.session_third.send_expect(\n-            \"ethtool -n %s\" % (self.pf1_intf), \"Total 0 rules\"\n-        )\n+            self.send_packets(pkts[\"mismatched\"][2], pf_id=1)\n+            out_info = self.session_secondary.get_session_before(timeout=2)\n+            out_pkt = self.session_secondary.send_expect(\"stop\", \"testpmd> \")\n+            out_vf10 = out_info + out_pkt\n+            self.session_secondary.send_expect(\"start\", \"testpmd> \")\n+            rfc.check_iavf_fdir_mark(\n+                out_vf10,\n+                pkt_num=1,\n+                check_param={\"port_id\": 0, \"queue\": 6, \"mark_id\": 1},\n+                stats=False,\n+            )\n \n-        # send matched packets\n-        self.tester.scapy_append(\n-            'sendp([%s], iface=\"%s\")' % (pkts[\"pf\"][0], self.tester_iface0)\n-        )\n-        self.tester.scapy_append(\n-            'sendp([%s], iface=\"%s\")' % (pkts[\"pf\"][1], self.tester_iface1)\n-        )\n-        self.tester.scapy_execute()\n+            self.send_packets(pkts[\"mismatched\"][3], pf_id=1)\n+            out_info = self.session_secondary.get_session_before(timeout=2)\n+            out_pkt = self.session_secondary.send_expect(\"stop\", \"testpmd> \")\n+            out_vf11 = out_info + out_pkt\n+            self.session_secondary.send_expect(\"start\", \"testpmd> \")\n+            rfc.check_iavf_fdir_mark(\n+                out_vf11, pkt_num=1, check_param={\"port_id\": 1, \"drop\": 1}, stats=False\n+            )\n \n-        out_pf0 = self.session_third.send_expect(\"ethtool -S %s\" % self.pf0_intf, \"# \")\n-        self.verify(\"rx_queue_1_packets: 1\" in out_pf0, \"the rule is not destroyed\")\n-        out_pf1 = self.session_third.send_expect(\"ethtool -S %s\" % self.pf1_intf, \"# \")\n-        self.verify(\"rx_dropped: 1\" in out_pf1, \"the packet is dropped by pf1\")\n+            # flush all the rules\n+            self.dut.send_expect(\"flow flush 0\", \"testpmd> \")\n+            self.dut.send_expect(\"flow flush 1\", \"testpmd> \")\n+            self.session_secondary.send_expect(\"flow flush 0\", \"testpmd> \")\n+            self.session_secondary.send_expect(\"flow flush 1\", \"testpmd> \")\n \n-        # send mismatched packets\n-        out_vf00 = self.send_pkts_getouput(pkts[\"matched\"][0])\n-        rfc.check_iavf_fdir_mark(\n-            out_vf00,\n-            pkt_num=1,\n-            check_param={\"port_id\": 0, \"queue\": [2, 3]},\n-            stats=False,\n-        )\n-        out_vf01 = self.send_pkts_getouput(pkts[\"matched\"][1])\n-        rfc.check_iavf_fdir_mark(\n-            out_vf01,\n-            pkt_num=1,\n-            check_param={\"port_id\": 1, \"queue\": 6, \"mark_id\": 0},\n-            stats=False,\n-        )\n+            self.session_third.send_expect(\n+                \"ethtool -N %s delete %d\" % (self.pf0_intf, int(m0.group(1))), \"# \"\n+            )\n+            self.session_third.send_expect(\n+                \"ethtool -N %s delete %d\" % (self.pf1_intf, int(m1.group(1))), \"# \"\n+            )\n+            self.session_third.send_expect(\n+                \"ethtool -n %s\" % (self.pf0_intf), \"Total 0 rules\"\n+            )\n+            self.session_third.send_expect(\n+                \"ethtool -n %s\" % (self.pf1_intf), \"Total 0 rules\"\n+            )\n \n-        self.send_packets(pkts[\"matched\"][2], pf_id=1)\n-        out_info = self.session_secondary.get_session_before(timeout=2)\n-        out_pkt = self.session_secondary.send_expect(\"stop\", \"testpmd> \")\n-        out_vf10 = out_info + out_pkt\n-        self.session_secondary.send_expect(\"start\", \"testpmd> \")\n-        rfc.check_iavf_fdir_mark(\n-            out_vf10,\n-            pkt_num=1,\n-            check_param={\"port_id\": 0, \"queue\": 6, \"mark_id\": 1},\n-            stats=False,\n-        )\n+            # send matched packets\n+            self.tester.scapy_append(\n+                'sendp([%s], iface=\"%s\")' % (pkts[\"pf\"][0], self.tester_iface0)\n+            )\n+            self.tester.scapy_append(\n+                'sendp([%s], iface=\"%s\")' % (pkts[\"pf\"][1], self.tester_iface1)\n+            )\n+            self.tester.scapy_execute()\n+\n+            out_pf0 = self.session_third.send_expect(\"ethtool -S %s\" % self.pf0_intf, \"# \")\n+            self.verify(\"rx_queue_1_packets: 1\" in out_pf0, \"the rule is not destroyed\")\n+            out_pf1 = self.session_third.send_expect(\"ethtool -S %s\" % self.pf1_intf, \"# \")\n+            self.verify(\"rx_dropped: 1\" in out_pf1, \"the packet is dropped by pf1\")\n+\n+            # send mismatched packets\n+            out_vf00 = self.send_pkts_getouput(pkts[\"matched\"][0])\n+            rfc.check_iavf_fdir_mark(\n+                out_vf00,\n+                pkt_num=1,\n+                check_param={\"port_id\": 0, \"queue\": [2, 3]},\n+                stats=False,\n+            )\n+            out_vf01 = self.send_pkts_getouput(pkts[\"matched\"][1])\n+            rfc.check_iavf_fdir_mark(\n+                out_vf01,\n+                pkt_num=1,\n+                check_param={\"port_id\": 1, \"queue\": 6, \"mark_id\": 0},\n+                stats=False,\n+            )\n \n-        self.send_packets(pkts[\"matched\"][3], pf_id=1)\n-        out_info = self.session_secondary.get_session_before(timeout=2)\n-        out_pkt = self.session_secondary.send_expect(\"stop\", \"testpmd> \")\n-        out_vf11 = out_info + out_pkt\n-        self.session_secondary.send_expect(\"start\", \"testpmd> \")\n-        rfc.check_iavf_fdir_mark(\n-            out_vf11, pkt_num=1, check_param={\"port_id\": 1, \"drop\": 1}, stats=False\n-        )\n+            self.send_packets(pkts[\"matched\"][2], pf_id=1)\n+            out_info = self.session_secondary.get_session_before(timeout=2)\n+            out_pkt = self.session_secondary.send_expect(\"stop\", \"testpmd> \")\n+            out_vf10 = out_info + out_pkt\n+            self.session_secondary.send_expect(\"start\", \"testpmd> \")\n+            rfc.check_iavf_fdir_mark(\n+                out_vf10,\n+                pkt_num=1,\n+                check_param={\"port_id\": 0, \"queue\": 6, \"mark_id\": 1},\n+                stats=False,\n+            )\n \n-        self.dut.close_session(self.session_secondary)\n-        self.dut.close_session(self.session_third)\n+            self.send_packets(pkts[\"matched\"][3], pf_id=1)\n+            out_info = self.session_secondary.get_session_before(timeout=2)\n+            out_pkt = self.session_secondary.send_expect(\"stop\", \"testpmd> \")\n+            out_vf11 = out_info + out_pkt\n+            self.session_secondary.send_expect(\"start\", \"testpmd> \")\n+            rfc.check_iavf_fdir_mark(\n+                out_vf11, pkt_num=1, check_param={\"port_id\": 1, \"drop\": 1}, stats=False\n+            )\n+        finally:\n+            self.dut.close_session(self.session_secondary)\n+            self.dut.close_session(self.session_third)\n \n     @skip_unsupported_pkg([\"os default\", \"wireless\"])\n     def test_maxnum_128_profiles(self):\n",
    "prefixes": [
        "V1"
    ]
}