get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 113902,
    "url": "http://patches.dpdk.org/api/patches/113902/?format=api",
    "web_url": "http://patches.dpdk.org/project/dts/patch/20220711140649.303957-1-marcinx.danilewicz@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": "<20220711140649.303957-1-marcinx.danilewicz@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20220711140649.303957-1-marcinx.danilewicz@intel.com",
    "date": "2022-07-11T14:06:49",
    "name": "tests/TestSuite_qos_meter: srTCM changed CBS-EBS",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "400a901f8fbabead5f348243db98628fe54490ad",
    "submitter": {
        "id": 1988,
        "url": "http://patches.dpdk.org/api/people/1988/?format=api",
        "name": "Danilewicz, MarcinX",
        "email": "marcinx.danilewicz@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dts/patch/20220711140649.303957-1-marcinx.danilewicz@intel.com/mbox/",
    "series": [
        {
            "id": 23960,
            "url": "http://patches.dpdk.org/api/series/23960/?format=api",
            "web_url": "http://patches.dpdk.org/project/dts/list/?series=23960",
            "date": "2022-07-11T14:06:49",
            "name": "tests/TestSuite_qos_meter: srTCM changed CBS-EBS",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/23960/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/113902/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/113902/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 92D5DA0032;\n\tMon, 11 Jul 2022 16:07:44 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 62FB140C35;\n\tMon, 11 Jul 2022 16:07:44 +0200 (CEST)",
            "from mga06.intel.com (mga06b.intel.com [134.134.136.31])\n by mails.dpdk.org (Postfix) with ESMTP id 57EF340695\n for <dts@dpdk.org>; Mon, 11 Jul 2022 16:07:42 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Jul 2022 07:06:53 -0700",
            "from silpixa00400629.ir.intel.com ([10.237.213.88])\n by orsmga001.jf.intel.com with ESMTP; 11 Jul 2022 07:06:52 -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=1657548462; x=1689084462;\n h=from:to:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=ukWY/37wK+Z+y5Y8op1fNPvgitMOidhBhaVry7e7Tn4=;\n b=g9ix9D3Vz8fqfsRIOB000LG54ilb3v9jhUfuVn1qIU6okIv12VChE1M4\n RCkp01vn3KBKK0mj8KddoORQI7EQqsPyqin7a53PBnVVITp0a3Eynyu2h\n 0vvWnZMju0SZYtL4xAgpyooNj4jJ5rMm4qjixeiExkg0iTCJzXHaxDSAm\n rvl9d5cHN1ogxNR1+yyCyDey9+OmXycYRMyhCDglrD5TE/8+lNMWygDRC\n rztNi50S2NybCtvUPsGqa0xVPxLY4oGDjqSkJ+BGlE9ZT/1pEQNJF+5xb\n eegqsXhUWselte+7fiyPnyavTF0XiDi+PAWlm06V6dQG/BbZPq98VZkra w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6400,9594,10404\"; a=\"346353940\"",
            "E=Sophos;i=\"5.92,263,1650956400\"; d=\"scan'208\";a=\"346353940\"",
            "E=Sophos;i=\"5.92,263,1650956400\"; d=\"scan'208\";a=\"627504516\""
        ],
        "X-ExtLoop1": "1",
        "From": "Marcin Danilewicz <marcinx.danilewicz@intel.com>",
        "To": "dts@dpdk.org,\n\tyuan.peng@intel.com",
        "Subject": "[PATCH] tests/TestSuite_qos_meter: srTCM changed CBS-EBS",
        "Date": "Mon, 11 Jul 2022 14:06:49 +0000",
        "Message-Id": "<20220711140649.303957-1-marcinx.danilewicz@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": "Adding test cased for \"srTCM blind changed CBS and EBS\" from\ntest_plans/qos_meter_test_plan.rst\n\nSigned-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>\n---\n tests/TestSuite_qos_meter.py | 163 ++++++++++++++++++++++++++++++++---\n 1 file changed, 153 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/tests/TestSuite_qos_meter.py b/tests/TestSuite_qos_meter.py\nindex b1d13a32..24cadbcc 100644\n--- a/tests/TestSuite_qos_meter.py\n+++ b/tests/TestSuite_qos_meter.py\n@@ -41,12 +41,14 @@ class TestQosMeter(TestCase):\n         \"\"\"\n         pass\n \n-    def build_app_and_send_package(self):\n+    def build_app_and_send_package(self, payload_size_block):\n         \"\"\"\n         Build app and send pkt\n         return bps and pps\n         \"\"\"\n-        self.dut.send_expect(\"rm -rf ./examples/qos_meter/build\", \"#\")\n+        self.dut.send_expect(\"rm -rf ./examples/qos_meter/build\",\n+        \"#\",\n+        )\n         out = self.dut.build_dpdk_apps(\"./examples/qos_meter\")\n         self.verify(\"Error\" not in out, \"Compilation error\")\n         self.verify(\"No such\" not in out, \"Compilation error\")\n@@ -56,9 +58,9 @@ class TestQosMeter(TestCase):\n         app_name = self.dut.apps_name[\"qos_meter\"]\n         cmd = app_name + eal_params + \"-- -p 0x3\"\n         self.dut.send_expect(cmd, \"TX = 1\")\n-        payload_size = 64 - HEADER_SIZE[\"eth\"] - HEADER_SIZE[\"ip\"]\n+        payload_size = payload_size_block - HEADER_SIZE[\"eth\"] - HEADER_SIZE[\"ip\"]\n         dts_mac = self.dut.get_mac_address(self.dut_ports[self.rx_port])\n-        pkt = Packet(pkt_type=\"IP_RAW\")\n+        pkt = Packet(pkt_type=\"IP_RAW\", pkt_len=payload_size)\n         pkt.save_pcapfile(self.tester, \"%s/tester.pcap\" % self.tester.tmp_file)\n         stream_option = {\n             \"pcap\": \"%s/tester.pcap\" % self.tester.tmp_file,\n@@ -79,7 +81,11 @@ class TestQosMeter(TestCase):\n         )\n         self.tester.pktgen.config_stream(stream_id, stream_option)\n         stream_ids.append(stream_id)\n-        traffic_opt = {\"method\": \"throughput\", \"rate\": 100, \"duration\": 20}\n+        traffic_opt = {\n+            \"method\": \"throughput\",\n+            \"rate\": 100,\n+            \"duration\": 20\n+        }\n         bps, pps = self.tester.pktgen.measure(stream_ids, traffic_opt)\n         return bps, pps\n \n@@ -102,7 +108,7 @@ class TestQosMeter(TestCase):\n             r\"sed -i -e '/^#define APP_MODE /s/APP_MODE_*/APP_MODE_SRTCM_COLOR_BLIND/2' ./examples/qos_meter/main.c\",\n             \"#\",\n         )\n-        bps, pps = self.build_app_and_send_package()\n+        bps, pps = self.build_app_and_send_package(64)\n         self.verify_throughput(pps, self.aware_pps)\n \n     def test_perf_srTCM_blind_GREEN(self):\n@@ -117,7 +123,7 @@ class TestQosMeter(TestCase):\n             r\"sed -i -e '/^#define APP_MODE /s/APP_MODE_*/APP_MODE_SRTCM_COLOR_BLIND/2' ./examples/qos_meter/main.c\",\n             \"#\",\n         )\n-        bps, pps = self.build_app_and_send_package()\n+        bps, pps = self.build_app_and_send_package(64)\n         self.verify_throughput(pps, self.blind_pps)\n \n     def test_perf_srTCM_aware_RED(self):\n@@ -132,7 +138,7 @@ class TestQosMeter(TestCase):\n             r\"sed -i -e '/^#define APP_MODE /s/APP_MODE_*/APP_MODE_SRTCM_COLOR_AWARE/2' ./examples/qos_meter/main.c\",\n             \"#\",\n         )\n-        bps, pps = self.build_app_and_send_package()\n+        bps, pps = self.build_app_and_send_package(64)\n         self.verify_throughput(pps, self.blind_pps)\n \n     def test_perf_trTCM_blind(self):\n@@ -147,7 +153,7 @@ class TestQosMeter(TestCase):\n             r\"sed -i -e '/^#define APP_MODE /s/APP_MODE_*/APP_MODE_TRTCM_COLOR_BLIND/2' ./examples/qos_meter/main.c\",\n             \"#\",\n         )\n-        bps, pps = self.build_app_and_send_package()\n+        bps, pps = self.build_app_and_send_package(64)\n         self.verify_throughput(pps, self.aware_pps)\n \n     def test_perf_trTCM_aware(self):\n@@ -162,9 +168,146 @@ class TestQosMeter(TestCase):\n             r\"sed -i -e '/^#define APP_MODE /s/APP_MODE_*/APP_MODE_TRTCM_COLOR_AWARE/2' ./examples/qos_meter/main.c\",\n             \"#\",\n         )\n-        bps, pps = self.build_app_and_send_package()\n+        bps, pps = self.build_app_and_send_package(64)\n+        self.verify_throughput(pps, self.blind_pps)\n+\n+    def test_perf_trTCM_blind_changed_CBS_EBS_64B_frame(self):\n+        \"\"\"\n+        trTCM blind changed CBS and EBS\n+        \"\"\"\n+        self.dut.send_expect(\n+            r\"sed -i -e '/#define APP_PKT_COLOR_POS/s/[0-9]/5/g' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '/^#define APP_MODE\\s/s/APP_MODE_.*/APP_MODE_TRTCM_COLOR_BLIND/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '91 s/cbs = [0-9]*,/cbs = 64,/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '100 s/cbs = [0-9]*,/cbs = 64,/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '92 s/[0-9]*$/512/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        bps, pps = self.build_app_and_send_package(64)\n+        self.verify_throughput(pps, self.blind_pps)\n+\n+    def test_perf_trTCM_blind_changed_CBS_EBS_82B_frame(self):\n+        \"\"\"\n+        trTCM blind changed CBS and EBS\n+        \"\"\"\n+        self.dut.send_expect(\n+            r\"sed -i -e '/#define APP_PKT_COLOR_POS/s/[0-9]/5/g' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '/^#define APP_MODE\\s/s/APP_MODE_.*/APP_MODE_SRTCM_COLOR_BLIND/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '91 s/cbs = [0-9]*,/cbs = 64,/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '100 s/cbs = [0-9]*,/cbs = 64,/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '92 s/[0-9]*$/512/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        bps, pps = self.build_app_and_send_package(82)\n+        self.verify_throughput(pps, self.blind_pps)\n+\n+    def test_perf_trTCM_blind_changed_CBS_EBS_83B_frame(self):\n+        \"\"\"\n+        trTCM blind changed CBS and EBS\n+        \"\"\"\n+        self.dut.send_expect(\n+            r\"sed -i -e '/#define APP_PKT_COLOR_POS/s/[0-9]/5/g' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '/^#define APP_MODE\\s/s/APP_MODE_.*/APP_MODE_SRTCM_COLOR_BLIND/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '91 s/cbs = [0-9]*,/cbs = 64,/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '100 s/cbs = [0-9]*,/cbs = 64,/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '92 s/[0-9]*$/512/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        bps, pps = self.build_app_and_send_package(83)\n         self.verify_throughput(pps, self.blind_pps)\n \n+    def test_perf_trTCM_blind_changed_CBS_EBS_146B_frame(self):\n+        \"\"\"\n+        trTCM blind changed CBS and EBS\n+        \"\"\"\n+        tc_pps = 10000000\n+        self.dut.send_expect(\n+            r\"sed -i -e '/#define APP_PKT_COLOR_POS/s/[0-9]/5/g' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '/^#define APP_MODE\\s/s/APP_MODE_.*/APP_MODE_SRTCM_COLOR_BLIND/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '91 s/cbs = [0-9]*,/cbs = 64,/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '100 s/cbs = [0-9]*,/cbs = 64,/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '92 s/[0-9]*$/512/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        bps, pps = self.build_app_and_send_package(146)\n+        self.verify_throughput(pps, tc_pps)\n+\n+    def test_perf_trTCM_blind_changed_CBS_EBS_530B_frame(self):\n+        \"\"\"\n+        trTCM blind changed CBS and EBS\n+        \"\"\"\n+        tc_pps = 2500000\n+        self.dut.send_expect(\n+            r\"sed -i -e '/#define APP_PKT_COLOR_POS/s/[0-9]/5/g' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '/^#define APP_MODE\\s/s/APP_MODE_.*/APP_MODE_SRTCM_COLOR_BLIND/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '91 s/cbs = [0-9]*,/cbs = 64,/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '100 s/cbs = [0-9]*,/cbs = 64,/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        self.dut.send_expect(\n+            r\"sed -i -e '92 s/[0-9]*$/512/' ./examples/qos_meter/main.c\",\n+            \"#\",\n+        )\n+        bps, pps = self.build_app_and_send_package(530)\n+        self.verify_throughput(pps, tc_pps)\n+\n     def tear_down(self):\n         \"\"\"\n         Run after each test case.\n",
    "prefixes": []
}