get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 126978,
    "url": "https://patches.dpdk.org/api/patches/126978/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230518082830.1730890-1-kirankumark@marvell.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20230518082830.1730890-1-kirankumark@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230518082830.1730890-1-kirankumark@marvell.com",
    "date": "2023-05-18T08:28:30",
    "name": "[v3] ethdev: add Tx queue flow matching item",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "99b1ff2ce96d7a534ccf0ca9887d18d8dbc18dd0",
    "submitter": {
        "id": 1260,
        "url": "https://patches.dpdk.org/api/people/1260/?format=api",
        "name": "Kiran Kumar Kokkilagadda",
        "email": "kirankumark@marvell.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230518082830.1730890-1-kirankumark@marvell.com/mbox/",
    "series": [
        {
            "id": 28056,
            "url": "https://patches.dpdk.org/api/series/28056/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=28056",
            "date": "2023-05-18T08:28:30",
            "name": "[v3] ethdev: add Tx queue flow matching item",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/28056/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/126978/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/126978/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 866C642B39;\n\tThu, 18 May 2023 10:28:41 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 765CE42B71;\n\tThu, 18 May 2023 10:28:41 +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 6189340E25\n for <dev@dpdk.org>; Thu, 18 May 2023 10:28:40 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 34I618o3001232; Thu, 18 May 2023 01:28:38 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3qmyexbc17-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 18 May 2023 01:28:38 -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.48;\n Thu, 18 May 2023 01:28:36 -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.48 via Frontend\n Transport; Thu, 18 May 2023 01:28:36 -0700",
            "from cavium-DT31.. (unknown [10.28.36.159])\n by maili.marvell.com (Postfix) with ESMTP id BFC143F70A5;\n Thu, 18 May 2023 01:28:33 -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 : mime-version : content-transfer-encoding :\n content-type; s=pfpt0220; bh=5n20BbL/8uPxtgP4II/MnLPteVqOBE8vhdYFkot8VJw=;\n b=bNu/10lvEalLbZX63c9mKjHt6EtxBffxYt48i9inJNZFQ0/qSTDEmM6F7lGCz5Ty3krN\n NdH90okaKpIUyzsn4LehpWenx4MaMBlGOvQuxU8iaSbZujd3dEGwc9plFG+eyc7nD5OO\n BXZy8FHBeUnViAOZvaj7+OaT3HL62oTV+3Ovi556CvVXNkE5wGRXKTAsSMvrAmNoAePv\n 08u5tU1XlgriFdLBZKotxx4o8qUdjQzM5V+Ru6igd3KAjBMOMSjvfjlqsOgrgIT58nf7\n 90yP8jA8TX+rfo2aOs1dZpY50aASO3U47qxdr79Ju2sZQ03vrEslwqeyHoCBOUsJg9km wg==",
        "From": "<kirankumark@marvell.com>",
        "To": "Ori Kam <orika@nvidia.com>, Aman Singh <aman.deep.singh@intel.com>,\n \"Yuying Zhang\" <yuying.zhang@intel.com>, Thomas Monjalon\n <thomas@monjalon.net>, \"Ferruh Yigit\" <ferruh.yigit@amd.com>, Andrew\n Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "CC": "<dev@dpdk.org>, Kiran Kumar K <kirankumark@marvell.com>",
        "Subject": "[PATCH v3] ethdev: add Tx queue flow matching item",
        "Date": "Thu, 18 May 2023 13:58:30 +0530",
        "Message-ID": "<20230518082830.1730890-1-kirankumark@marvell.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "Mz4ceg2MxLOJnm5vLv3sxASZNZVjTLZO",
        "X-Proofpoint-ORIG-GUID": "Mz4ceg2MxLOJnm5vLv3sxASZNZVjTLZO",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.170.22\n definitions=2023-05-18_06,2023-05-17_02,2023-02-09_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": "From: Kiran Kumar K <kirankumark@marvell.com>\n\nAdding support for Tx queue flow matching item.\nThis item is valid only for egress rules.\nAn example use case would be that application can\nset different vlan insert rules with different PCP values\nbased on Tx queue number.\n\nSigned-off-by: Kiran Kumar K <kirankumark@marvell.com>\n---\n app/test-pmd/cmdline_flow.c                 | 28 +++++++++++++++++++++\n doc/guides/prog_guide/rte_flow.rst          |  7 ++++++\n doc/guides/rel_notes/release_23_07.rst      |  5 ++++\n doc/guides/testpmd_app_ug/testpmd_funcs.rst |  4 +++\n lib/ethdev/rte_flow.c                       |  1 +\n lib/ethdev/rte_flow.h                       | 26 +++++++++++++++++++\n 6 files changed, 71 insertions(+)",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex 58939ec321..a68a6080a8 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -496,6 +496,8 @@ enum index {\n \tITEM_QUOTA_STATE_NAME,\n \tITEM_AGGR_AFFINITY,\n \tITEM_AGGR_AFFINITY_VALUE,\n+\tITEM_TX_QUEUE,\n+\tITEM_TX_QUEUE_VALUE,\n \n \t/* Validate/create actions. */\n \tACTIONS,\n@@ -1452,6 +1454,7 @@ static const enum index next_item[] = {\n \tITEM_METER,\n \tITEM_QUOTA,\n \tITEM_AGGR_AFFINITY,\n+\tITEM_TX_QUEUE,\n \tEND_SET,\n \tZERO,\n };\n@@ -1953,6 +1956,12 @@ static const enum index item_aggr_affinity[] = {\n \tZERO,\n };\n \n+static const enum index item_tx_queue[] = {\n+\tITEM_TX_QUEUE_VALUE,\n+\tITEM_NEXT,\n+\tZERO,\n+};\n+\n static const enum index next_action[] = {\n \tACTION_END,\n \tACTION_VOID,\n@@ -6945,6 +6954,22 @@ static const struct token token_list[] = {\n \t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_aggr_affinity,\n \t\t\t\t\taffinity)),\n \t},\n+\t[ITEM_TX_QUEUE] = {\n+\t\t.name = \"tx_queue\",\n+\t\t.help = \"match on the tx queue of send packet\",\n+\t\t.priv = PRIV_ITEM(TX_QUEUE,\n+\t\t\t\t  sizeof(struct rte_flow_item_tx_queue)),\n+\t\t.next = NEXT(item_tx_queue),\n+\t\t.call = parse_vc,\n+\t},\n+\t[ITEM_TX_QUEUE_VALUE] = {\n+\t\t.name = \"tx_queue_value\",\n+\t\t.help = \"tx queue value\",\n+\t\t.next = NEXT(item_tx_queue, NEXT_ENTRY(COMMON_UNSIGNED),\n+\t\t\t     item_param),\n+\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tx_queue,\n+\t\t\t\t\ttx_queue)),\n+\t},\n };\n \n /** Remove and return last entry from argument stack. */\n@@ -11849,6 +11874,9 @@ flow_item_default_mask(const struct rte_flow_item *item)\n \tcase RTE_FLOW_ITEM_TYPE_AGGR_AFFINITY:\n \t\tmask = &rte_flow_item_aggr_affinity_mask;\n \t\tbreak;\n+\tcase RTE_FLOW_ITEM_TYPE_TX_QUEUE:\n+\t\tmask = &rte_flow_item_tx_queue_mask;\n+\t\tbreak;\n \tdefault:\n \t\tbreak;\n \t}\ndiff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex 32fc45516a..ac5c65131f 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -1486,6 +1486,13 @@ This item is meant to use the same structure as `Item: PORT_REPRESENTOR`_.\n \n See also `Action: REPRESENTED_PORT`_.\n \n+Item: ``TX_QUEUE``\n+^^^^^^^^^^^^^^^^^^^^^^^\n+\n+Matches on the Tx queue of send packet .\n+\n+- ``tx_queue``: Tx queue.\n+\n Item: ``AGGR_AFFINITY``\n ^^^^^^^^^^^^^^^^^^^^^^^\n \ndiff --git a/doc/guides/rel_notes/release_23_07.rst b/doc/guides/rel_notes/release_23_07.rst\nindex a9b1293689..bb04d99125 100644\n--- a/doc/guides/rel_notes/release_23_07.rst\n+++ b/doc/guides/rel_notes/release_23_07.rst\n@@ -55,6 +55,11 @@ New Features\n      Also, make sure to start the actual text at the margin.\n      =======================================================\n \n+   * **Added flow matching of tx queue.**\n+\n+     Added ``RTE_FLOW_ITEM_TYPE_TX_QUEUE`` rte_flow pattern to match tx queue of\n+     send packet.\n+\n \n Removed Items\n -------------\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 8f23847859..29f7dd4428 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -3779,6 +3779,10 @@ This section lists supported pattern items and their attributes, if any.\n \n   - ``affinity {value}``: aggregated port (starts from 1).\n \n+- ``tx_queue``: match tx queue of send packet.\n+\n+  - ``tx_queue {value}``: send queue value (starts from 0).\n+\n - ``send_to_kernel``: send packets to kernel.\n \n \ndiff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c\nindex 69e6e749f7..f0d7f868fa 100644\n--- a/lib/ethdev/rte_flow.c\n+++ b/lib/ethdev/rte_flow.c\n@@ -164,6 +164,7 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {\n \tMK_FLOW_ITEM(IPV6_ROUTING_EXT, sizeof(struct rte_flow_item_ipv6_routing_ext)),\n \tMK_FLOW_ITEM(QUOTA, sizeof(struct rte_flow_item_quota)),\n \tMK_FLOW_ITEM(AGGR_AFFINITY, sizeof(struct rte_flow_item_aggr_affinity)),\n+\tMK_FLOW_ITEM(TX_QUEUE, sizeof(struct rte_flow_item_tx_queue)),\n };\n \n /** Generate flow_action[] entry. */\ndiff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h\nindex 713ba8b65c..fe28ba0a82 100644\n--- a/lib/ethdev/rte_flow.h\n+++ b/lib/ethdev/rte_flow.h\n@@ -672,8 +672,34 @@ enum rte_flow_item_type {\n \t * @see struct rte_flow_item_aggr_affinity.\n \t */\n \tRTE_FLOW_ITEM_TYPE_AGGR_AFFINITY,\n+\t/**\n+\t * Match Tx queue number.\n+\t * This is valid only for egress rules.\n+\t *\n+\t * @see struct rte_flow_item_tx_queue\n+\t */\n+\t RTE_FLOW_ITEM_TYPE_TX_QUEUE,\n };\n \n+/**\n+ * RTE_FLOW_ITEM_TYPE_TX_QUEUE\n+ *\n+ * Tx queue number\n+ *\n+ * @see struct rte_flow_item_tx_queue\n+ */\n+struct rte_flow_item_tx_queue {\n+\t/** Tx queue number that packet is being transmitted */\n+\tuint16_t tx_queue;\n+};\n+\n+/** Default mask for RTE_FLOW_ITEM_TX_QUEUE. */\n+#ifndef __cplusplus\n+static const struct rte_flow_item_tx_queue rte_flow_item_tx_queue_mask = {\n+\t.tx_queue = RTE_BE16(0xffff),\n+};\n+#endif\n+\n /**\n  * @warning\n  * @b EXPERIMENTAL: this API may change without prior notice.\n",
    "prefixes": [
        "v3"
    ]
}