get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 107917,
    "url": "http://patches.dpdk.org/api/patches/107917/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220221230240.2409665-6-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": "<20220221230240.2409665-6-akozyrev@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220221230240.2409665-6-akozyrev@nvidia.com",
    "date": "2022-02-21T23:02:34",
    "name": "[v9,05/11] app/testpmd: add flow engine configuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "117e9d511ed97ceaa9b5839fc9af0988d0f74e0e",
    "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/20220221230240.2409665-6-akozyrev@nvidia.com/mbox/",
    "series": [
        {
            "id": 21774,
            "url": "http://patches.dpdk.org/api/series/21774/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=21774",
            "date": "2022-02-21T23:02:29",
            "name": "ethdev: datapath-focused flow rules management",
            "version": 9,
            "mbox": "http://patches.dpdk.org/series/21774/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/107917/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/107917/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 BA053A034F;\n\tTue, 22 Feb 2022 00:03:42 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0574641154;\n\tTue, 22 Feb 2022 00:03:21 +0100 (CET)",
            "from NAM12-MW2-obe.outbound.protection.outlook.com\n (mail-mw2nam12on2044.outbound.protection.outlook.com [40.107.244.44])\n by mails.dpdk.org (Postfix) with ESMTP id 6774041156\n for <dev@dpdk.org>; Tue, 22 Feb 2022 00:03:17 +0100 (CET)",
            "from BL1PR12MB5205.namprd12.prod.outlook.com (2603:10b6:208:308::17)\n by LV2PR12MB5943.namprd12.prod.outlook.com (2603:10b6:408:170::8)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.24; Mon, 21 Feb\n 2022 23:03:15 +0000",
            "from MWHPR21CA0028.namprd21.prod.outlook.com (2603:10b6:300:129::14)\n by BL1PR12MB5205.namprd12.prod.outlook.com (2603:10b6:208:308::17)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.14; Mon, 21 Feb\n 2022 23:03:14 +0000",
            "from CO1NAM11FT017.eop-nam11.prod.protection.outlook.com\n (2603:10b6:300:129:cafe::55) by MWHPR21CA0028.outlook.office365.com\n (2603:10b6:300:129::14) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.6 via Frontend\n Transport; Mon, 21 Feb 2022 23:03:14 +0000",
            "from mail.nvidia.com (12.22.5.234) by\n CO1NAM11FT017.mail.protection.outlook.com (10.13.175.108) 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; Mon, 21 Feb 2022 23:03:13 +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 Mon, 21 Feb 2022 23:03:13 +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 Mon, 21 Feb 2022 15:03:09 -0800"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=Vt4+EgICvib+AUO3Fb929i/J5KdvuoTTUzgwFyBOF25XOf9AQB33mh4rGys1T9SZsEf7zopqvlj4uLqvM947ekWkODMMwGfdduqvlP1m2Aq/KggakKeGAij+nqmzmUNCNWlkAFFwCBTPqiyE2KKoEraUinFHOtpLG8lYNGyO15Z+mb0NVcG3jyl6cts1SIaemvPpr2GKx+I6lSS7ap8lDr7iVHJ93NaDmle9ZQXSEaQTrI9KdqFIN+D47WTno2vzTYQc4FgF4f6iSEPxq1MhQMGkX4TZJeMowkt7TSsihnSeK/IswXoJtrejrHQSD+vPRqF2gsLKodKOEDLJ3M9org==",
        "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=1njSzhhZT0vrwKozTCDbOEoSzHstT8+Ug0QtkO/8b/s=;\n b=XrGOf+prenvggds9srWWkyeTr3ajMo8wgBBtQ30NWqn/x0P7+pYHb63nmhSF8qsOLcG5JhDJAL114LMfRQOYh5x1NFlKGXS9OGK0v9O0X3J0SA6713TJZBfMNgAZtowMbPjfsLnKsSdMyscKFE2aaYEE4IzCtcd2z9AETae0kmvqZoNocsO+OoeAb1QdNtuJM37hihHY4Oj1X9XWJSOx9LxclssrUBtaoB9XFAL6Vx/QZNoP5VClWCbvlSPF/E1qPdRWBgqT8Wo+OJTL6GyJ5P91f3uQwh9VNEOPBvDwCc3/t/5KteKrsH7bKZQzpraDGmvwgbX2CizwxwEHWC7PDw==",
        "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=1njSzhhZT0vrwKozTCDbOEoSzHstT8+Ug0QtkO/8b/s=;\n b=lHWTZrUvSel14BkmO2kD0tvrFSoqkIrUKG9pILEVQlkqjtjiMEyjjOD9jVwk1K1QBg491BuuZDye5v8S03Qdl6Ll3O02uLENXO/Ebq/1q8XjmrRve0ROjL4ND19wR3MQwpYns78IrVZfIhFKqyBXAYlGA6fFFidfqblM2jvAMDrvYuaDu8zpOPdWWzgjoUsaRH7xp3MtJNWMBptAUo23vH3vxovqz57OtxM2iKzO5KAf+u+xh4b1tWELYUJtJfdp5U4SnSEgBlAzADN6HUjJchU7XOQjjNf/y8+X++R7P26FpakqnJTvc+tLZMz9ytpjByDF6l7MdAatZJ+O9yuIJg==",
        "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 v9 05/11] app/testpmd: add flow engine configuration",
        "Date": "Tue, 22 Feb 2022 01:02:34 +0200",
        "Message-ID": "<20220221230240.2409665-6-akozyrev@nvidia.com>",
        "X-Mailer": "git-send-email 2.18.2",
        "In-Reply-To": "<20220221230240.2409665-1-akozyrev@nvidia.com>",
        "References": "<20220220034409.2226860-1-akozyrev@nvidia.com>\n <20220221230240.2409665-1-akozyrev@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.126.230.35]",
        "X-ClientProxiedBy": "rnnvmail203.nvidia.com (10.129.68.9) To\n rnnvmail201.nvidia.com (10.129.68.8)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "4b8df224-10f5-4f96-3731-08d9f58e56d3",
        "X-MS-TrafficTypeDiagnostic": "BL1PR12MB5205:EE_|LV2PR12MB5943:EE_",
        "X-LD-Processed": "43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr,ExtAddr",
        "X-Microsoft-Antispam-PRVS": "\n <BL1PR12MB52056388CC187337B70C0700AF3A9@BL1PR12MB5205.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 0v5Auz93ez/JAxCFfeLWalidbuY+tZRWjzUfc9UUK9izEgUqwTvFYJew8sbGKXrWKkopQ3aLIHhZ/3t7uMNMDBM3blmX5uqvXFr0P3pikzXJAZ3KAAasZQp1An7MQfJK2Qs/At264AOZBt+L+SLaz5fwpJDM9JDjRA5R9r/y8LpF3sov6+iJcmSzFa+1iV2DJeqW0X0Xz37nYoUfYEH6rpaBvpeejR/PZi1lLHaSQ4yTAgBEh181MKWA88fsaxoPxlITjmhvTlMFh26TiaMveiFAIpfZndsjS+g180dDOzW8S/KWgmgTPDNplTIlVJLwWCG4iRMZFs7E/F0mwT0yDqB1jS3AETzg9J6ce7JxOt6rURFWOHIYAvtFOY238VK3OV2gVqp9ElDvjIepUiLEs2jh4gUjKLqDH6oo3+pSIkpmSHjDNpLtKsJjoJMEAodah2eZwQsXq2q6Z+xNmWiZnWK+p1wz3Jq98D5mu9F2nGztxT06roFLvqHYUQfk2pCga2Xdw5o+Hf8ui5Go/gi9l8/4q4E1hEx1+TLyZi+F2y4053SnUoDJ7R5xKtbmIX9byLO2W/C6CH9bdXl2UZTcdLWrP96MO4wkWzrhbvW5OmEPRJBG5TxptuIFx9ase71SQR/vgmMhDoLO0qZ2y5puhAQ+sfe6hadv93vk8BX/vQvDnqMBx6hLYivfFreKKmzcrUOnV8+fn5lJC8vYXjIw6A==",
        "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)(46966006)(40470700004)(36840700001)(47076005)(7416002)(5660300002)(83380400001)(8936002)(36756003)(40460700003)(6916009)(36860700001)(86362001)(70206006)(30864003)(8676002)(4326008)(70586007)(1076003)(2906002)(336012)(426003)(508600001)(2616005)(186003)(54906003)(26005)(356005)(81166007)(316002)(82310400004)(16526019)(6666004)(36900700001);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "21 Feb 2022 23:03:13.9073 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 4b8df224-10f5-4f96-3731-08d9f58e56d3",
        "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 CO1NAM11FT017.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "LV2PR12MB5943",
        "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_configure API.\nProvide the command line interface for the Flow management.\nUsage example: flow configure 0 queues_number 8 queues_size 256\n\nImplement rte_flow_info_get API to get available resources:\nUsage example: flow info 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                 | 126 +++++++++++++++++++-\n app/test-pmd/config.c                       |  61 ++++++++++\n app/test-pmd/testpmd.h                      |   7 ++\n doc/guides/testpmd_app_ug/testpmd_funcs.rst |  61 +++++++++-\n 4 files changed, 252 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex c0644d678c..0533a33ca2 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -72,6 +72,8 @@ enum index {\n \t/* Top-level command. */\n \tFLOW,\n \t/* Sub-level commands. */\n+\tINFO,\n+\tCONFIGURE,\n \tINDIRECT_ACTION,\n \tVALIDATE,\n \tCREATE,\n@@ -122,6 +124,13 @@ enum index {\n \tDUMP_ALL,\n \tDUMP_ONE,\n \n+\t/* Configure arguments */\n+\tCONFIG_QUEUES_NUMBER,\n+\tCONFIG_QUEUES_SIZE,\n+\tCONFIG_COUNTERS_NUMBER,\n+\tCONFIG_AGING_OBJECTS_NUMBER,\n+\tCONFIG_METERS_NUMBER,\n+\n \t/* Indirect action arguments */\n \tINDIRECT_ACTION_CREATE,\n \tINDIRECT_ACTION_UPDATE,\n@@ -868,6 +877,11 @@ struct buffer {\n \tenum index command; /**< Flow command. */\n \tportid_t port; /**< Affected port ID. */\n \tunion {\n+\t\tstruct {\n+\t\t\tstruct rte_flow_port_attr port_attr;\n+\t\t\tuint32_t nb_queue;\n+\t\t\tstruct rte_flow_queue_attr queue_attr;\n+\t\t} configure; /**< Configuration arguments. */\n \t\tstruct {\n \t\t\tuint32_t *action_id;\n \t\t\tuint32_t action_id_n;\n@@ -949,6 +963,16 @@ static const enum index next_flex_item[] = {\n \tZERO,\n };\n \n+static const enum index next_config_attr[] = {\n+\tCONFIG_QUEUES_NUMBER,\n+\tCONFIG_QUEUES_SIZE,\n+\tCONFIG_COUNTERS_NUMBER,\n+\tCONFIG_AGING_OBJECTS_NUMBER,\n+\tCONFIG_METERS_NUMBER,\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@@ -2045,6 +2069,9 @@ static int parse_aged(struct context *, const struct token *,\n static int parse_isolate(struct context *, const struct token *,\n \t\t\t const char *, unsigned int,\n \t\t\t void *, unsigned int);\n+static int parse_configure(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@@ -2270,7 +2297,9 @@ static const struct token token_list[] = {\n \t\t.type = \"{command} {port_id} [{arg} [...]]\",\n \t\t.help = \"manage ingress/egress flow rules\",\n \t\t.next = NEXT(NEXT_ENTRY\n-\t\t\t     (INDIRECT_ACTION,\n+\t\t\t     (INFO,\n+\t\t\t      CONFIGURE,\n+\t\t\t      INDIRECT_ACTION,\n \t\t\t      VALIDATE,\n \t\t\t      CREATE,\n \t\t\t      DESTROY,\n@@ -2285,6 +2314,65 @@ static const struct token token_list[] = {\n \t\t.call = parse_init,\n \t},\n \t/* Top-level command. */\n+\t[INFO] = {\n+\t\t.name = \"info\",\n+\t\t.help = \"get information about flow engine\",\n+\t\t.next = NEXT(NEXT_ENTRY(END),\n+\t\t\t     NEXT_ENTRY(COMMON_PORT_ID)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer, port)),\n+\t\t.call = parse_configure,\n+\t},\n+\t/* Top-level command. */\n+\t[CONFIGURE] = {\n+\t\t.name = \"configure\",\n+\t\t.help = \"configure flow engine\",\n+\t\t.next = NEXT(next_config_attr,\n+\t\t\t     NEXT_ENTRY(COMMON_PORT_ID)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer, port)),\n+\t\t.call = parse_configure,\n+\t},\n+\t/* Configure arguments. */\n+\t[CONFIG_QUEUES_NUMBER] = {\n+\t\t.name = \"queues_number\",\n+\t\t.help = \"number of queues\",\n+\t\t.next = NEXT(next_config_attr,\n+\t\t\t     NEXT_ENTRY(COMMON_UNSIGNED)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer,\n+\t\t\t\t\targs.configure.nb_queue)),\n+\t},\n+\t[CONFIG_QUEUES_SIZE] = {\n+\t\t.name = \"queues_size\",\n+\t\t.help = \"number of elements in queues\",\n+\t\t.next = NEXT(next_config_attr,\n+\t\t\t     NEXT_ENTRY(COMMON_UNSIGNED)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer,\n+\t\t\t\t\targs.configure.queue_attr.size)),\n+\t},\n+\t[CONFIG_COUNTERS_NUMBER] = {\n+\t\t.name = \"counters_number\",\n+\t\t.help = \"number of counters\",\n+\t\t.next = NEXT(next_config_attr,\n+\t\t\t     NEXT_ENTRY(COMMON_UNSIGNED)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer,\n+\t\t\t\t\targs.configure.port_attr.nb_counters)),\n+\t},\n+\t[CONFIG_AGING_OBJECTS_NUMBER] = {\n+\t\t.name = \"aging_counters_number\",\n+\t\t.help = \"number of aging objects\",\n+\t\t.next = NEXT(next_config_attr,\n+\t\t\t     NEXT_ENTRY(COMMON_UNSIGNED)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer,\n+\t\t\t\t\targs.configure.port_attr.nb_aging_objects)),\n+\t},\n+\t[CONFIG_METERS_NUMBER] = {\n+\t\t.name = \"meters_number\",\n+\t\t.help = \"number of meters\",\n+\t\t.next = NEXT(next_config_attr,\n+\t\t\t     NEXT_ENTRY(COMMON_UNSIGNED)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer,\n+\t\t\t\t\targs.configure.port_attr.nb_meters)),\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@@ -7736,6 +7824,33 @@ parse_isolate(struct context *ctx, const struct token *token,\n \treturn len;\n }\n \n+/** Parse tokens for info/configure command. */\n+static int\n+parse_configure(struct context *ctx, const struct token *token,\n+\t\tconst char *str, unsigned int len,\n+\t\tvoid *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 != INFO && ctx->curr != CONFIGURE)\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}\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@@ -8964,6 +9079,15 @@ static void\n cmd_flow_parsed(const struct buffer *in)\n {\n \tswitch (in->command) {\n+\tcase INFO:\n+\t\tport_flow_get_info(in->port);\n+\t\tbreak;\n+\tcase CONFIGURE:\n+\t\tport_flow_configure(in->port,\n+\t\t\t\t    &in->args.configure.port_attr,\n+\t\t\t\t    in->args.configure.nb_queue,\n+\t\t\t\t    &in->args.configure.queue_attr);\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 de1ec14bc7..33a85cd7ca 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -1610,6 +1610,67 @@ action_alloc(portid_t port_id, uint32_t id,\n \treturn 0;\n }\n \n+/** Get info about flow management resources. */\n+int\n+port_flow_get_info(portid_t port_id)\n+{\n+\tstruct rte_flow_port_info port_info;\n+\tstruct rte_flow_queue_info queue_info;\n+\tstruct rte_flow_error error;\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+\t/* Poisoning to make sure PMDs update it in case of error. */\n+\tmemset(&error, 0x99, sizeof(error));\n+\tmemset(&port_info, 0, sizeof(port_info));\n+\tmemset(&queue_info, 0, sizeof(queue_info));\n+\tif (rte_flow_info_get(port_id, &port_info, &queue_info, &error))\n+\t\treturn port_flow_complain(&error);\n+\tprintf(\"Flow engine resources on port %u:\\n\"\n+\t       \"Number of queues: %d\\n\"\n+\t\t   \"Size of queues: %d\\n\"\n+\t       \"Number of counters: %d\\n\"\n+\t       \"Number of aging objects: %d\\n\"\n+\t       \"Number of meter actions: %d\\n\",\n+\t       port_id, port_info.max_nb_queues,\n+\t\t   queue_info.max_size,\n+\t       port_info.max_nb_counters,\n+\t       port_info.max_nb_aging_objects,\n+\t       port_info.max_nb_meters);\n+\treturn 0;\n+}\n+\n+/** Configure flow management resources. */\n+int\n+port_flow_configure(portid_t port_id,\n+\tconst struct rte_flow_port_attr *port_attr,\n+\tuint16_t nb_queue,\n+\tconst struct rte_flow_queue_attr *queue_attr)\n+{\n+\tstruct rte_port *port;\n+\tstruct rte_flow_error error;\n+\tconst struct rte_flow_queue_attr *attr_list[nb_queue];\n+\tint std_queue;\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+\tport->queue_nb = nb_queue;\n+\tport->queue_sz = queue_attr->size;\n+\tfor (std_queue = 0; std_queue < nb_queue; std_queue++)\n+\t\tattr_list[std_queue] = queue_attr;\n+\t/* Poisoning to make sure PMDs update it in case of error. */\n+\tmemset(&error, 0x66, sizeof(error));\n+\tif (rte_flow_configure(port_id, port_attr, nb_queue, attr_list, &error))\n+\t\treturn port_flow_complain(&error);\n+\tprintf(\"Configure flows on port %u: \"\n+\t       \"number of queues %d with %d elements\\n\",\n+\t       port_id, nb_queue, queue_attr->size);\n+\treturn 0;\n+}\n+\n /** Create indirect action */\n int\n port_action_handle_create(portid_t port_id, uint32_t id,\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex 9967825044..096b6825eb 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -243,6 +243,8 @@ struct rte_port {\n \tstruct rte_eth_txconf   tx_conf[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue tx configuration */\n \tstruct rte_ether_addr   *mc_addr_pool; /**< pool of multicast addrs */\n \tuint32_t                mc_addr_nb; /**< nb. of addr. in mc_addr_pool */\n+\tqueueid_t               queue_nb; /**< nb. of queues for flow rules */\n+\tuint32_t                queue_sz; /**< size of a queue for flow rules */\n \tuint8_t                 slave_flag; /**< bonding slave port */\n \tstruct port_flow        *flow_list; /**< Associated flows. */\n \tstruct port_indirect_action *actions_list;\n@@ -885,6 +887,11 @@ struct rte_flow_action_handle *port_action_handle_get_by_id(portid_t port_id,\n \t\t\t\t\t\t\t    uint32_t id);\n int port_action_handle_update(portid_t port_id, uint32_t id,\n \t\t\t      const struct rte_flow_action *action);\n+int port_flow_get_info(portid_t port_id);\n+int port_flow_configure(portid_t port_id,\n+\t\t\tconst struct rte_flow_port_attr *port_attr,\n+\t\t\tuint16_t nb_queue,\n+\t\t\tconst struct rte_flow_queue_attr *queue_attr);\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 9cc248084f..c8f048aeef 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -3308,8 +3308,8 @@ Flow rules management\n ---------------------\n \n Control of the generic flow API (*rte_flow*) is fully exposed through the\n-``flow`` command (validation, creation, destruction, queries and operation\n-modes).\n+``flow`` command (configuration, validation, creation, destruction, queries\n+and operation modes).\n \n Considering *rte_flow* overlaps with all `Filter Functions`_, using both\n features simultaneously may cause undefined side-effects and is therefore\n@@ -3332,6 +3332,18 @@ The first parameter stands for the operation mode. Possible operations and\n their general syntax are described below. They are covered in detail in the\n following sections.\n \n+- Get info about flow engine::\n+\n+   flow info {port_id}\n+\n+- Configure flow engine::\n+\n+   flow configure {port_id}\n+       [queues_number {number}] [queues_size {size}]\n+       [counters_number {number}]\n+       [aging_counters_number {number}]\n+       [meters_number {number}]\n+\n - Check whether a flow rule can be created::\n \n    flow validate {port_id}\n@@ -3391,6 +3403,51 @@ following sections.\n \n    flow tunnel list {port_id}\n \n+Retrieving info about flow management engine\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+``flow info`` retrieves info on pre-configurable resources in the underlying\n+device to give a hint of possible values for flow engine configuration.\n+\n+``rte_flow_info_get()``::\n+\n+   flow info {port_id}\n+\n+If successful, it will show::\n+\n+   Flow engine resources on port #[...]:\n+   Number of queues: #[...]\n+   Size of queues: #[...]\n+   Number of counters: #[...]\n+   Number of aging objects: #[...]\n+   Number of meters: #[...]\n+\n+Otherwise it will show an error message of the form::\n+\n+   Caught error type [...] ([...]): [...]\n+\n+Configuring flow management engine\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+``flow configure`` pre-allocates all the needed resources in the underlying\n+device to be used later at the flow creation. Flow queues are allocated as well\n+for asynchronous flow creation/destruction operations. It is bound to\n+``rte_flow_configure()``::\n+\n+   flow configure {port_id}\n+       [queues_number {number}] [queues_size {size}]\n+       [counters_number {number}]\n+       [aging_counters_number {number}]\n+       [meters_number {number}]\n+\n+If successful, it will show::\n+\n+   Configure flows on port #[...]: number of queues #[...] with #[...] elements\n+\n+Otherwise it will show an error message of the form::\n+\n+   Caught error type [...] ([...]): [...]\n+\n Creating a tunnel stub for offload\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n \n",
    "prefixes": [
        "v9",
        "05/11"
    ]
}