get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 116510,
    "url": "https://patches.dpdk.org/api/patches/116510/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220921021133.2982954-4-akozyrev@nvidia.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": "<20220921021133.2982954-4-akozyrev@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220921021133.2982954-4-akozyrev@nvidia.com",
    "date": "2022-09-21T02:11:29",
    "name": "[v4,3/7] ethdev: get meter profile/policy objects",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "d68455ad0761af39c817f113348dd5402d466e20",
    "submitter": {
        "id": 1873,
        "url": "https://patches.dpdk.org/api/people/1873/?format=api",
        "name": "Alexander Kozyrev",
        "email": "akozyrev@nvidia.com"
    },
    "delegate": {
        "id": 3961,
        "url": "https://patches.dpdk.org/api/users/3961/?format=api",
        "username": "arybchenko",
        "first_name": "Andrew",
        "last_name": "Rybchenko",
        "email": "andrew.rybchenko@oktetlabs.ru"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220921021133.2982954-4-akozyrev@nvidia.com/mbox/",
    "series": [
        {
            "id": 24739,
            "url": "https://patches.dpdk.org/api/series/24739/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24739",
            "date": "2022-09-21T02:11:26",
            "name": "ethdev: separate metering and marking from policing",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/24739/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/116510/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/116510/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 E1212A034C;\n\tWed, 21 Sep 2022 04:12:37 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 286CE42B6D;\n\tWed, 21 Sep 2022 04:12:32 +0200 (CEST)",
            "from NAM11-CO1-obe.outbound.protection.outlook.com\n (mail-co1nam11on2087.outbound.protection.outlook.com [40.107.220.87])\n by mails.dpdk.org (Postfix) with ESMTP id 3E0F84282B\n for <dev@dpdk.org>; Wed, 21 Sep 2022 04:12:30 +0200 (CEST)",
            "from MW2PR16CA0063.namprd16.prod.outlook.com (2603:10b6:907:1::40)\n by LV2PR12MB5775.namprd12.prod.outlook.com (2603:10b6:408:179::12) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.18; Wed, 21 Sep\n 2022 02:12:27 +0000",
            "from CO1NAM11FT042.eop-nam11.prod.protection.outlook.com\n (2603:10b6:907:1:cafe::ec) by MW2PR16CA0063.outlook.office365.com\n (2603:10b6:907:1::40) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.16 via Frontend\n Transport; Wed, 21 Sep 2022 02:12:27 +0000",
            "from mail.nvidia.com (216.228.117.161) by\n CO1NAM11FT042.mail.protection.outlook.com (10.13.174.250) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.5654.14 via Frontend Transport; Wed, 21 Sep 2022 02:12:26 +0000",
            "from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com\n (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Tue, 20 Sep\n 2022 19:12:13 -0700",
            "from pegasus01.mtr.labs.mlnx (10.126.231.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\n 15.2.986.29; Tue, 20 Sep 2022 19:12:10 -0700"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=moT3OePHKdHh80sGdjQlJ4wXS6AE6IaZCXdihmICJQKvb6iXkXPmDR77uT8ZJIz+ML3dFlNqwUTDDElFTGQpXHLlqzIb7oPrsWwvq8dWEE6T16TKrMEEyrOf11af5uoUF688qRqiBKLgUY7Kj2aZj54f+EZ0J7zb4jAS11JtD2RqHF1+//9hytcTnfAqcZJfJ0okPsmWGcJeLvmoF1dsGQVxun4FZdIi8jhJb+rGgB8KIBMNEuHA5qhVwyOJ816eEicsDGJHC1sNLOrQHYA0fJoPEw2+nHBywEQ+WdL468waIFoBDjWu9W11ejjhEpIntd4h+0Nk9g8jhVAZRJPssQ==",
        "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=J+ZiXps35pH8hMqsd/vk7UgYFCbd6Pc6MV3EV+uolnI=;\n b=eJGsSedLJ4w769Ibfetgnu08aIcmzH1GEcsK1yWSU3+tyysyyg0aTQKQdZswN2kz2LsCRNtS0/O8sK7SG+uk4SwBvwOZAHsX1P4NHnjlmW3u5fkdNQbxXG0UXDqyxwL5REZ5LEco2QqIrlB353CNgQNEwT49J+xAjMLwbpUDJGtTbvTextePiea+Lkhf3TEJ0bY4kWa7KfE3L8liG9QuOHBPo+VS/VRKSWZuMjsefoQwypMVpNEK/LLkwHvpEMPTSneaK+FAXhb8tVe9F4SB/VGXxIOQJu1nW+3FyHwZ49znIYGFnb0VTz/zhxeuhRFQv+hK3sa+aZPuM+K1MarHOA==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.117.161) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com;\n dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com;\n dkim=none (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=J+ZiXps35pH8hMqsd/vk7UgYFCbd6Pc6MV3EV+uolnI=;\n b=IcydCViHn6oWtYoaFJfKnf/G+mm0sFMwSPll+09Vz2R8KpMF4NMS6pDxXnt6zyuru19Q4AZKfVwzyH91xSMvB3lJxDQYTPNMSug3KtIbqn5NVHJvNB3+slfUJlI/BJ8rgI2H7ixsOBtsX0IqkyQXzdTCzYTgPWSEfZzop4bvtQqOwNKoTkapyUeC5M7rTZqp+G4d7bylj+pp0l/ZmiDRkxwb7dxRDa6gFjCE9cdn1HveNja3B+9ZbMC4uy54WioMVTODLLUnreaLC3SZsTDeZw1HDeBfOtjKk1fw0bvkCgNfVPMO7wGPKphHKN4iGBRc4BLnvZkpRnpvrv/G3dT52w==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.117.161)\n smtp.mailfrom=nvidia.com;\n 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 216.228.117.161 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C",
        "From": "Alexander Kozyrev <akozyrev@nvidia.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<cristian.dumitrescu@intel.com>, <jerinjacobk@gmail.com>,\n <orika@nvidia.com>, <thomas@monjalon.net>, <ivan.malov@oktetlabs.ru>,\n <andrew.rybchenko@oktetlabs.ru>, <ferruh.yigit@xilinx.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 v4 3/7] ethdev: get meter profile/policy objects",
        "Date": "Wed, 21 Sep 2022 05:11:29 +0300",
        "Message-ID": "<20220921021133.2982954-4-akozyrev@nvidia.com>",
        "X-Mailer": "git-send-email 2.18.2",
        "In-Reply-To": "<20220921021133.2982954-1-akozyrev@nvidia.com>",
        "References": "<20220601034408.2579943-1-akozyrev@nvidia.com>\n <20220921021133.2982954-1-akozyrev@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.126.231.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-TrafficTypeDiagnostic": "CO1NAM11FT042:EE_|LV2PR12MB5775:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "ff6e6eca-cd70-41a8-4b05-08da9b76badf",
        "X-LD-Processed": "43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n HhyxR/dUYt7+zS2ZAVJ+mm8jWk71ImMj76HOuhIljLAgKKQVAOUhsqbBO/xRSQ+OaUImTZ9t+3qG3yQS+aipcBusE3+4bJiv2uHEQxhqYLc4+f74yhBQtcUCr8nWZb29cHk3YlfwOumEg/ZtWpqD10Gg557EYlEGqtvzpbbC963rZ/JWXo25AWYylffkcZqmsAdGn5gxTVOAiKY8zAmgmXKjUzgMnnM0iYfTXJAPY2BsDVo9GNndMWQ1nxFEZy5viUSdj+nFD/xQhDi3PNjVu4F/RnhedOUf6tdU9DxNWIAtDZJpFoeeU+AIwsv0h4gNAXy1htb9HKGVEa46MMNkTqWbn3pBy1M0UCttjau18RQ7X7qB5RpCNSmtewr+iEDRCr13LyBB45TNhTde00aQTKvGYM2dpQfrdAlejlownGzZCod+LOVKpj+xzWTrofRlhXeonm4KwD2aN0nHOxmYzM1BMU2ou90GG3/lohTDOpkXd1UMQxNhhnpPrfxrxt5OVUfHzno7s84+hMCM6KJEqSSuPKHtzA0TwbzP49u3oQLCgKY36/sDt1L8Y70ZToB92EjWpUELsLjrpXo5FfkOuggIVJxzNt9QKrpPPqlGraQ33GhJUrBpmZgMOMB7/X0jB1MLLyG3qfrc6ky3kUkB1UOqjvGpwiu1CQelNvaaVipKQeo7E1e9NUnraSKdB4/Mc7irO1/vWQ6B/M3TfiljFXIhmQIF5Px3sZSIw9tWoutwpMbRVtV7pSYOpFjS/fAm5ETZKnlQMeXITdcb+YNFP0wW53DEJigiwXPmTk6lQbA8Tu98HJfqIIkST/LqIXz7",
        "X-Forefront-Antispam-Report": "CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE;\n SFS:(13230022)(4636009)(39860400002)(376002)(396003)(346002)(136003)(451199015)(40470700004)(36840700001)(46966006)(7636003)(40480700001)(86362001)(16526019)(26005)(478600001)(8936002)(2616005)(82740400003)(6666004)(40460700003)(186003)(41300700001)(1076003)(356005)(336012)(36756003)(83380400001)(36860700001)(47076005)(426003)(82310400005)(70206006)(2906002)(5660300002)(8676002)(316002)(70586007)(54906003)(6916009)(7416002)(4326008);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "21 Sep 2022 02:12:26.8426 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n ff6e6eca-cd70-41a8-4b05-08da9b76badf",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n CO1NAM11FT042.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "LV2PR12MB5775",
        "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": "Introduce a new Meter API to retrieve a Meter profile and policy\nobjects using the profile/policy ID previously created with\nmeter_profile_add() and meter_policy_create() functions.\nThat allows to save the pointer and avoid any lookups in the\ncorresponding lists for quick access during a flow rule creation.\nAlso, it eliminates the need for CIR, CBS and EBS calculations\nand conversion to a PMD-specific format when the profile is used.\nPointers are destroyed and cannot be used after the corresponding\nmeter_profile_delete() or meter_policy_delete() are called.\n\nSigned-off-by: Alexander Kozyrev <akozyrev@nvidia.com>\n---\n .../traffic_metering_and_policing.rst         |  7 ++++\n doc/guides/rel_notes/release_22_11.rst        |  1 +\n lib/ethdev/rte_flow.h                         |  7 ++++\n lib/ethdev/rte_mtr.c                          | 41 +++++++++++++++++++\n lib/ethdev/rte_mtr.h                          | 40 ++++++++++++++++++\n lib/ethdev/rte_mtr_driver.h                   | 19 +++++++++\n lib/ethdev/version.map                        |  4 ++\n 7 files changed, 119 insertions(+)",
    "diff": "diff --git a/doc/guides/prog_guide/traffic_metering_and_policing.rst b/doc/guides/prog_guide/traffic_metering_and_policing.rst\nindex d1958a023d..2ce3236ad8 100644\n--- a/doc/guides/prog_guide/traffic_metering_and_policing.rst\n+++ b/doc/guides/prog_guide/traffic_metering_and_policing.rst\n@@ -107,6 +107,13 @@ traffic meter and policing library.\n      to the list of meter actions (``struct rte_mtr_meter_policy_params::actions``)\n      specified per color as show in :numref:`figure_rte_mtr_chaining`.\n \n+#. The ``rte_mtr_meter_profile_get()`` and ``rte_mtr_meter_policy_get()``\n+   API functions are available for getting the object pointers directly.\n+   These pointers allow quick access to profile/policy objects and are\n+   required by the ``RTE_FLOW_ACTION_TYPE_METER_MARK`` action.\n+   This action may omit the policy definition to providei flexibility\n+   to match a color later with the ``RTE_FLOW_ITEM_TYPE_METER_COLOR`` item.\n+\n Protocol based input color selection\n ------------------------------------\n \ndiff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst\nindex a7651f69ba..7969609788 100644\n--- a/doc/guides/rel_notes/release_22_11.rst\n+++ b/doc/guides/rel_notes/release_22_11.rst\n@@ -59,6 +59,7 @@ New Features\n \n   * Added METER_COLOR item to match Color Marker set by a Meter.\n   * Added ability to set Color Marker via modify_field Flow API.\n+  * Added Meter API to get a pointer to profile/policy by their ID.\n \n Removed Items\n -------------\ndiff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h\nindex fddd47e7b5..edf69fc44f 100644\n--- a/lib/ethdev/rte_flow.h\n+++ b/lib/ethdev/rte_flow.h\n@@ -3826,6 +3826,13 @@ struct rte_flow_action {\n  */\n struct rte_flow;\n \n+/**\n+ * Opaque type for Meter profile object returned by MTR API.\n+ *\n+ * This handle can be used to create Meter actions instead of profile ID.\n+ */\n+struct rte_flow_meter_profile;\n+\n /**\n  * @warning\n  * @b EXPERIMENTAL: this structure may change without prior notice\ndiff --git a/lib/ethdev/rte_mtr.c b/lib/ethdev/rte_mtr.c\nindex c460e4f4e0..9e79b744da 100644\n--- a/lib/ethdev/rte_mtr.c\n+++ b/lib/ethdev/rte_mtr.c\n@@ -56,6 +56,25 @@ rte_mtr_ops_get(uint16_t port_id, struct rte_mtr_error *error)\n \tops->func;\t\t\t\t\t\\\n })\n \n+#define RTE_MTR_HNDL_FUNC(port_id, func)\t\t\\\n+({\t\t\t\t\t\t\t\\\n+\tconst struct rte_mtr_ops *ops =\t\t\t\\\n+\t\trte_mtr_ops_get(port_id, error);\t\\\n+\tif (ops == NULL)\t\t\t\t\\\n+\t\treturn NULL;\t\t\t\t\\\n+\t\t\t\t\t\t\t\\\n+\tif (ops->func == NULL) {\t\t\t\\\n+\t\trte_mtr_error_set(error,\t\t\\\n+\t\t\tENOSYS,\t\t\t\t\\\n+\t\t\tRTE_MTR_ERROR_TYPE_UNSPECIFIED,\t\\\n+\t\t\tNULL,\t\t\t\t\\\n+\t\t\trte_strerror(ENOSYS));\t\t\\\n+\t\treturn NULL;\t\t\t\t\\\n+\t}\t\t\t\t\t\t\\\n+\t\t\t\t\t\t\t\\\n+\tops->func;\t\t\t\t\t\\\n+})\n+\n /* MTR capabilities get */\n int\n rte_mtr_capabilities_get(uint16_t port_id,\n@@ -90,6 +109,17 @@ rte_mtr_meter_profile_delete(uint16_t port_id,\n \t\tmeter_profile_id, error);\n }\n \n+/** MTR meter profile get */\n+struct rte_flow_meter_profile *\n+rte_mtr_meter_profile_get(uint16_t port_id,\n+\tuint32_t meter_profile_id,\n+\tstruct rte_mtr_error *error)\n+{\n+\tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n+\treturn RTE_MTR_HNDL_FUNC(port_id, meter_profile_get)(dev,\n+\t\tmeter_profile_id, error);\n+}\n+\n /* MTR meter policy validate */\n int\n rte_mtr_meter_policy_validate(uint16_t port_id,\n@@ -124,6 +154,17 @@ rte_mtr_meter_policy_delete(uint16_t port_id,\n \t\tpolicy_id, error);\n }\n \n+/** MTR meter policy get */\n+struct rte_flow_meter_policy *\n+rte_mtr_meter_policy_get(uint16_t port_id,\n+\tuint32_t policy_id,\n+\tstruct rte_mtr_error *error)\n+{\n+\tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n+\treturn RTE_MTR_HNDL_FUNC(port_id, meter_policy_get)(dev,\n+\t\tpolicy_id, error);\n+}\n+\n /** MTR object create */\n int\n rte_mtr_create(uint16_t port_id,\ndiff --git a/lib/ethdev/rte_mtr.h b/lib/ethdev/rte_mtr.h\nindex 008bc84f0d..58f0d26215 100644\n--- a/lib/ethdev/rte_mtr.h\n+++ b/lib/ethdev/rte_mtr.h\n@@ -623,6 +623,26 @@ rte_mtr_meter_profile_delete(uint16_t port_id,\n \tuint32_t meter_profile_id,\n \tstruct rte_mtr_error *error);\n \n+/**\n+ * Meter profile object get\n+ *\n+ * Get meter profile object for a given meter profile ID.\n+ *\n+ * @param[in] port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param[in] meter_profile_id\n+ *   Meter profile ID. Needs to be the valid.\n+ * @param[out] error\n+ *   Error details. Filled in only on error, when not NULL.\n+ * @return\n+ *   A valid handle in case of success, NULL otherwise.\n+ */\n+__rte_experimental\n+struct rte_flow_meter_profile *\n+rte_mtr_meter_profile_get(uint16_t port_id,\n+\tuint32_t meter_profile_id,\n+\tstruct rte_mtr_error *error);\n+\n /**\n  * Check whether a meter policy can be created on a given port.\n  *\n@@ -679,6 +699,26 @@ rte_mtr_meter_policy_add(uint16_t port_id,\n \tstruct rte_mtr_meter_policy_params *policy,\n \tstruct rte_mtr_error *error);\n \n+/**\n+ * Meter policy object get\n+ *\n+ * Get meter policy object for a given meter policy ID.\n+ *\n+ * @param[in] port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param[in] policy_id\n+ *   Meter policy ID. Needs to be the valid.\n+ * @param[out] error\n+ *   Error details. Filled in only on error, when not NULL.\n+ * @return\n+ *   A valid handle in case of success, NULL otherwise.\n+ */\n+__rte_experimental\n+struct rte_flow_meter_policy *\n+rte_mtr_meter_policy_get(uint16_t port_id,\n+\tuint32_t policy_id,\n+\tstruct rte_mtr_error *error);\n+\n /**\n  * Define meter policy action list:\n  * GREEN - GREEN, YELLOW - YELLOW, RED - RED\ndiff --git a/lib/ethdev/rte_mtr_driver.h b/lib/ethdev/rte_mtr_driver.h\nindex f7dca9a54c..948a629b93 100644\n--- a/lib/ethdev/rte_mtr_driver.h\n+++ b/lib/ethdev/rte_mtr_driver.h\n@@ -41,6 +41,12 @@ typedef int (*rte_mtr_meter_profile_delete_t)(struct rte_eth_dev *dev,\n \tuint32_t meter_profile_id,\n \tstruct rte_mtr_error *error);\n \n+/** @internal MTR meter profile get. */\n+typedef struct rte_flow_meter_profile *\n+(*rte_mtr_meter_profile_get_t)(struct rte_eth_dev *dev,\n+\tuint32_t meter_profile_id,\n+\tstruct rte_mtr_error *error);\n+\n /** @internal MTR meter policy validate. */\n typedef int (*rte_mtr_meter_policy_validate_t)(struct rte_eth_dev *dev,\n \tstruct rte_mtr_meter_policy_params *policy,\n@@ -57,6 +63,13 @@ typedef int (*rte_mtr_meter_policy_delete_t)(struct rte_eth_dev *dev,\n \tuint32_t policy_id,\n \tstruct rte_mtr_error *error);\n \n+/** @internal MTR meter policy get. */\n+typedef struct rte_flow_meter_policy *\n+(*rte_mtr_meter_policy_get_t)(struct rte_eth_dev *dev,\n+\tuint32_t policy_id,\n+\tstruct rte_mtr_error *error);\n+\n+\n /** @internal MTR object create. */\n typedef int (*rte_mtr_create_t)(struct rte_eth_dev *dev,\n \tuint32_t mtr_id,\n@@ -194,6 +207,12 @@ struct rte_mtr_ops {\n \n \t/** MTR object meter policy update */\n \trte_mtr_meter_policy_update_t meter_policy_update;\n+\n+\t/** MTR meter profile get */\n+\trte_mtr_meter_profile_get_t meter_profile_get;\n+\n+\t/** MTR meter policy get */\n+\trte_mtr_meter_policy_get_t meter_policy_get;\n };\n \n /**\ndiff --git a/lib/ethdev/version.map b/lib/ethdev/version.map\nindex 03f52fee91..1fec250c85 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -285,6 +285,10 @@ EXPERIMENTAL {\n \trte_mtr_color_in_protocol_priority_get;\n \trte_mtr_color_in_protocol_set;\n \trte_mtr_meter_vlan_table_update;\n+\n+\t# added in 22.11\n+\trte_mtr_meter_profile_get;\n+\trte_mtr_meter_policy_get;\n };\n \n INTERNAL {\n",
    "prefixes": [
        "v4",
        "3/7"
    ]
}