get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 111191,
    "url": "http://patches.dpdk.org/api/patches/111191/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/7f2bd0734a71e6b46496933379df1bac51cc8b0a.1652722314.git.sthotton@marvell.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<7f2bd0734a71e6b46496933379df1bac51cc8b0a.1652722314.git.sthotton@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/7f2bd0734a71e6b46496933379df1bac51cc8b0a.1652722314.git.sthotton@marvell.com",
    "date": "2022-05-16T17:35:49",
    "name": "[v4,3/5] test/event: test cases to test runtime queue attribute",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "108bf4debb08cf0c51f1cff4caf80ccf1e74cb25",
    "submitter": {
        "id": 2049,
        "url": "http://patches.dpdk.org/api/people/2049/?format=api",
        "name": "Shijith Thotton",
        "email": "sthotton@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/7f2bd0734a71e6b46496933379df1bac51cc8b0a.1652722314.git.sthotton@marvell.com/mbox/",
    "series": [
        {
            "id": 22956,
            "url": "http://patches.dpdk.org/api/series/22956/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=22956",
            "date": "2022-05-16T17:35:46",
            "name": "Extend and set event queue attributes at runtime",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/22956/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/111191/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/111191/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-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 EA200A00BE;\n\tMon, 16 May 2022 19:39:35 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 25F9A42B68;\n\tMon, 16 May 2022 19:39:32 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id EB40142685\n for <dev@dpdk.org>; Mon, 16 May 2022 19:39:30 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id\n 24GBCUpj024067;\n Mon, 16 May 2022 10:37:28 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3g2bxsqyu8-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Mon, 16 May 2022 10:37:28 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Mon, 16 May 2022 10:37:26 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Mon, 16 May 2022 10:37:26 -0700",
            "from localhost.localdomain (unknown [10.28.34.29])\n by maili.marvell.com (Postfix) with ESMTP id E44D23F70CB;\n Mon, 16 May 2022 10:37:23 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=llNKxbyEXkKyiDlFmEc6cITnT2GDedhxxYiUGYC3o7o=;\n b=feaWhdEEIAsQttITwIxWEMuqahkxc/PIur78MW1I6eNHYK204FdLWdxk9Dtf84SHBa7c\n fOdeO+yzzGcjALzTffT/BCexBCj1EM4XF/9CdXjocSA/HA+La1I7EQF8uy6Ab4q/BniU\n 8vKnmIICy0eemOyleUG8SnNeFpkbWzFLenXq1nw7pxJbpuNaQJ/lRj0EwV5oMI0UHzgQ\n tSwyDClg8ja7Uh13t8Dz/NwoUvKga1Vfj8Ryb8Tue60A3JNXHavl6y99wcGiQyStZcAn\n 03u4XOTu84+OwbTUDktvumg7kgfG6i6ev4p+F77KEvPhxPavarw0IvMtwk7L4PhFXjYU IA==",
        "From": "Shijith Thotton <sthotton@marvell.com>",
        "To": "<dev@dpdk.org>, <jerinj@marvell.com>",
        "CC": "Shijith Thotton <sthotton@marvell.com>, <pbhagavatula@marvell.com>,\n <harry.van.haaren@intel.com>, <mattias.ronnblom@ericsson.com>,\n <mdr@ashroe.eu>",
        "Subject": "[PATCH v4 3/5] test/event: test cases to test runtime queue attribute",
        "Date": "Mon, 16 May 2022 23:05:49 +0530",
        "Message-ID": "\n <7f2bd0734a71e6b46496933379df1bac51cc8b0a.1652722314.git.sthotton@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<cover.1652722314.git.sthotton@marvell.com>",
        "References": "<cover.1652607951.git.sthotton@marvell.com>\n <cover.1652722314.git.sthotton@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "Uju6ANIKYczQaRi30lATqEhaMYmll3mT",
        "X-Proofpoint-GUID": "Uju6ANIKYczQaRi30lATqEhaMYmll3mT",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514\n definitions=2022-05-16_15,2022-05-16_02,2022-02-23_01",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Added test cases to test changing of queue QoS attributes priority,\nweight and affinity at runtime.\n\nSigned-off-by: Shijith Thotton <sthotton@marvell.com>\n---\n app/test/test_eventdev.c | 201 +++++++++++++++++++++++++++++++++++++++\n 1 file changed, 201 insertions(+)",
    "diff": "diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c\nindex 4f51042bda..336529038e 100644\n--- a/app/test/test_eventdev.c\n+++ b/app/test/test_eventdev.c\n@@ -385,6 +385,201 @@ test_eventdev_queue_attr_priority(void)\n \treturn TEST_SUCCESS;\n }\n \n+static int\n+test_eventdev_queue_attr_priority_runtime(void)\n+{\n+\tuint32_t queue_count, queue_req, prio, deq_cnt;\n+\tstruct rte_event_queue_conf qconf;\n+\tstruct rte_event_port_conf pconf;\n+\tstruct rte_event_dev_info info;\n+\tstruct rte_event event = {\n+\t\t.op = RTE_EVENT_OP_NEW,\n+\t\t.event_type = RTE_EVENT_TYPE_CPU,\n+\t\t.sched_type = RTE_SCHED_TYPE_ATOMIC,\n+\t\t.u64 = 0xbadbadba,\n+\t};\n+\tint i, ret;\n+\n+\tret = rte_event_dev_info_get(TEST_DEV_ID, &info);\n+\tTEST_ASSERT_SUCCESS(ret, \"Failed to get event dev info\");\n+\n+\tif (!(info.event_dev_cap & RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR))\n+\t\treturn TEST_SKIPPED;\n+\n+\tTEST_ASSERT_SUCCESS(rte_event_dev_attr_get(\n+\t\t\t\t    TEST_DEV_ID, RTE_EVENT_DEV_ATTR_QUEUE_COUNT,\n+\t\t\t\t    &queue_count),\n+\t\t\t    \"Queue count get failed\");\n+\n+\t/* Need at least 2 queues to test LOW and HIGH priority. */\n+\tTEST_ASSERT(queue_count > 1, \"Not enough event queues, needed 2\");\n+\tqueue_req = 2;\n+\n+\tfor (i = 0; i < (int)queue_count; i++) {\n+\t\tret = rte_event_queue_default_conf_get(TEST_DEV_ID, i, &qconf);\n+\t\tTEST_ASSERT_SUCCESS(ret, \"Failed to get queue%d def conf\", i);\n+\t\tret = rte_event_queue_setup(TEST_DEV_ID, i, &qconf);\n+\t\tTEST_ASSERT_SUCCESS(ret, \"Failed to setup queue%d\", i);\n+\t}\n+\n+\tret = rte_event_queue_attr_set(TEST_DEV_ID, 0,\n+\t\t\t\t       RTE_EVENT_QUEUE_ATTR_PRIORITY,\n+\t\t\t\t       RTE_EVENT_DEV_PRIORITY_LOWEST);\n+\tif (ret == -ENOTSUP)\n+\t\treturn TEST_SKIPPED;\n+\tTEST_ASSERT_SUCCESS(ret, \"Queue0 priority set failed\");\n+\n+\tret = rte_event_queue_attr_set(TEST_DEV_ID, 1,\n+\t\t\t\t       RTE_EVENT_QUEUE_ATTR_PRIORITY,\n+\t\t\t\t       RTE_EVENT_DEV_PRIORITY_HIGHEST);\n+\tif (ret == -ENOTSUP)\n+\t\treturn TEST_SKIPPED;\n+\tTEST_ASSERT_SUCCESS(ret, \"Queue1 priority set failed\");\n+\n+\t/* Setup event port 0 */\n+\tret = rte_event_port_default_conf_get(TEST_DEV_ID, 0, &pconf);\n+\tTEST_ASSERT_SUCCESS(ret, \"Failed to get port0 info\");\n+\tret = rte_event_port_setup(TEST_DEV_ID, 0, &pconf);\n+\tTEST_ASSERT_SUCCESS(ret, \"Failed to setup port0\");\n+\tret = rte_event_port_link(TEST_DEV_ID, 0, NULL, NULL, 0);\n+\tTEST_ASSERT(ret == (int)queue_count, \"Failed to link port, device %d\",\n+\t\t    TEST_DEV_ID);\n+\n+\tret = rte_event_dev_start(TEST_DEV_ID);\n+\tTEST_ASSERT_SUCCESS(ret, \"Failed to start device%d\", TEST_DEV_ID);\n+\n+\tfor (i = 0; i < (int)queue_req; i++) {\n+\t\tevent.queue_id = i;\n+\t\twhile (rte_event_enqueue_burst(TEST_DEV_ID, 0, &event, 1) != 1)\n+\t\t\trte_pause();\n+\t}\n+\n+\tprio = RTE_EVENT_DEV_PRIORITY_HIGHEST;\n+\tdeq_cnt = 0;\n+\twhile (deq_cnt < queue_req) {\n+\t\tuint32_t queue_prio;\n+\n+\t\tif (rte_event_dequeue_burst(TEST_DEV_ID, 0, &event, 1, 0) == 0)\n+\t\t\tcontinue;\n+\n+\t\tret = rte_event_queue_attr_get(TEST_DEV_ID, event.queue_id,\n+\t\t\t\t\t       RTE_EVENT_QUEUE_ATTR_PRIORITY,\n+\t\t\t\t\t       &queue_prio);\n+\t\tif (ret == -ENOTSUP)\n+\t\t\treturn TEST_SKIPPED;\n+\n+\t\tTEST_ASSERT_SUCCESS(ret, \"Queue priority get failed\");\n+\t\tTEST_ASSERT(queue_prio >= prio,\n+\t\t\t    \"Received event from a lower priority queue first\");\n+\t\tprio = queue_prio;\n+\t\tdeq_cnt++;\n+\t}\n+\n+\treturn TEST_SUCCESS;\n+}\n+\n+static int\n+test_eventdev_queue_attr_weight_runtime(void)\n+{\n+\tstruct rte_event_queue_conf qconf;\n+\tstruct rte_event_dev_info info;\n+\tuint32_t queue_count;\n+\tint i, ret;\n+\n+\tret = rte_event_dev_info_get(TEST_DEV_ID, &info);\n+\tTEST_ASSERT_SUCCESS(ret, \"Failed to get event dev info\");\n+\n+\tif (!(info.event_dev_cap & RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR))\n+\t\treturn TEST_SKIPPED;\n+\n+\tTEST_ASSERT_SUCCESS(rte_event_dev_attr_get(\n+\t\t\t\t    TEST_DEV_ID, RTE_EVENT_DEV_ATTR_QUEUE_COUNT,\n+\t\t\t\t    &queue_count),\n+\t\t\t    \"Queue count get failed\");\n+\n+\tfor (i = 0; i < (int)queue_count; i++) {\n+\t\tret = rte_event_queue_default_conf_get(TEST_DEV_ID, i, &qconf);\n+\t\tTEST_ASSERT_SUCCESS(ret, \"Failed to get queue%d def conf\", i);\n+\t\tret = rte_event_queue_setup(TEST_DEV_ID, i, &qconf);\n+\t\tTEST_ASSERT_SUCCESS(ret, \"Failed to setup queue%d\", i);\n+\t}\n+\n+\tfor (i = 0; i < (int)queue_count; i++) {\n+\t\tuint32_t get_val;\n+\t\tuint64_t set_val;\n+\n+\t\tset_val = i % RTE_EVENT_QUEUE_WEIGHT_HIGHEST;\n+\t\tret = rte_event_queue_attr_set(\n+\t\t\tTEST_DEV_ID, i, RTE_EVENT_QUEUE_ATTR_WEIGHT, set_val);\n+\t\tif (ret == -ENOTSUP)\n+\t\t\treturn TEST_SKIPPED;\n+\n+\t\tTEST_ASSERT_SUCCESS(ret, \"Queue weight set failed\");\n+\n+\t\tret = rte_event_queue_attr_get(\n+\t\t\tTEST_DEV_ID, i, RTE_EVENT_QUEUE_ATTR_WEIGHT, &get_val);\n+\t\tif (ret == -ENOTSUP)\n+\t\t\treturn TEST_SKIPPED;\n+\n+\t\tTEST_ASSERT_SUCCESS(ret, \"Queue weight get failed\");\n+\t\tTEST_ASSERT_EQUAL(get_val, set_val,\n+\t\t\t\t  \"Wrong weight value for queue%d\", i);\n+\t}\n+\n+\treturn TEST_SUCCESS;\n+}\n+\n+static int\n+test_eventdev_queue_attr_affinity_runtime(void)\n+{\n+\tstruct rte_event_queue_conf qconf;\n+\tstruct rte_event_dev_info info;\n+\tuint32_t queue_count;\n+\tint i, ret;\n+\n+\tret = rte_event_dev_info_get(TEST_DEV_ID, &info);\n+\tTEST_ASSERT_SUCCESS(ret, \"Failed to get event dev info\");\n+\n+\tif (!(info.event_dev_cap & RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR))\n+\t\treturn TEST_SKIPPED;\n+\n+\tTEST_ASSERT_SUCCESS(rte_event_dev_attr_get(\n+\t\t\t\t    TEST_DEV_ID, RTE_EVENT_DEV_ATTR_QUEUE_COUNT,\n+\t\t\t\t    &queue_count),\n+\t\t\t    \"Queue count get failed\");\n+\n+\tfor (i = 0; i < (int)queue_count; i++) {\n+\t\tret = rte_event_queue_default_conf_get(TEST_DEV_ID, i, &qconf);\n+\t\tTEST_ASSERT_SUCCESS(ret, \"Failed to get queue%d def conf\", i);\n+\t\tret = rte_event_queue_setup(TEST_DEV_ID, i, &qconf);\n+\t\tTEST_ASSERT_SUCCESS(ret, \"Failed to setup queue%d\", i);\n+\t}\n+\n+\tfor (i = 0; i < (int)queue_count; i++) {\n+\t\tuint32_t get_val;\n+\t\tuint64_t set_val;\n+\n+\t\tset_val = i % RTE_EVENT_QUEUE_AFFINITY_HIGHEST;\n+\t\tret = rte_event_queue_attr_set(\n+\t\t\tTEST_DEV_ID, i, RTE_EVENT_QUEUE_ATTR_AFFINITY, set_val);\n+\t\tif (ret == -ENOTSUP)\n+\t\t\treturn TEST_SKIPPED;\n+\n+\t\tTEST_ASSERT_SUCCESS(ret, \"Queue affinity set failed\");\n+\n+\t\tret = rte_event_queue_attr_get(\n+\t\t\tTEST_DEV_ID, i, RTE_EVENT_QUEUE_ATTR_AFFINITY, &get_val);\n+\t\tif (ret == -ENOTSUP)\n+\t\t\treturn TEST_SKIPPED;\n+\n+\t\tTEST_ASSERT_SUCCESS(ret, \"Queue affinity get failed\");\n+\t\tTEST_ASSERT_EQUAL(get_val, set_val,\n+\t\t\t\t  \"Wrong affinity value for queue%d\", i);\n+\t}\n+\n+\treturn TEST_SUCCESS;\n+}\n+\n static int\n test_eventdev_queue_attr_nb_atomic_flows(void)\n {\n@@ -964,6 +1159,12 @@ static struct unit_test_suite eventdev_common_testsuite  = {\n \t\t\ttest_eventdev_queue_count),\n \t\tTEST_CASE_ST(eventdev_configure_setup, NULL,\n \t\t\ttest_eventdev_queue_attr_priority),\n+\t\tTEST_CASE_ST(eventdev_configure_setup, eventdev_stop_device,\n+\t\t\ttest_eventdev_queue_attr_priority_runtime),\n+\t\tTEST_CASE_ST(eventdev_configure_setup, NULL,\n+\t\t\ttest_eventdev_queue_attr_weight_runtime),\n+\t\tTEST_CASE_ST(eventdev_configure_setup, NULL,\n+\t\t\ttest_eventdev_queue_attr_affinity_runtime),\n \t\tTEST_CASE_ST(eventdev_configure_setup, NULL,\n \t\t\ttest_eventdev_queue_attr_nb_atomic_flows),\n \t\tTEST_CASE_ST(eventdev_configure_setup, NULL,\n",
    "prefixes": [
        "v4",
        "3/5"
    ]
}