get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 105997,
    "url": "http://patchwork.dpdk.org/api/patches/105997/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20220118050802.3915187-8-akozyrev@nvidia.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20220118050802.3915187-8-akozyrev@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220118050802.3915187-8-akozyrev@nvidia.com",
    "date": "2022-01-18T05:07:59",
    "name": "[07/10] app/testpmd: implement rte flow queue create flow",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "fbb83fc7c2865265d5368d680ecb1f4eaf5ce565",
    "submitter": {
        "id": 1873,
        "url": "http://patchwork.dpdk.org/api/people/1873/?format=api",
        "name": "Alexander Kozyrev",
        "email": "akozyrev@nvidia.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20220118050802.3915187-8-akozyrev@nvidia.com/mbox/",
    "series": [
        {
            "id": 21222,
            "url": "http://patchwork.dpdk.org/api/series/21222/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=21222",
            "date": "2022-01-18T05:02:11",
            "name": "ethdev: datapath-focused flow rules management",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/21222/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/105997/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/105997/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 0A695A00C3;\n\tTue, 18 Jan 2022 06:09:33 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 065B8426FC;\n\tTue, 18 Jan 2022 06:09:28 +0100 (CET)",
            "from NAM11-CO1-obe.outbound.protection.outlook.com\n (mail-co1nam11on2044.outbound.protection.outlook.com [40.107.220.44])\n by mails.dpdk.org (Postfix) with ESMTP id 67D844067E\n for <dev@dpdk.org>; Tue, 18 Jan 2022 06:09:26 +0100 (CET)",
            "from DM6PR12MB3737.namprd12.prod.outlook.com (2603:10b6:5:1c5::32)\n by MN2PR12MB3215.namprd12.prod.outlook.com (2603:10b6:208:101::33) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Tue, 18 Jan\n 2022 05:09:23 +0000",
            "from DM5PR07CA0121.namprd07.prod.outlook.com (2603:10b6:3:13e::11)\n by DM6PR12MB3737.namprd12.prod.outlook.com (2603:10b6:5:1c5::32) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Tue, 18 Jan\n 2022 05:09:22 +0000",
            "from DM6NAM11FT011.eop-nam11.prod.protection.outlook.com\n (2603:10b6:3:13e:cafe::da) by DM5PR07CA0121.outlook.office365.com\n (2603:10b6:3:13e::11) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10 via Frontend\n Transport; Tue, 18 Jan 2022 05:09:22 +0000",
            "from mail.nvidia.com (12.22.5.236) by\n DM6NAM11FT011.mail.protection.outlook.com (10.13.172.108) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id\n 15.20.4888.9 via Frontend Transport; Tue, 18 Jan 2022 05:09:22 +0000",
            "from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com\n (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Tue, 18 Jan 2022 05:09:15 +0000",
            "from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com\n (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.9; Mon, 17 Jan 2022\n 21:09:12 -0800"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=Vt/H3qy0jkfOlcMOx57OMh8X832bgNhCPBrUGn8QMiWKPkt0GgcIr9tiSkDYLQ/640hsIYmW7s0k3hb0GUP6OM4JQMaeFbOYWUx0Tli7Oml9FraCu3FEd+1aftnk8v/EmnjeUMoOfVXlPMr45tZKBuU/xDksbvLf62NL2MOOUgpbRs919LaDmlRh20UILrP4lSLagF7BWZvTvRC3ZAMASfGbp27P0ApkLRdtyQQ/HNUko4q09jZLeN1EnMGQX21oZQ12FM1Jpl/AVLE49PJ8GmwRPnZLV8hZqnWbIOZTLHMauUSitoePdIdvLx0NC8Ndey6GlRX5GHRId5GX3ABVeQ==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=KJJga7vr03s1YuWbk7nM2BhADNArS9yMNgfqKaBJP1c=;\n b=PfDgI0MjIHdejTzOs3+Lf0aAaZoSQyO/Pa+b6aWuWQGu4CztU+2uocwLWxy4nQOsdsyG/cD6MQw2LWfSXvotjWH4WOzGGGK7XDX+PBVtfiADbqNEKapFpTu3Kcr4oNVZkgvKuHcdBiYMnNgBhOno4stdGqiBvlfpafKfSYD43M2hxd6aqgKSRHalgmQgjlHobsLq84j7OJ3r1Ytq/tpGcBct7kPny7gRWI+i2//kND/gQ49wboYOiWsTPBLgPBYkYzxJEJv9CC1cqvcjnf2SH+/5LUOMiwY6ezyVaIWWs/Nfj7C0yLHwqzWCxbCK4tM6QCr0Bb6FIbdBpbS6jou7tw==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 12.22.5.236) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass\n (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none\n (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=KJJga7vr03s1YuWbk7nM2BhADNArS9yMNgfqKaBJP1c=;\n b=dkj3+YUuaE35AdaMFgLX1U3ZniVsgEbHYT1Jl4gO+Sfn7K9HtGRf3+Z9V3TtWjvzzWfChAhE1KNtdDhYZshB5ZoVdH/sRfZyL5+QBsb3jmxdl1JEFGzRQFhk0L5TjmvXJX4R55DsE1hmpzTObr2/pI5YYL3FPrwgmXdorsk+z0t5Ls5Aodi+sOqlJp9vE/KMBTLidKY6vUfukMOMcaapTnNZi80DCBctMG5XQv3i35+nl1+v4gpaYr4rAn2D+gJliQUsIl4vGAmaqoGI0Kh7+lte65PvHFJiI3KuKUj2x6zlU5//vBU1zHOfCeGkef9KKEJ+rQseIDDPc+hQDXNU8Q==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 12.22.5.236)\n smtp.mailfrom=nvidia.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 12.22.5.236 as permitted sender) receiver=protection.outlook.com;\n client-ip=12.22.5.236; helo=mail.nvidia.com;",
        "From": "Alexander Kozyrev <akozyrev@nvidia.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<orika@nvidia.com>, <thomas@monjalon.net>, <ivan.malov@oktetlabs.ru>,\n <andrew.rybchenko@oktetlabs.ru>, <ferruh.yigit@intel.com>,\n <mohammad.abdul.awal@intel.com>, <qi.z.zhang@intel.com>,\n <jerinj@marvell.com>, <ajit.khaparde@broadcom.com>",
        "Subject": "[PATCH 07/10] app/testpmd: implement rte flow queue create flow",
        "Date": "Tue, 18 Jan 2022 07:07:59 +0200",
        "Message-ID": "<20220118050802.3915187-8-akozyrev@nvidia.com>",
        "X-Mailer": "git-send-email 2.18.2",
        "In-Reply-To": "<20220118050802.3915187-6-akozyrev@nvidia.com>",
        "References": "<20220118050802.3915187-6-akozyrev@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.126.230.35]",
        "X-ClientProxiedBy": "HQMAIL107.nvidia.com (172.20.187.13) To\n rnnvmail201.nvidia.com (10.129.68.8)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "bcbd5123-fdb8-44be-a31a-08d9da40b0bb",
        "X-MS-TrafficTypeDiagnostic": "DM6PR12MB3737:EE_|MN2PR12MB3215:EE_",
        "X-LD-Processed": "43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr,ExtAddr",
        "X-Microsoft-Antispam-PRVS": "\n <DM6PR12MB37378CB2F77DEA7B1D4AD2B3AF589@DM6PR12MB3737.namprd12.prod.outlook.com>",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:6430;",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n B4WuHsB39edExnGmppOhqqFwOYre+oNw2A0D3uIpU2USoAEdT2lgpgXr8xhIT5lIspc7Fz0OGAzqv52PI7j1EcUVYJxMpaGB7E4RKcMTSv0qIqO6gs7PxxcPwhlSADg7tFcaezn6i5SwOererRyW758+G34MoDzEwNnsbZnsOJCL+P7WclWV4UWSBjaKQcdfYE5ykSDhVH11o1BDn4tSO1UcO+NcDdtkE1iDv8cuboDeFz2wWcsxKiEvoTRpuJ2J7WZCiK9L45RmSKKt6eXaFoTX5Es9eeiGyPmFyZ7pqxGgRRXHdy5z+F9gdCfswigm0TSeFr5FLxeJH4rR8GC0xeb14ootHYDR6qNBKZvJGTwXTWylwyu8l9SXf5nvpPoDx2zbnaI86wtteH/77F2nTFv3/uC3Z2RM2POIc5VOFeyS0UOAe/rm2UXD7MAkw4NZ3iQfLcA3bT3KpxA2wjL6Uq7ohSY4Dz37rQPkTf01OLhr3pvB8KShP0dnxnO/13J7wCAkxprawhh707ZGEoGg+OzVN5lGiDibnGTgF20tvXl7+meCdkdKDBTFC7MyVuRxhmvPA9WlIVwwhKMXZQst0p3zR7RT5cPX4+DOdZ/os+96bZBPhlpX6znB877d9ZM46sVFUo65i4bXIwbw9eGWOXrmcECvkJYaMwp0btfEmyV8a5B/dqjIuJh87Gppchde3WgRYcUPcpO4Hov7iYQvnlcgVtPZmujLKtPNMLY7lUi2qDRvI6qe2olEt46OZK8LkDwkSgNfbeC/bQQdzE4888aHoahpIE6uW1g44HmHLsE=",
        "X-Forefront-Antispam-Report": "CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:;\n IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE;\n SFS:(4636009)(36840700001)(40470700002)(46966006)(6666004)(81166007)(316002)(356005)(16526019)(5660300002)(7696005)(2616005)(186003)(6286002)(426003)(82310400004)(508600001)(47076005)(40460700001)(70206006)(30864003)(1076003)(70586007)(336012)(36860700001)(86362001)(26005)(6916009)(2906002)(8936002)(36756003)(54906003)(8676002)(4326008)(55016003)(83380400001)(36900700001);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "18 Jan 2022 05:09:22.5610 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n bcbd5123-fdb8-44be-a31a-08d9da40b0bb",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n DM6NAM11FT011.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "MN2PR12MB3215",
        "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": "Add testpmd support for the rte_flow_q_create/rte_flow_q_destroy API.\nProvide the command line interface for enqueueing flow creation/destruction\noperations. Usage example:\n  testpmd> flow queue 0 create 0 drain yes table 6\n           item_template 0 action_template 0\n           pattern eth dst is 00:16:3e:31:15:c3 / end actions drop / end\n  testpmd> flow queue 0 destroy 0 drain yes rule 0\n\nSigned-off-by: Alexander Kozyrev <akozyrev@nvidia.com>\n---\n app/test-pmd/cmdline_flow.c                 | 266 +++++++++++++++++++-\n app/test-pmd/config.c                       | 153 +++++++++++\n app/test-pmd/testpmd.h                      |   7 +\n doc/guides/testpmd_app_ug/testpmd_funcs.rst |  55 ++++\n 4 files changed, 480 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex 4dc2a2aaeb..6a8e6fc683 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -59,6 +59,7 @@ enum index {\n \tCOMMON_ITEM_TEMPLATE_ID,\n \tCOMMON_ACTION_TEMPLATE_ID,\n \tCOMMON_TABLE_ID,\n+\tCOMMON_QUEUE_ID,\n \n \t/* TOP-level command. */\n \tADD,\n@@ -91,6 +92,7 @@ enum index {\n \tISOLATE,\n \tTUNNEL,\n \tFLEX,\n+\tQUEUE,\n \n \t/* Flex arguments */\n \tFLEX_ITEM_INIT,\n@@ -113,6 +115,22 @@ enum index {\n \tACTION_TEMPLATE_SPEC,\n \tACTION_TEMPLATE_MASK,\n \n+\t/* Queue arguments. */\n+\tQUEUE_CREATE,\n+\tQUEUE_DESTROY,\n+\n+\t/* Queue create arguments. */\n+\tQUEUE_CREATE_ID,\n+\tQUEUE_CREATE_DRAIN,\n+\tQUEUE_TABLE,\n+\tQUEUE_ITEM_TEMPLATE,\n+\tQUEUE_ACTION_TEMPLATE,\n+\tQUEUE_SPEC,\n+\n+\t/* Queue destroy arguments. */\n+\tQUEUE_DESTROY_ID,\n+\tQUEUE_DESTROY_DRAIN,\n+\n \t/* Table arguments. */\n \tTABLE_CREATE,\n \tTABLE_DESTROY,\n@@ -889,6 +907,8 @@ struct token {\n struct buffer {\n \tenum index command; /**< Flow command. */\n \tportid_t port; /**< Affected port ID. */\n+\tqueueid_t queue; /** Async queue ID. */\n+\tbool drain; /** Drain the queue on async oparation */\n \tunion {\n \t\tstruct {\n \t\t\tstruct rte_flow_port_attr port_attr;\n@@ -918,6 +938,7 @@ struct buffer {\n \t\t\tuint32_t action_id;\n \t\t} ia; /* Indirect action query arguments */\n \t\tstruct {\n+\t\t\tuint32_t table_id;\n \t\t\tuint32_t it_id;\n \t\t\tuint32_t at_id;\n \t\t\tstruct rte_flow_attr attr;\n@@ -1067,6 +1088,18 @@ static const enum index next_table_destroy_attr[] = {\n \tZERO,\n };\n \n+static const enum index next_queue_subcmd[] = {\n+\tQUEUE_CREATE,\n+\tQUEUE_DESTROY,\n+\tZERO,\n+};\n+\n+static const enum index next_queue_destroy_attr[] = {\n+\tQUEUE_DESTROY_ID,\n+\tEND,\n+\tZERO,\n+};\n+\n static const enum index next_ia_create_attr[] = {\n \tINDIRECT_ACTION_CREATE_ID,\n \tINDIRECT_ACTION_INGRESS,\n@@ -2116,6 +2149,12 @@ static int parse_table(struct context *, const struct token *,\n static int parse_table_destroy(struct context *, const struct token *,\n \t\t\t       const char *, unsigned int,\n \t\t\t       void *, unsigned int);\n+static int parse_qo(struct context *, const struct token *,\n+\t\t    const char *, unsigned int,\n+\t\t    void *, unsigned int);\n+static int parse_qo_destroy(struct context *, const struct token *,\n+\t\t\t    const char *, unsigned int,\n+\t\t\t    void *, unsigned int);\n static int parse_tunnel(struct context *, const struct token *,\n \t\t\tconst char *, unsigned int,\n \t\t\tvoid *, unsigned int);\n@@ -2191,6 +2230,8 @@ static int comp_action_template_id(struct context *, const struct token *,\n \t\t\t\t   unsigned int, char *, unsigned int);\n static int comp_table_id(struct context *, const struct token *,\n \t\t\t unsigned int, char *, unsigned int);\n+static int comp_queue_id(struct context *, const struct token *,\n+\t\t\t unsigned int, char *, unsigned int);\n \n /** Token definitions. */\n static const struct token token_list[] = {\n@@ -2362,6 +2403,13 @@ static const struct token token_list[] = {\n \t\t.call = parse_int,\n \t\t.comp = comp_table_id,\n \t},\n+\t[COMMON_QUEUE_ID] = {\n+\t\t.name = \"{queue_id}\",\n+\t\t.type = \"QUEUE_ID\",\n+\t\t.help = \"queue id\",\n+\t\t.call = parse_int,\n+\t\t.comp = comp_queue_id,\n+\t},\n \t/* Top-level command. */\n \t[FLOW] = {\n \t\t.name = \"flow\",\n@@ -2383,7 +2431,8 @@ static const struct token token_list[] = {\n \t\t\t      QUERY,\n \t\t\t      ISOLATE,\n \t\t\t      TUNNEL,\n-\t\t\t      FLEX)),\n+\t\t\t      FLEX,\n+\t\t\t      QUEUE)),\n \t\t.call = parse_init,\n \t},\n \t/* Top-level command. */\n@@ -2641,6 +2690,83 @@ static const struct token token_list[] = {\n \t\t.call = parse_table,\n \t},\n \t/* Top-level command. */\n+\t[QUEUE] = {\n+\t\t.name = \"queue\",\n+\t\t.help = \"queue a flow rule operation\",\n+\t\t.next = NEXT(next_queue_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer, port)),\n+\t\t.call = parse_qo,\n+\t},\n+\t/* Sub-level commands. */\n+\t[QUEUE_CREATE] = {\n+\t\t.name = \"create\",\n+\t\t.help = \"create a flow rule\",\n+\t\t.next = NEXT(NEXT_ENTRY(QUEUE_TABLE), NEXT_ENTRY(COMMON_QUEUE_ID)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer, queue)),\n+\t\t.call = parse_qo,\n+\t},\n+\t[QUEUE_DESTROY] = {\n+\t\t.name = \"destroy\",\n+\t\t.help = \"destroy a flow rule\",\n+\t\t.next = NEXT(NEXT_ENTRY(QUEUE_DESTROY_ID),\n+\t\t\t     NEXT_ENTRY(COMMON_QUEUE_ID)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer, queue)),\n+\t\t.call = parse_qo_destroy,\n+\t},\n+\t/* Queue  arguments. */\n+\t[QUEUE_TABLE] = {\n+\t\t.name = \"table\",\n+\t\t.help = \"specify table id\",\n+\t\t.next = NEXT(NEXT_ENTRY(QUEUE_ITEM_TEMPLATE),\n+\t\t\t     NEXT_ENTRY(COMMON_TABLE_ID)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer,\n+\t\t\t\t\targs.vc.table_id)),\n+\t\t.call = parse_qo,\n+\t},\n+\t[QUEUE_ITEM_TEMPLATE] = {\n+\t\t.name = \"item_template\",\n+\t\t.help = \"specify item template id\",\n+\t\t.next = NEXT(NEXT_ENTRY(QUEUE_ACTION_TEMPLATE),\n+\t\t\t     NEXT_ENTRY(COMMON_ITEM_TEMPLATE_ID)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer,\n+\t\t\t\t\targs.vc.it_id)),\n+\t\t.call = parse_qo,\n+\t},\n+\t[QUEUE_ACTION_TEMPLATE] = {\n+\t\t.name = \"action_template\",\n+\t\t.help = \"specify action template id\",\n+\t\t.next = NEXT(NEXT_ENTRY(QUEUE_CREATE_DRAIN),\n+\t\t\t     NEXT_ENTRY(COMMON_ACTION_TEMPLATE_ID)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer,\n+\t\t\t\t\targs.vc.at_id)),\n+\t\t.call = parse_qo,\n+\t},\n+\t[QUEUE_CREATE_DRAIN] = {\n+\t\t.name = \"drain\",\n+\t\t.help = \"drain queue immediately\",\n+\t\t.next = NEXT(NEXT_ENTRY(ITEM_PATTERN),\n+\t\t\t     NEXT_ENTRY(COMMON_BOOLEAN)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer, drain)),\n+\t\t.call = parse_qo,\n+\t},\n+\t[QUEUE_DESTROY_DRAIN] = {\n+\t\t.name = \"drain\",\n+\t\t.help = \"drain queue immediately\",\n+\t\t.next = NEXT(NEXT_ENTRY(QUEUE_DESTROY_ID),\n+\t\t\t     NEXT_ENTRY(COMMON_BOOLEAN)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer, drain)),\n+\t\t.call = parse_qo_destroy,\n+\t},\n+\t[QUEUE_DESTROY_ID] = {\n+\t\t.name = \"rule\",\n+\t\t.help = \"specify rule id to destroy\",\n+\t\t.next = NEXT(next_queue_destroy_attr,\n+\t\t\tNEXT_ENTRY(COMMON_UNSIGNED)),\n+\t\t.args = ARGS(ARGS_ENTRY_PTR(struct buffer,\n+\t\t\t\t\t    args.destroy.rule)),\n+\t\t.call = parse_qo_destroy,\n+\t},\n+\t/* Top-level command. */\n \t[INDIRECT_ACTION] = {\n \t\t.name = \"indirect_action\",\n \t\t.type = \"{command} {port_id} [{arg} [...]]\",\n@@ -8154,6 +8280,111 @@ parse_table_destroy(struct context *ctx, const struct token *token,\n \treturn len;\n }\n \n+/** Parse tokens for queue create commands. */\n+static int\n+parse_qo(struct context *ctx, const struct token *token,\n+\t const char *str, unsigned int len,\n+\t void *buf, unsigned int size)\n+{\n+\tstruct buffer *out = buf;\n+\n+\t/* Token name must match. */\n+\tif (parse_default(ctx, token, str, len, NULL, 0) < 0)\n+\t\treturn -1;\n+\t/* Nothing else to do if there is no buffer. */\n+\tif (!out)\n+\t\treturn len;\n+\tif (!out->command) {\n+\t\tif (ctx->curr != QUEUE)\n+\t\t\treturn -1;\n+\t\tif (sizeof(*out) > size)\n+\t\t\treturn -1;\n+\t\tout->command = ctx->curr;\n+\t\tctx->objdata = 0;\n+\t\tctx->object = out;\n+\t\tctx->objmask = NULL;\n+\t\tout->args.vc.data = (uint8_t *)out + size;\n+\t\treturn len;\n+\t}\n+\tswitch (ctx->curr) {\n+\tcase QUEUE_CREATE:\n+\t\tout->command = ctx->curr;\n+\t\tctx->objdata = 0;\n+\t\tctx->object = out;\n+\t\tctx->objmask = NULL;\n+\t\treturn len;\n+\tcase QUEUE_TABLE:\n+\tcase QUEUE_ITEM_TEMPLATE:\n+\tcase QUEUE_ACTION_TEMPLATE:\n+\tcase QUEUE_CREATE_DRAIN:\n+\t\treturn len;\n+\tcase ITEM_PATTERN:\n+\t\tout->args.vc.pattern =\n+\t\t\t(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),\n+\t\t\t\t\t       sizeof(double));\n+\t\tctx->object = out->args.vc.pattern;\n+\t\tctx->objmask = NULL;\n+\t\treturn len;\n+\tcase ACTIONS:\n+\t\tout->args.vc.actions =\n+\t\t\t(void *)RTE_ALIGN_CEIL((uintptr_t)\n+\t\t\t\t\t       (out->args.vc.pattern +\n+\t\t\t\t\t\tout->args.vc.pattern_n),\n+\t\t\t\t\t       sizeof(double));\n+\t\tctx->object = out->args.vc.actions;\n+\t\tctx->objmask = NULL;\n+\t\treturn len;\n+\tdefault:\n+\t\treturn -1;\n+\t}\n+}\n+\n+/** Parse tokens for queue destroy command. */\n+static int\n+parse_qo_destroy(struct context *ctx, const struct token *token,\n+\t\t const char *str, unsigned int len,\n+\t\t void *buf, unsigned int size)\n+{\n+\tstruct buffer *out = buf;\n+\tuint32_t *flow_id;\n+\n+\t/* Token name must match. */\n+\tif (parse_default(ctx, token, str, len, NULL, 0) < 0)\n+\t\treturn -1;\n+\t/* Nothing else to do if there is no buffer. */\n+\tif (!out)\n+\t\treturn len;\n+\tif (!out->command || out->command == QUEUE) {\n+\t\tif (ctx->curr != QUEUE_DESTROY)\n+\t\t\treturn -1;\n+\t\tif (sizeof(*out) > size)\n+\t\t\treturn -1;\n+\t\tout->command = ctx->curr;\n+\t\tctx->objdata = 0;\n+\t\tctx->object = out;\n+\t\tctx->objmask = NULL;\n+\t\tout->args.destroy.rule =\n+\t\t\t(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),\n+\t\t\t\t\t       sizeof(double));\n+\t\treturn len;\n+\t}\n+\tswitch (ctx->curr) {\n+\tcase QUEUE_DESTROY_ID:\n+\t\tflow_id = out->args.destroy.rule\n+\t\t\t\t+ out->args.destroy.rule_n++;\n+\t\tif ((uint8_t *)flow_id > (uint8_t *)out + size)\n+\t\t\treturn -1;\n+\t\tctx->objdata = 0;\n+\t\tctx->object = flow_id;\n+\t\tctx->objmask = NULL;\n+\t\treturn len;\n+\tcase QUEUE_DESTROY_DRAIN:\n+\t\treturn len;\n+\tdefault:\n+\t\treturn -1;\n+\t}\n+}\n+\n static int\n parse_flex(struct context *ctx, const struct token *token,\n \t     const char *str, unsigned int len,\n@@ -9193,6 +9424,28 @@ comp_table_id(struct context *ctx, const struct token *token,\n \treturn i;\n }\n \n+/** Complete available queue IDs. */\n+static int\n+comp_queue_id(struct context *ctx, const struct token *token,\n+\t      unsigned int ent, char *buf, unsigned int size)\n+{\n+\tunsigned int i = 0;\n+\tstruct rte_port *port;\n+\n+\t(void)token;\n+\tif (port_id_is_invalid(ctx->port, DISABLED_WARN) ||\n+\t    ctx->port == (portid_t)RTE_PORT_ALL)\n+\t\treturn -1;\n+\tport = &ports[ctx->port];\n+\tfor (i = 0; i < port->queue_nb; i++) {\n+\t\tif (buf && i == ent)\n+\t\t\treturn snprintf(buf, size, \"%u\", i);\n+\t}\n+\tif (buf)\n+\t\treturn -1;\n+\treturn i;\n+}\n+\n /** Internal context. */\n static struct context cmd_flow_context;\n \n@@ -9485,6 +9738,17 @@ cmd_flow_parsed(const struct buffer *in)\n \t\t\t\t\tin->args.table_destroy.table_id_n,\n \t\t\t\t\tin->args.table_destroy.table_id);\n \t\tbreak;\n+\tcase QUEUE_CREATE:\n+\t\tport_queue_flow_create(in->port, in->queue, in->drain,\n+\t\t\t\t       in->args.vc.table_id, in->args.vc.it_id,\n+\t\t\t\t       in->args.vc.at_id, in->args.vc.pattern,\n+\t\t\t\t       in->args.vc.actions);\n+\t\tbreak;\n+\tcase QUEUE_DESTROY:\n+\t\tport_queue_flow_destroy(in->port, in->queue, in->drain,\n+\t\t\t\t\tin->args.destroy.rule_n,\n+\t\t\t\t\tin->args.destroy.rule);\n+\t\tbreak;\n \tcase INDIRECT_ACTION_CREATE:\n \t\tport_action_handle_create(\n \t\t\t\tin->port, in->args.vc.attr.group,\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 07582fa552..31164d6bf6 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -2411,6 +2411,159 @@ port_flow_table_destroy(portid_t port_id,\n \treturn ret;\n }\n \n+/** Enqueue create flow rule operation. */\n+int\n+port_queue_flow_create(portid_t port_id, queueid_t queue_id,\n+\t\t       bool drain, uint32_t table_id,\n+\t\t       uint32_t item_id, uint32_t action_id,\n+\t\t       const struct rte_flow_item *pattern,\n+\t\t       const struct rte_flow_action *actions)\n+{\n+\tstruct rte_flow_q_ops_attr ops_attr = { .drain = drain };\n+\tstruct rte_flow_q_op_res comp = { 0 };\n+\tstruct rte_flow *flow;\n+\tstruct rte_port *port;\n+\tstruct port_flow *pf;\n+\tstruct port_table *pt;\n+\tuint32_t id = 0;\n+\tbool found;\n+\tint ret = 0;\n+\tstruct rte_flow_error error;\n+\tstruct rte_flow_action_age *age = age_action_get(actions);\n+\n+\tport = &ports[port_id];\n+\tif (port->flow_list) {\n+\t\tif (port->flow_list->id == UINT32_MAX) {\n+\t\t\tprintf(\"Highest rule ID is already assigned,\"\n+\t\t\t       \" delete it first\");\n+\t\t\treturn -ENOMEM;\n+\t\t}\n+\t\tid = port->flow_list->id + 1;\n+\t}\n+\n+\tif (queue_id >= port->queue_nb) {\n+\t\tprintf(\"Queue #%u is invalid\\n\", queue_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tfound = false;\n+\tpt = port->table_list;\n+\twhile (pt) {\n+\t\tif (table_id == pt->id) {\n+\t\t\tfound = true;\n+\t\t\tbreak;\n+\t\t}\n+\t\tpt = pt->next;\n+\t}\n+\tif (!found) {\n+\t\tprintf(\"Table #%u is invalid\\n\", table_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tpf = port_flow_new(NULL, pattern, actions, &error);\n+\tif (!pf)\n+\t\treturn port_flow_complain(&error);\n+\tif (age) {\n+\t\tpf->age_type = ACTION_AGE_CONTEXT_TYPE_FLOW;\n+\t\tage->context = &pf->age_type;\n+\t}\n+\t/* Poisoning to make sure PMDs update it in case of error. */\n+\tmemset(&error, 0x11, sizeof(error));\n+\tflow = rte_flow_q_flow_create(port_id, queue_id, &ops_attr,\n+\t\tpt->table, pattern, item_id, actions, action_id, &error);\n+\tif (!flow) {\n+\t\tuint32_t flow_id = pf->id;\n+\t\tport_queue_flow_destroy(port_id, queue_id, true, 1, &flow_id);\n+\t\treturn port_flow_complain(&error);\n+\t}\n+\n+\twhile (ret == 0) {\n+\t\t/* Poisoning to make sure PMDs update it in case of error. */\n+\t\tmemset(&error, 0x22, sizeof(error));\n+\t\tret = rte_flow_q_dequeue(port_id, queue_id, &comp, 1, &error);\n+\t\tif (ret < 0) {\n+\t\t\tprintf(\"Failed to poll queue\\n\");\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t}\n+\n+\tpf->next = port->flow_list;\n+\tpf->id = id;\n+\tpf->flow = flow;\n+\tport->flow_list = pf;\n+\tprintf(\"Flow rule #%u creation enqueued\\n\", pf->id);\n+\treturn 0;\n+}\n+\n+/** Enqueue number of destroy flow rules operations. */\n+int\n+port_queue_flow_destroy(portid_t port_id, queueid_t queue_id,\n+\t\t\tbool drain, uint32_t n, const uint32_t *rule)\n+{\n+\tstruct rte_flow_q_ops_attr op_attr = { .drain = drain };\n+\tstruct rte_flow_q_op_res comp = { 0 };\n+\tstruct rte_port *port;\n+\tstruct port_flow **tmp;\n+\tuint32_t c = 0;\n+\tint ret = 0;\n+\n+\tif (port_id_is_invalid(port_id, ENABLED_WARN) ||\n+\t    port_id == (portid_t)RTE_PORT_ALL)\n+\t\treturn -EINVAL;\n+\tport = &ports[port_id];\n+\n+\tif (queue_id >= port->queue_nb) {\n+\t\tprintf(\"Queue #%u is invalid\\n\", queue_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\ttmp = &port->flow_list;\n+\twhile (*tmp) {\n+\t\tuint32_t i;\n+\n+\t\tfor (i = 0; i != n; ++i) {\n+\t\t\tstruct rte_flow_error error;\n+\t\t\tstruct port_flow *pf = *tmp;\n+\n+\t\t\tif (rule[i] != pf->id)\n+\t\t\t\tcontinue;\n+\t\t\t/*\n+\t\t\t * Poisoning to make sure PMD\n+\t\t\t * update it in case of error.\n+\t\t\t */\n+\t\t\tmemset(&error, 0x33, sizeof(error));\n+\t\t\tif (rte_flow_q_flow_destroy(port_id, queue_id, &op_attr,\n+\t\t\t\t\t\t    pf->flow, &error)) {\n+\t\t\t\tret = port_flow_complain(&error);\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\n+\t\t\twhile (ret == 0) {\n+\t\t\t\t/*\n+\t\t\t\t * Poisoning to make sure PMD\n+\t\t\t\t * update it in case of error.\n+\t\t\t\t */\n+\t\t\t\tmemset(&error, 0x44, sizeof(error));\n+\t\t\t\tret = rte_flow_q_dequeue(port_id, queue_id,\n+\t\t\t\t\t\t\t &comp, 1, &error);\n+\t\t\t\tif (ret < 0) {\n+\t\t\t\t\tprintf(\"Failed to poll queue\\n\");\n+\t\t\t\t\treturn -EINVAL;\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\tprintf(\"Flow rule #%u destruction enqueued\\n\", pf->id);\n+\t\t\t*tmp = pf->next;\n+\t\t\tfree(pf);\n+\t\t\tbreak;\n+\t\t}\n+\t\tif (i == n)\n+\t\t\ttmp = &(*tmp)->next;\n+\t\t++c;\n+\t}\n+\treturn ret;\n+}\n+\n /** Create flow rule. */\n int\n port_flow_create(portid_t port_id,\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex b8655b9987..99845b9e2f 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -927,6 +927,13 @@ int port_flow_table_create(portid_t port_id, uint32_t id,\n \t\t   uint32_t nb_action_templates, uint32_t *action_templates);\n int port_flow_table_destroy(portid_t port_id,\n \t\t\t    uint32_t n, const uint32_t *table);\n+int port_queue_flow_create(portid_t port_id, queueid_t queue_id,\n+\t\t\t   bool drain, uint32_t table_id,\n+\t\t\t   uint32_t item_id, uint32_t action_id,\n+\t\t\t   const struct rte_flow_item *pattern,\n+\t\t\t   const struct rte_flow_action *actions);\n+int port_queue_flow_destroy(portid_t port_id, queueid_t queue_id,\n+\t\t\t    bool drain, uint32_t n, const uint32_t *rule);\n int port_flow_validate(portid_t port_id,\n \t\t       const struct rte_flow_attr *attr,\n \t\t       const struct rte_flow_item *pattern,\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex f8a87564be..eb9dff7221 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -3355,6 +3355,19 @@ following sections.\n        pattern {item} [/ {item} [...]] / end\n        actions {action} [/ {action} [...]] / end\n \n+- Enqueue creation of a flow rule::\n+\n+   flow queue {port_id} create {queue_id} [drain {boolean}]\n+       table {table_id} item_template {item_template_id}\n+       action_template {action_template_id}\n+       pattern {item} [/ {item} [...]] / end\n+       actions {action} [/ {action} [...]] / end\n+\n+- Enqueue destruction of specific flow rules::\n+\n+   flow queue {port_id} destroy {queue_id}\n+       [drain {boolean}] rule {rule_id} [...]\n+\n - Create a flow rule::\n \n    flow create {port_id}\n@@ -3654,6 +3667,29 @@ one.\n \n **All unspecified object values are automatically initialized to 0.**\n \n+Enqueueing creation of flow rules\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+``flow queue create`` adds creation operation of a flow rule to a queue.\n+It is bound to ``rte_flow_q_flow_create()``::\n+\n+   flow queue {port_id} create {queue_id} [drain {boolean}]\n+       table {table_id} item_template {item_template_id}\n+       action_template {action_template_id}\n+       pattern {item} [/ {item} [...]] / end\n+       actions {action} [/ {action} [...]] / end\n+\n+If successful, it will return a flow rule ID usable with other commands::\n+\n+   Flow rule #[...] created\n+\n+Otherwise it will show an error message of the form::\n+\n+   Caught error type [...] ([...]): [...]\n+\n+This command uses the same pattern items and actions as ``flow create``,\n+their format is described in `Creating flow rules`_.\n+\n Attributes\n ^^^^^^^^^^\n \n@@ -4368,6 +4404,25 @@ Non-existent rule IDs are ignored::\n    Flow rule #0 destroyed\n    testpmd>\n \n+Enqueueing destruction of flow rules\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+``flow queue destroy`` adds destruction operations to destroy one or more rules\n+from their rule ID (as returned by ``flow queue create``) to a queue,\n+this command calls ``rte_flow_q_flow_destroy()`` as many times as necessary::\n+\n+   flow queue {port_id} destroy {queue_id}\n+        [drain {boolean}] rule {rule_id} [...]\n+\n+If successful, it will show::\n+\n+   Flow rule #[...] destruction enqueued\n+\n+It does not report anything for rule IDs that do not exist. The usual error\n+message is shown when a rule cannot be destroyed::\n+\n+   Caught error type [...] ([...]): [...]\n+\n Querying flow rules\n ~~~~~~~~~~~~~~~~~~~\n \n",
    "prefixes": [
        "07/10"
    ]
}