get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 107867,
    "url": "http://patches.dpdk.org/api/patches/107867/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220220034409.2226860-11-akozyrev@nvidia.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": "<20220220034409.2226860-11-akozyrev@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220220034409.2226860-11-akozyrev@nvidia.com",
    "date": "2022-02-20T03:44:08",
    "name": "[v8,10/11] app/testpmd: add flow queue pull operation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "7504fbb4097acb09f3676e6f1843dafabe321813",
    "submitter": {
        "id": 1873,
        "url": "http://patches.dpdk.org/api/people/1873/?format=api",
        "name": "Alexander Kozyrev",
        "email": "akozyrev@nvidia.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220220034409.2226860-11-akozyrev@nvidia.com/mbox/",
    "series": [
        {
            "id": 21750,
            "url": "http://patches.dpdk.org/api/series/21750/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=21750",
            "date": "2022-02-20T03:43:58",
            "name": "ethdev: datapath-focused flow rules management",
            "version": 8,
            "mbox": "http://patches.dpdk.org/series/21750/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/107867/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/107867/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 C0D7DA00C2;\n\tSun, 20 Feb 2022 04:45:46 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 62B234114A;\n\tSun, 20 Feb 2022 04:45:13 +0100 (CET)",
            "from NAM12-MW2-obe.outbound.protection.outlook.com\n (mail-mw2nam12on2040.outbound.protection.outlook.com [40.107.244.40])\n by mails.dpdk.org (Postfix) with ESMTP id EA03F410E7\n for <dev@dpdk.org>; Sun, 20 Feb 2022 04:45:10 +0100 (CET)",
            "from DM6PR12MB4060.namprd12.prod.outlook.com (2603:10b6:5:216::15)\n by MN2PR12MB3118.namprd12.prod.outlook.com (2603:10b6:208:c6::33) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.17; Sun, 20 Feb\n 2022 03:45:07 +0000",
            "from BN9PR03CA0672.namprd03.prod.outlook.com (2603:10b6:408:10e::17)\n by DM6PR12MB4060.namprd12.prod.outlook.com (2603:10b6:5:216::15) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.16; Sun, 20 Feb\n 2022 03:45:04 +0000",
            "from BN8NAM11FT055.eop-nam11.prod.protection.outlook.com\n (2603:10b6:408:10e:cafe::da) by BN9PR03CA0672.outlook.office365.com\n (2603:10b6:408:10e::17) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.14 via Frontend\n Transport; Sun, 20 Feb 2022 03:45:04 +0000",
            "from mail.nvidia.com (12.22.5.234) by\n BN8NAM11FT055.mail.protection.outlook.com (10.13.177.62) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id\n 15.20.4995.15 via Frontend Transport; Sun, 20 Feb 2022 03:45:04 +0000",
            "from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com\n (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Sun, 20 Feb 2022 03:45:02 +0000",
            "from pegasus01.mtr.labs.mlnx (10.126.230.35) by\n rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9;\n Sat, 19 Feb 2022 19:44:58 -0800"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=Ot/ZOzqwDJIBXpeTuCnqpG9j6eb1z7eAacU/p9uI6dKl+nDj5XXYRpdZHe3kiF/84Ko9ZRtaPzUNXHKpcn2sw3biKS1FefkF8N0TyxficRpRRFHdR7HmMG4nX3P6HjEW14lMo/MDkb9Mgz3WsTLk5eAiWTK+jhZDu3uOgPgr/LPOv4E3rakMiBt1JwFvYtxRTr3uZ0aExP/oIJvMhwRPhbkAHdcP/UrKzlhS02l62b+hx3Q/Sq2IEllbnLWeAjSBt1VP7HBtLQOdr5IEVH4H8xlcmKMr1lCs9Ou+VUoCn10SxKM7I/ETuIOa7fkWy6m4ecBszDfEfBMlzH2z3f4YlA==",
        "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=k8pmHHUUjzX73O9IbnGxTSt292xJageuxx2A7uDEV5c=;\n b=NmAn8HPxlRP/oEujdSz+00/N7hvL6WBUTR1xm1WB8Ez739u8iHfaeiAqazkM8qcANoB6UyzmqjFFlmYbSMCiM7PMp4xW00fhZGerk1YiOWkPe+ibstJ6H18NavyXa9tWB5kU2sOaHpZv6Q5PsmSyimUhfJIXCmTGgq/QVvNGN1NSsyoE33xo+AgHi78H7f1lalHHTnW/8nftQptXDm+PWj+8HdqpBN4GQGnp3K+DExEgtdkO6fx2pE7FZsBhF6ZL6cHMBcZh/+7qVs/Cnm4McozAVxDzR9/e/9ejrDkYCAPjQl3AaXkC2VkAj5KTXeKKys2DHa+WH8v3BGlDC2Hsow==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 12.22.5.234) 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=k8pmHHUUjzX73O9IbnGxTSt292xJageuxx2A7uDEV5c=;\n b=NCAoimPt3vDdCpepQZeaALxfHGbkpP7XDTrfhuQkxKCx0BoZ33ywNYEqJbGUaNRYCA2xtHNOcf3jLWR4gi2EcPgkZfGNOIpsKHlKM2M3Bg5H5JapBoF4AG9sPEEeFHIggh36/hZi/KosZPrNqiXeNTPYs3kdEOJYHXrj32IpBSZU4kCt3eTq40AgesVR6RNObyK0XdO0hGh1kr2HzYH+O+4mXxIRlF6Qy5+VGDwrOldJhxln7GKDlZzC29w+jVJ68IS54QXyo0k5WuVy8n3eoPNgzvbX3OQWyyGazAzbRWfPRJNT+MzDj9h1IOD+r0S0QtdCdOdBluwENK10C43vAA==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 12.22.5.234)\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.234 as permitted sender) receiver=protection.outlook.com;\n client-ip=12.22.5.234; 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>,\n <bruce.richardson@intel.com>",
        "Subject": "[PATCH v8 10/11] app/testpmd: add flow queue pull operation",
        "Date": "Sun, 20 Feb 2022 05:44:08 +0200",
        "Message-ID": "<20220220034409.2226860-11-akozyrev@nvidia.com>",
        "X-Mailer": "git-send-email 2.18.2",
        "In-Reply-To": "<20220220034409.2226860-1-akozyrev@nvidia.com>",
        "References": "<20220219041144.2145380-1-akozyrev@nvidia.com>\n <20220220034409.2226860-1-akozyrev@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.126.230.35]",
        "X-ClientProxiedBy": "rnnvmail202.nvidia.com (10.129.68.7) To\n rnnvmail201.nvidia.com (10.129.68.8)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "64f2ec08-6199-4b46-5f30-08d9f4236157",
        "X-MS-TrafficTypeDiagnostic": "DM6PR12MB4060:EE_|MN2PR12MB3118:EE_",
        "X-LD-Processed": "43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr,ExtAddr",
        "X-Microsoft-Antispam-PRVS": "\n <DM6PR12MB4060CEB1DC809279332B2F58AF399@DM6PR12MB4060.namprd12.prod.outlook.com>",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n BFWpqOCeVV2gjVm39zAQRnrIaqLIFUcFP/LaYIPd+IjBv0oSkKtEjYlFBkv/ZVZwfOa9aO+9cZdb4PPNxOnPJ4UY7F3+RB7W8NTXk5GkUSmfgQYed0mklWIvsanUmv/XSIAOOg/7cXCTQ1KBXo1XWLr6xe1vb7mdRs+69SXWfqQm70S5eGk7l70VS7+tk3pkXk8IYSQ997RiDL6Kg85+1q9dXj0SuKMfM2XrLYm/vZWyWP0Miu7wsC6yiKsA4IB3X6WyCrANzvHR+ZgXMaiF9nQs0QQN5/WJiVEoMfI6topAAqtHfVmF+aajjbe6qxKWGzqR70YCcOFPzLZ/Suwq8EvOM8e2qFneacVHyQ4Gdg1Z4E3WKGJo3iPwSaYS+WMKyd/E5gdjg1MpDHASwwSOirQSIk83vZzPCMTEHKgy0TmoTIInbT54R36iabEtFO94GhEbcuTyelGKSXi34hcuJqB/uNoj2DNFyKIQeSkuSoQR35w8uZ/5zmETbBIjsMo1dp/6tuOyD9Gs0+OZHClEoyeD/8Z+/wfcJWKqubn75AVv/rPYTNEzFsG82KrApYixoGubGJUICdNGj6r2QrTLGOZkLHoOnzoU8cZFfJZI+IDx0UG1BA+u6/LVs5740M87l9h+QzJM16oQ4lQO7t3oOvxpHV1ZK2iyZZYeNRvglbQGMNwIYm70TYLURYfnRtx8q7JZv3OUV2kPs3w2fEuLVA==",
        "X-Forefront-Antispam-Report": "CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:;\n IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE;\n SFS:(13230001)(4636009)(36840700001)(40470700004)(46966006)(186003)(16526019)(26005)(1076003)(8936002)(47076005)(2906002)(36860700001)(83380400001)(36756003)(70586007)(82310400004)(54906003)(316002)(70206006)(2616005)(426003)(4326008)(336012)(8676002)(81166007)(6666004)(7416002)(5660300002)(356005)(40460700003)(508600001)(6916009)(86362001)(36900700001);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "20 Feb 2022 03:45:04.2222 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 64f2ec08-6199-4b46-5f30-08d9f4236157",
        "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.234];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n BN8NAM11FT055.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "MN2PR12MB3118",
        "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_pull API.\nProvide the command line interface for pulling operations results.\nUsage example: flow pull 0 queue 0\n\nSigned-off-by: Alexander Kozyrev <akozyrev@nvidia.com>\nAcked-by: Ori Kam <orika@nvidia.com>\n---\n app/test-pmd/cmdline_flow.c                 | 56 +++++++++++++++-\n app/test-pmd/config.c                       | 74 +++++++++++++--------\n app/test-pmd/testpmd.h                      |  1 +\n doc/guides/testpmd_app_ug/testpmd_funcs.rst | 25 +++++++\n 4 files changed, 127 insertions(+), 29 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex af36975cdf..d4b72724e6 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -95,6 +95,7 @@ enum index {\n \tFLEX,\n \tQUEUE,\n \tPUSH,\n+\tPULL,\n \n \t/* Flex arguments */\n \tFLEX_ITEM_INIT,\n@@ -142,6 +143,9 @@ enum index {\n \t/* Push arguments. */\n \tPUSH_QUEUE,\n \n+\t/* Pull arguments. */\n+\tPULL_QUEUE,\n+\n \t/* Table arguments. */\n \tTABLE_CREATE,\n \tTABLE_DESTROY,\n@@ -2259,6 +2263,9 @@ static int parse_qo_destroy(struct context *, const struct token *,\n static int parse_push(struct context *, const struct token *,\n \t\t      const char *, unsigned int,\n \t\t      void *, unsigned int);\n+static int parse_pull(struct context *, const struct token *,\n+\t\t      const char *, unsigned int,\n+\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@@ -2538,7 +2545,8 @@ static const struct token token_list[] = {\n \t\t\t      TUNNEL,\n \t\t\t      FLEX,\n \t\t\t      QUEUE,\n-\t\t\t      PUSH)),\n+\t\t\t      PUSH,\n+\t\t\t      PULL)),\n \t\t.call = parse_init,\n \t},\n \t/* Top-level command. */\n@@ -2934,6 +2942,21 @@ static const struct token token_list[] = {\n \t\t.args = ARGS(ARGS_ENTRY(struct buffer, queue)),\n \t},\n \t/* Top-level command. */\n+\t[PULL] = {\n+\t\t.name = \"pull\",\n+\t\t.help = \"pull flow operations results\",\n+\t\t.next = NEXT(NEXT_ENTRY(PULL_QUEUE), NEXT_ENTRY(COMMON_PORT_ID)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer, port)),\n+\t\t.call = parse_pull,\n+\t},\n+\t/* Sub-level commands. */\n+\t[PULL_QUEUE] = {\n+\t\t.name = \"queue\",\n+\t\t.help = \"specify queue id\",\n+\t\t.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_QUEUE_ID)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer, queue)),\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@@ -8786,6 +8809,34 @@ parse_push(struct context *ctx, const struct token *token,\n \treturn len;\n }\n \n+/** Parse tokens for pull command. */\n+static int\n+parse_pull(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 != PULL)\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}\n+\treturn len;\n+}\n+\n static int\n parse_flex(struct context *ctx, const struct token *token,\n \t     const char *str, unsigned int len,\n@@ -10174,6 +10225,9 @@ cmd_flow_parsed(const struct buffer *in)\n \tcase PUSH:\n \t\tport_queue_flow_push(in->port, in->queue);\n \t\tbreak;\n+\tcase PULL:\n+\t\tport_queue_flow_pull(in->port, in->queue);\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 e3b5e348ab..2bd4359bfe 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -2469,14 +2469,12 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_id,\n \t\t       const struct rte_flow_action *actions)\n {\n \tstruct rte_flow_q_ops_attr ops_attr = { .postpone = postpone };\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 = { RTE_FLOW_ERROR_TYPE_NONE, NULL, NULL };\n \tstruct rte_flow_action_age *age = age_action_get(actions);\n \n@@ -2539,16 +2537,6 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_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_pull(port_id, queue_id, &comp, 1, &error);\n-\t\tif (ret < 0) {\n-\t\t\tprintf(\"Failed to pull 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@@ -2563,7 +2551,6 @@ port_queue_flow_destroy(portid_t port_id, queueid_t queue_id,\n \t\t\tbool postpone, uint32_t n, const uint32_t *rule)\n {\n \tstruct rte_flow_q_ops_attr op_attr = { .postpone = postpone };\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@@ -2599,21 +2586,6 @@ port_queue_flow_destroy(portid_t port_id, queueid_t queue_id,\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_pull(port_id, queue_id,\n-\t\t\t\t\t\t    &comp, 1, &error);\n-\t\t\t\tif (ret < 0) {\n-\t\t\t\t\tprintf(\"Failed to pull 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@@ -2654,6 +2626,52 @@ port_queue_flow_push(portid_t port_id, queueid_t queue_id)\n \treturn ret;\n }\n \n+/** Pull queue operation results from the queue. */\n+int\n+port_queue_flow_pull(portid_t port_id, queueid_t queue_id)\n+{\n+\tstruct rte_port *port;\n+\tstruct rte_flow_q_op_res *res;\n+\tstruct rte_flow_error error;\n+\tint ret = 0;\n+\tint success = 0;\n+\tint i;\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+\tres = calloc(port->queue_sz, sizeof(struct rte_flow_q_op_res));\n+\tif (!res) {\n+\t\tprintf(\"Failed to allocate memory for pulled results\\n\");\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\tmemset(&error, 0x66, sizeof(error));\n+\tret = rte_flow_pull(port_id, queue_id, res,\n+\t\t\t\t port->queue_sz, &error);\n+\tif (ret < 0) {\n+\t\tprintf(\"Failed to pull a operation results\\n\");\n+\t\tfree(res);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tfor (i = 0; i < ret; i++) {\n+\t\tif (res[i].status == RTE_FLOW_Q_OP_SUCCESS)\n+\t\t\tsuccess++;\n+\t}\n+\tprintf(\"Queue #%u pulled %u operations (%u failed, %u succeeded)\\n\",\n+\t       queue_id, ret, ret - success, success);\n+\tfree(res);\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 24a43fd82c..5ea2408a0b 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -941,6 +941,7 @@ int port_queue_flow_create(portid_t port_id, queueid_t queue_id,\n int port_queue_flow_destroy(portid_t port_id, queueid_t queue_id,\n \t\t\t    bool postpone, uint32_t n, const uint32_t *rule);\n int port_queue_flow_push(portid_t port_id, queueid_t queue_id);\n+int port_queue_flow_pull(portid_t port_id, queueid_t queue_id);\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 4f1f908d4a..5080ddb256 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -3402,6 +3402,10 @@ following sections.\n \n    flow push {port_id} queue {queue_id}\n \n+- Pull all operations results from a queue::\n+\n+   flow pull {port_id} queue {queue_id}\n+\n - Create a flow rule::\n \n    flow create {port_id}\n@@ -3637,6 +3641,23 @@ The usual error message is shown when operations cannot be pushed::\n \n    Caught error type [...] ([...]): [...]\n \n+Pulling flow operations results\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+``flow pull`` asks the underlying device about flow queue operations\n+results and return all the processed (successfully or not) operations.\n+It is bound to ``rte_flow_pull()``::\n+\n+   flow pull {port_id} queue {queue_id}\n+\n+If successful, it will show::\n+\n+   Queue #[...] pulled #[...] operations (#[...] failed, #[...] succeeded)\n+\n+The usual error message is shown when operations results cannot be pulled::\n+\n+   Caught error type [...] ([...]): [...]\n+\n Creating a tunnel stub for offload\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n \n@@ -3767,6 +3788,8 @@ Otherwise it will show an error message of the form::\n This command uses the same pattern items and actions as ``flow create``,\n their format is described in `Creating flow rules`_.\n \n+``flow queue pull`` must be called to retrieve the operation status.\n+\n Attributes\n ^^^^^^^^^^\n \n@@ -4508,6 +4531,8 @@ message is shown when a rule cannot be destroyed::\n \n    Caught error type [...] ([...]): [...]\n \n+``flow queue pull`` must be called to retrieve the operation status.\n+\n Querying flow rules\n ~~~~~~~~~~~~~~~~~~~\n \n",
    "prefixes": [
        "v8",
        "10/11"
    ]
}