get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 111190,
    "url": "http://patches.dpdk.org/api/patches/111190/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/043ba4c16cac74e28e001ae46619a2e4bcfc0f00.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": "<043ba4c16cac74e28e001ae46619a2e4bcfc0f00.1652722314.git.sthotton@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/043ba4c16cac74e28e001ae46619a2e4bcfc0f00.1652722314.git.sthotton@marvell.com",
    "date": "2022-05-16T17:35:48",
    "name": "[v4,2/5] eventdev: add weight and affinity to queue attributes",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "523cc1c20d04eb47f65c2902ac2083c482358838",
    "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/043ba4c16cac74e28e001ae46619a2e4bcfc0f00.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/111190/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/111190/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 4E63CA00BE;\n\tMon, 16 May 2022 19:39:31 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3F6E842825;\n\tMon, 16 May 2022 19:39:31 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 597A04068B\n for <dev@dpdk.org>; Mon, 16 May 2022 19:39:29 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id\n 24GEsSwi004319;\n Mon, 16 May 2022 10:37:25 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3g3rsqrnxa-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Mon, 16 May 2022 10:37:24 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) 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:23 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Mon, 16 May 2022 10:37:23 -0700",
            "from localhost.localdomain (unknown [10.28.34.29])\n by maili.marvell.com (Postfix) with ESMTP id 2CA733F70CD;\n Mon, 16 May 2022 10:37:20 -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=N8PN2R7y5k7bpiho0L4n6F3EZJrvY9dEIXK4noK2EZY=;\n b=LmyaQwTM+y2G5CQ87T4I151foqjuCczolCEWpLoYOEr+xkPLm4PzTjoq4zu7CJtKs8N8\n wuJi+HABnZrIcGqUVGqR8ZwThCWv7dNCk4cCoDvBwlcfCFTXsEECjS2GsZ3ibu+QTIQu\n BvDl9P3MfSFXEzBNc7nUa+M6PpKvePF+X2Y3Thkhcnq4pSpshc0R7xKiYmm8TbG7cnVO\n 6pKvGxYw4DW9kXozWq02PgA+tBQw56MgsEMqnMqSsmY7JOrmE9q8tz6UjaX27g1bCJb5\n iWZ9W9T3JGzsQwjsPcMm47s3opE4OBzIPtiBV6UKF8MkTZbUyQOR3Hy2wmiRxlYkkvaZ rw==",
        "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 2/5] eventdev: add weight and affinity to queue attributes",
        "Date": "Mon, 16 May 2022 23:05:48 +0530",
        "Message-ID": "\n <043ba4c16cac74e28e001ae46619a2e4bcfc0f00.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": "e6x8nxZ7zIBhDDnL3GtpLb5K5UVgX7w-",
        "X-Proofpoint-GUID": "e6x8nxZ7zIBhDDnL3GtpLb5K5UVgX7w-",
        "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": "Extended eventdev queue QoS attributes to support weight and affinity.\nIf queues are of the same priority, events from the queue with highest\nweight will be scheduled first. Affinity indicates the number of times,\nthe subsequent schedule calls from an event port will use the same event\nqueue. Schedule call selects another queue if current queue goes empty\nor schedule count reaches affinity count.\n\nTo avoid ABI break, weight and affinity attributes are not yet added to\nqueue config structure and rely on PMD for managing it. New eventdev op\nqueue_attr_get can be used to get it from the PMD.\n\nSigned-off-by: Shijith Thotton <sthotton@marvell.com>\nAcked-by: Jerin Jacob <jerinj@marvell.com>\n---\n doc/guides/rel_notes/release_22_07.rst |  7 +++++\n lib/eventdev/eventdev_pmd.h            | 22 +++++++++++++++\n lib/eventdev/rte_eventdev.c            | 12 ++++++++\n lib/eventdev/rte_eventdev.h            | 38 ++++++++++++++++++++++++--\n 4 files changed, 77 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst\nindex a7a912d665..f35a31bbdf 100644\n--- a/doc/guides/rel_notes/release_22_07.rst\n+++ b/doc/guides/rel_notes/release_22_07.rst\n@@ -70,6 +70,13 @@ New Features\n   Added new API ``rte_event_queue_attr_set()``, to set event queue attributes\n   at runtime.\n \n+* **Added new queues attributes weight and affinity in eventdev.**\n+\n+  Defined new event queue attributes weight and affinity as below:\n+\n+  * ``RTE_EVENT_QUEUE_ATTR_WEIGHT``\n+  * ``RTE_EVENT_QUEUE_ATTR_AFFINITY``\n+\n \n Removed Items\n -------------\ndiff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h\nindex 3b85d9f7a5..5495aee4f6 100644\n--- a/lib/eventdev/eventdev_pmd.h\n+++ b/lib/eventdev/eventdev_pmd.h\n@@ -341,6 +341,26 @@ typedef int (*eventdev_queue_setup_t)(struct rte_eventdev *dev,\n typedef void (*eventdev_queue_release_t)(struct rte_eventdev *dev,\n \t\tuint8_t queue_id);\n \n+/**\n+ * Get an event queue attribute at runtime.\n+ *\n+ * @param dev\n+ *   Event device pointer\n+ * @param queue_id\n+ *   Event queue index\n+ * @param attr_id\n+ *   Event queue attribute id\n+ * @param[out] attr_value\n+ *   Event queue attribute value\n+ *\n+ * @return\n+ *  - 0: Success.\n+ *  - <0: Error code on failure.\n+ */\n+typedef int (*eventdev_queue_attr_get_t)(struct rte_eventdev *dev,\n+\t\t\t\t\t uint8_t queue_id, uint32_t attr_id,\n+\t\t\t\t\t uint32_t *attr_value);\n+\n /**\n  * Set an event queue attribute at runtime.\n  *\n@@ -1231,6 +1251,8 @@ struct eventdev_ops {\n \t/**< Set up an event queue. */\n \teventdev_queue_release_t queue_release;\n \t/**< Release an event queue. */\n+\teventdev_queue_attr_get_t queue_attr_get;\n+\t/**< Get an event queue attribute. */\n \teventdev_queue_attr_set_t queue_attr_set;\n \t/**< Set an event queue attribute. */\n \ndiff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c\nindex a31e99be02..12b261f923 100644\n--- a/lib/eventdev/rte_eventdev.c\n+++ b/lib/eventdev/rte_eventdev.c\n@@ -838,6 +838,18 @@ rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,\n \n \t\t*attr_value = conf->schedule_type;\n \t\tbreak;\n+\tcase RTE_EVENT_QUEUE_ATTR_WEIGHT:\n+\t\t*attr_value = RTE_EVENT_QUEUE_WEIGHT_LOWEST;\n+\t\tif (dev->dev_ops->queue_attr_get)\n+\t\t\treturn (*dev->dev_ops->queue_attr_get)(\n+\t\t\t\tdev, queue_id, attr_id, attr_value);\n+\t\tbreak;\n+\tcase RTE_EVENT_QUEUE_ATTR_AFFINITY:\n+\t\t*attr_value = RTE_EVENT_QUEUE_AFFINITY_LOWEST;\n+\t\tif (dev->dev_ops->queue_attr_get)\n+\t\t\treturn (*dev->dev_ops->queue_attr_get)(\n+\t\t\t\tdev, queue_id, attr_id, attr_value);\n+\t\tbreak;\n \tdefault:\n \t\treturn -EINVAL;\n \t};\ndiff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h\nindex a79b1397eb..9a7c0bcf25 100644\n--- a/lib/eventdev/rte_eventdev.h\n+++ b/lib/eventdev/rte_eventdev.h\n@@ -222,8 +222,14 @@ struct rte_event;\n \n /* Event device capability bitmap flags */\n #define RTE_EVENT_DEV_CAP_QUEUE_QOS           (1ULL << 0)\n-/**< Event scheduling prioritization is based on the priority associated with\n- *  each event queue.\n+/**< Event scheduling prioritization is based on the priority and weight\n+ * associated with each event queue. Events from a queue with highest priority\n+ * is scheduled first. If the queues are of same priority, weight of the queues\n+ * are considered to select a queue in a weighted round robin fashion.\n+ * Subsequent dequeue calls from an event port could see events from the same\n+ * event queue, if the queue is configured with an affinity count. Affinity\n+ * count is the number of subsequent dequeue calls, in which an event port\n+ * should use the same event queue if the queue is non-empty\n  *\n  *  @see rte_event_queue_setup(), rte_event_queue_attr_set()\n  */\n@@ -331,6 +337,26 @@ struct rte_event;\n  * @see rte_event_port_link()\n  */\n \n+/* Event queue scheduling weights */\n+#define RTE_EVENT_QUEUE_WEIGHT_HIGHEST 255\n+/**< Highest weight of an event queue\n+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()\n+ */\n+#define RTE_EVENT_QUEUE_WEIGHT_LOWEST 0\n+/**< Lowest weight of an event queue\n+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()\n+ */\n+\n+/* Event queue scheduling affinity */\n+#define RTE_EVENT_QUEUE_AFFINITY_HIGHEST 255\n+/**< Highest scheduling affinity of an event queue\n+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()\n+ */\n+#define RTE_EVENT_QUEUE_AFFINITY_LOWEST 0\n+/**< Lowest scheduling affinity of an event queue\n+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()\n+ */\n+\n /**\n  * Get the total number of event devices that have been successfully\n  * initialised.\n@@ -684,6 +710,14 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,\n  * The schedule type of the queue.\n  */\n #define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4\n+/**\n+ * The weight of the queue.\n+ */\n+#define RTE_EVENT_QUEUE_ATTR_WEIGHT 5\n+/**\n+ * Affinity of the queue.\n+ */\n+#define RTE_EVENT_QUEUE_ATTR_AFFINITY 6\n \n /**\n  * Get an attribute from a queue.\n",
    "prefixes": [
        "v4",
        "2/5"
    ]
}