get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 116426,
    "url": "https://patches.dpdk.org/api/patches/116426/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220919121534.1058884-1-skori@marvell.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20220919121534.1058884-1-skori@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220919121534.1058884-1-skori@marvell.com",
    "date": "2022-09-19T12:15:34",
    "name": "[v2,1/1] ethdev: support congestion management",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "25b380ad46509e03fe7e11d9e3cb286bbb2adce7",
    "submitter": {
        "id": 1318,
        "url": "https://patches.dpdk.org/api/people/1318/?format=api",
        "name": "Sunil Kumar Kori",
        "email": "skori@marvell.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/20220919121534.1058884-1-skori@marvell.com/mbox/",
    "series": [
        {
            "id": 24710,
            "url": "https://patches.dpdk.org/api/series/24710/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24710",
            "date": "2022-09-19T12:15:34",
            "name": "[v2,1/1] ethdev: support congestion management",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/24710/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/116426/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/116426/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 B7FD8A00C3;\n\tMon, 19 Sep 2022 14:18:05 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id BC7B440E0F;\n\tMon, 19 Sep 2022 14:18:04 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 3020C40141\n for <dev@dpdk.org>; Mon, 19 Sep 2022 14:18:03 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id\n 28J5Ehoh027218;\n Mon, 19 Sep 2022 05:15:45 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3jnbkppkgx-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Mon, 19 Sep 2022 05:15:44 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Mon, 19 Sep 2022 05:15:43 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Mon, 19 Sep 2022 05:15:43 -0700",
            "from localhost.localdomain (unknown [10.28.34.25])\n by maili.marvell.com (Postfix) with ESMTP id 701AC3F703F;\n Mon, 19 Sep 2022 05:15:41 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=WD1fVuVO8vPWgE8SPv4S5hIAngtc7ReK8BIYPbeWg3U=;\n b=ZMBFma3WC45gkNOwtBdOX/gc+SR9g7/U72aIDyo4I2FseXz7gjhvd62skVohc+CJ9G3d\n 8LyeRZFUTNJCGghn/L5eejORK12AhNJ5pp009JVAGVLJw6KpsSsw6hU3C9EBkfhbBkdQ\n g2ZdBDXitacd4FpkSY8Jjic9uPaprVEP2jVdePTjtUuaEV7J3yJyRt17+CdXtSOZrSrK\n HEgVzZ6njBKJ8AHSaUHldC5NASH1T9U5fKi8YoohyNLUgdpTu6cAUhAq4VeWjvEU8t64\n t1eX+kTpucfMYqNpqRHWQeDGisGJQOoROb8QrnfRM+GhXCAlgZv8j5aVR1FOQewEr7QK GA==",
        "From": "<skori@marvell.com>",
        "To": "Ferruh Yigit <ferruh.yigit@xilinx.com>, Thomas Monjalon\n <thomas@monjalon.net>, Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n \"Ray Kinsella\" <mdr@ashroe.eu>",
        "CC": "<dev@dpdk.org>, Jerin Jacob <jerinj@marvell.com>",
        "Subject": "[PATCH v2 1/1] ethdev: support congestion management",
        "Date": "Mon, 19 Sep 2022 17:45:34 +0530",
        "Message-ID": "<20220919121534.1058884-1-skori@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220713130340.2886839-1-jerinj@marvell.com>",
        "References": "<20220713130340.2886839-1-jerinj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "Q4HaTol78AcIEsPGKMc4y3G2zDhbskgC",
        "X-Proofpoint-GUID": "Q4HaTol78AcIEsPGKMc4y3G2zDhbskgC",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1\n definitions=2022-09-19_05,2022-09-16_01,2022-06-22_01",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "From: Jerin Jacob <jerinj@marvell.com>\n\nNIC HW controllers often come with congestion management support on\nvarious HW objects such as Rx queue depth or mempool queue depth.\n\nAlso, it can support various modes of operation such as RED\n(Random early discard), WRED etc on those HW objects.\n\nThis patch adds a framework to express such modes(enum rte_cman_mode)\nand introduce (enum rte_eth_cman_obj) to enumerate the different\nobjects where the modes can operate on.\n\nThis patch adds RTE_CMAN_RED mode of operation and\nRTE_ETH_CMAN_OBJ_RX_QUEUE, RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL object.\n\nIntroduced reserved fields in configuration structure\nbacked by rte_eth_cman_config_init() to add new configuration\nparameters without ABI breakage.\n\nAdded rte_eth_cman_info_get() API to get the information such as\nsupported modes and objects.\n\nAdded rte_eth_cman_config_init(), rte_eth_cman_config_set() APIs\nto configure congestion management on those object with associated mode.\n\nFinally, Added rte_eth_cman_config_get() API to retrieve the\napplied configuration.\n\nSigned-off-by: Jerin Jacob <jerinj@marvell.com>\n---\nv1..v2:\n - Fix review comments (Akhil Goyal)\n\nrfc..v1:\n - Added RED specification (http://www.aciri.org/floyd/papers/red/red.html) link\n - Fixed doxygen comment issue (Min Hu)\n\n doc/guides/nics/features.rst         |  12 +++\n doc/guides/nics/features/default.ini |   1 +\n lib/eal/include/meson.build          |   1 +\n lib/eal/include/rte_cman.h           |  55 ++++++++++\n lib/ethdev/ethdev_driver.h           |  25 +++++\n lib/ethdev/meson.build               |   1 +\n lib/ethdev/rte_cman.c                | 101 ++++++++++++++++++\n lib/ethdev/rte_ethdev.h              | 151 +++++++++++++++++++++++++++\n lib/ethdev/version.map               |   6 ++\n 9 files changed, 353 insertions(+)\n create mode 100644 lib/eal/include/rte_cman.h\n create mode 100644 lib/ethdev/rte_cman.c",
    "diff": "diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst\nindex 7f6cb914a5..aa22d8bb22 100644\n--- a/doc/guides/nics/features.rst\n+++ b/doc/guides/nics/features.rst\n@@ -727,6 +727,18 @@ Supports configuring per-queue stat counter mapping.\n   ``rte_eth_dev_set_tx_queue_stats_mapping()``.\n \n \n+.. _nic_features_congestion_management:\n+\n+Congestion management\n+---------------------\n+\n+Supports congestion management.\n+\n+* **[implements] eth_dev_ops**: ``cman_info_get``, ``cman_config_set``, ``cman_config_get``.\n+* **[related]    API**: ``rte_eth_cman_info_get()``, ``rte_eth_cman_config_init()``,\n+  ``rte_eth_cman_config_set()``, ``rte_eth_cman_config_get()``.\n+\n+\n .. _nic_features_fw_version:\n \n FW version\ndiff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini\nindex d1db0c256a..38a5767b06 100644\n--- a/doc/guides/nics/features/default.ini\n+++ b/doc/guides/nics/features/default.ini\n@@ -60,6 +60,7 @@ Tx descriptor status =\n Basic stats          =\n Extended stats       =\n Stats per queue      =\n+Congestion management =\n FW version           =\n EEPROM dump          =\n Module EEPROM dump   =\ndiff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build\nindex fd6e844224..e569ba7cf4 100644\n--- a/lib/eal/include/meson.build\n+++ b/lib/eal/include/meson.build\n@@ -10,6 +10,7 @@ headers += files(\n         'rte_branch_prediction.h',\n         'rte_bus.h',\n         'rte_class.h',\n+        'rte_cman.h',\n         'rte_common.h',\n         'rte_compat.h',\n         'rte_debug.h',\ndiff --git a/lib/eal/include/rte_cman.h b/lib/eal/include/rte_cman.h\nnew file mode 100644\nindex 0000000000..1d84ddf0fb\n--- /dev/null\n+++ b/lib/eal/include/rte_cman.h\n@@ -0,0 +1,55 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2022 Marvell International Ltd.\n+ */\n+\n+#ifndef RTE_CMAN_H\n+#define RTE_CMAN_H\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+#include <rte_bitops.h>\n+\n+/**\n+ * @file\n+ * Congestion management related parameters for DPDK.\n+ */\n+\n+/** Congestion management modes */\n+enum rte_cman_mode {\n+\t/**\n+\t * Congestion based on Random Early Detection.\n+\t *\n+\t * https://en.wikipedia.org/wiki/Random_early_detection\n+\t * http://www.aciri.org/floyd/papers/red/red.html\n+\t * @see struct rte_cman_red_params\n+\t */\n+\tRTE_CMAN_RED = RTE_BIT64(0),\n+};\n+\n+/**\n+ * RED based congestion management configuration parameters.\n+ */\n+struct rte_cman_red_params {\n+\t/**\n+\t * Minimum threshold (min_th) value\n+\t *\n+\t * Value expressed as percentage. Value must be in 0 to 100(inclusive).\n+\t */\n+\tuint8_t min_th;\n+\t/**\n+\t * Maximum threshold (max_th) value\n+\t *\n+\t * Value expressed as percentage. Value must be in 0 to 100(inclusive).\n+\t */\n+\tuint8_t max_th;\n+\t/** Inverse of packet marking probability maximum value (maxp = 1 / maxp_inv) */\n+\tuint16_t maxp_inv;\n+};\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* RTE_CMAN_H */\ndiff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h\nindex 5101868ea7..9b6ad5c5c1 100644\n--- a/lib/ethdev/ethdev_driver.h\n+++ b/lib/ethdev/ethdev_driver.h\n@@ -1093,6 +1093,22 @@ typedef int (*eth_rx_queue_avail_thresh_query_t)(struct rte_eth_dev *dev,\n \t\t\t\t\tuint16_t *rx_queue_id,\n \t\t\t\t\tuint8_t *avail_thresh);\n \n+/** @internal Get congestion management information. */\n+typedef int (*eth_cman_info_get_t)(struct rte_eth_dev *dev,\n+\t\t\t\tstruct rte_eth_cman_info *info);\n+\n+/** @internal Init congestion management structure with default values. */\n+typedef int (*eth_cman_config_init_t)(struct rte_eth_dev *dev,\n+\t\t\t\tstruct rte_eth_cman_config *config);\n+\n+/** @internal Configure congestion management on a port. */\n+typedef int (*eth_cman_config_set_t)(struct rte_eth_dev *dev,\n+\t\t\t\tstruct rte_eth_cman_config *config);\n+\n+/** @internal Retrieve congestion management configuration of a port. */\n+typedef int (*eth_cman_config_get_t)(struct rte_eth_dev *dev,\n+\t\t\t\tstruct rte_eth_cman_config *config);\n+\n /**\n  * @internal A structure containing the functions exported by an Ethernet driver.\n  */\n@@ -1308,6 +1324,15 @@ struct eth_dev_ops {\n \teth_rx_queue_avail_thresh_set_t rx_queue_avail_thresh_set;\n \t/** Query Rx queue available descriptors threshold event */\n \teth_rx_queue_avail_thresh_query_t rx_queue_avail_thresh_query;\n+\n+\t/** Get congestion management information */\n+\teth_cman_info_get_t cman_info_get;\n+\t/** Initialize congestion management structure with default values */\n+\teth_cman_config_init_t cman_config_init;\n+\t/** Configure congestion management */\n+\teth_cman_config_set_t cman_config_set;\n+\t/** Retrieve congestion management configuration */\n+\teth_cman_config_get_t cman_config_get;\n };\n \n /**\ndiff --git a/lib/ethdev/meson.build b/lib/ethdev/meson.build\nindex 47bb2625b0..59ad49114f 100644\n--- a/lib/ethdev/meson.build\n+++ b/lib/ethdev/meson.build\n@@ -7,6 +7,7 @@ sources = files(\n         'ethdev_profile.c',\n         'ethdev_trace_points.c',\n         'rte_class_eth.c',\n+        'rte_cman.c',\n         'rte_ethdev.c',\n         'rte_flow.c',\n         'rte_mtr.c',\ndiff --git a/lib/ethdev/rte_cman.c b/lib/ethdev/rte_cman.c\nnew file mode 100644\nindex 0000000000..2093c247d1\n--- /dev/null\n+++ b/lib/ethdev/rte_cman.c\n@@ -0,0 +1,101 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2022 Marvell International Ltd.\n+ */\n+\n+#include <stdint.h>\n+\n+#include <rte_errno.h>\n+#include \"rte_ethdev.h\"\n+#include \"ethdev_driver.h\"\n+\n+static int\n+eth_err(uint16_t port_id, int ret)\n+{\n+\tif (ret == 0)\n+\t\treturn 0;\n+\n+\tif (rte_eth_dev_is_removed(port_id))\n+\t\treturn -EIO;\n+\n+\treturn ret;\n+}\n+\n+#define RTE_CMAN_FUNC_ERR_RET(func)\t\t\t\t\t\\\n+do {\t\t\t\t\t\t\t\t\t\\\n+\tif (func == NULL) {\t\t\t\t\t\t\\\n+\t\tRTE_ETHDEV_LOG(ERR, \"Function not implemented\\n\");\t\\\n+\t\treturn -ENOTSUP;\t\t\t\t\t\\\n+\t}\t\t\t\t\t\t\t\t\\\n+} while (0)\n+\n+/* Get congestion management information for a port */\n+int\n+rte_eth_cman_info_get(uint16_t port_id, struct rte_eth_cman_info *info)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tif (info == NULL) {\n+\t\tRTE_ETHDEV_LOG(ERR, \"congestion management info is NULL\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tRTE_CMAN_FUNC_ERR_RET(dev->dev_ops->cman_info_get);\n+\treturn eth_err(port_id, (*dev->dev_ops->cman_info_get)(dev, info));\n+}\n+\n+/* Initialize congestion management structure with default values */\n+int\n+rte_eth_cman_config_init(uint16_t port_id, struct rte_eth_cman_config *config)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tif (config == NULL) {\n+\t\tRTE_ETHDEV_LOG(ERR, \"congestion management config is NULL\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tRTE_CMAN_FUNC_ERR_RET(dev->dev_ops->cman_config_init);\n+\treturn eth_err(port_id, (*dev->dev_ops->cman_config_init)(dev, config));\n+}\n+\n+/* Configure congestion management on a port */\n+int\n+rte_eth_cman_config_set(uint16_t port_id, struct rte_eth_cman_config *config)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tif (config == NULL) {\n+\t\tRTE_ETHDEV_LOG(ERR, \"congestion management config is NULL\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tRTE_CMAN_FUNC_ERR_RET(dev->dev_ops->cman_config_set);\n+\treturn eth_err(port_id, (*dev->dev_ops->cman_config_set)(dev, config));\n+}\n+\n+/* Retrieve congestion management configuration of a port */\n+int\n+rte_eth_cman_config_get(uint16_t port_id, struct rte_eth_cman_config *config)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tif (config == NULL) {\n+\t\tRTE_ETHDEV_LOG(ERR, \"congestion management config is NULL\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tRTE_CMAN_FUNC_ERR_RET(dev->dev_ops->cman_config_get);\n+\treturn eth_err(port_id, (*dev->dev_ops->cman_config_get)(dev, config));\n+}\ndiff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex de9e970d4d..f4bb644c6a 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -160,6 +160,7 @@ extern \"C\" {\n #define RTE_ETHDEV_DEBUG_TX\n #endif\n \n+#include <rte_cman.h>\n #include <rte_compat.h>\n #include <rte_log.h>\n #include <rte_interrupts.h>\n@@ -5506,6 +5507,156 @@ typedef struct {\n __rte_experimental\n int rte_eth_dev_priv_dump(uint16_t port_id, FILE *file);\n \n+/* Congestion management */\n+\n+/** Enumerate list of ethdev congestion management objects */\n+enum rte_eth_cman_obj {\n+\t/** Congestion management based on Rx queue depth */\n+\tRTE_ETH_CMAN_OBJ_RX_QUEUE = RTE_BIT64(0),\n+\t/**\n+\t * Congestion management based on mempool depth associated with Rx queue\n+\t * @see rte_eth_rx_queue_setup()\n+\t */\n+\tRTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL = RTE_BIT64(1),\n+};\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this structure may change, or be removed, without prior notice\n+ *\n+ * A structure used to retrieve information of ethdev congestion management.\n+ */\n+struct rte_eth_cman_info {\n+\t/**\n+\t * Set of supported congestion management modes\n+\t * @see enum rte_cman_mode\n+\t */\n+\tuint64_t modes_supported;\n+\t/**\n+\t * Set of supported congestion management objects\n+\t * @see enum rte_eth_cman_obj\n+\t */\n+\tuint64_t objs_supported;\n+\t/** Reserved for future fields */\n+\tuint8_t rsvd[8];\n+};\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this structure may change, or be removed, without prior notice\n+ *\n+ * A structure used to configure the ethdev congestion management.\n+ */\n+struct rte_eth_cman_config {\n+\t/** Congestion management object */\n+\tenum rte_eth_cman_obj obj;\n+\t/** Congestion management mode */\n+\tenum rte_cman_mode mode;\n+\tunion {\n+\t\t/**\n+\t\t * Rx queue to configure congestion management.\n+\t\t *\n+\t\t * Valid when object is RTE_ETH_CMAN_OBJ_RX_QUEUE or\n+\t\t * RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL.\n+\t\t */\n+\t\tuint16_t rx_queue;\n+\t\t/** Reserved for future fields */\n+\t\tuint8_t rsvd_obj_params[4];\n+\t} obj_param;\n+\tunion {\n+\t\t/**\n+\t\t * RED configuration parameters.\n+\t\t *\n+\t\t * Valid when mode is RTE_CMAN_RED.\n+\t\t */\n+\t\tstruct rte_cman_red_params red;\n+\t\t/** Reserved for future fields */\n+\t\tuint8_t rsvd_mode_params[4];\n+\t} mode_param;\n+};\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice\n+ *\n+ * Retrieve the information for ethdev congestion management\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param info\n+ *   A pointer to a structure of type *rte_eth_cman_info* to be filled with\n+ *   the information about congestion management.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if support for cman_info_get does not exist.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+__rte_experimental\n+int rte_eth_cman_info_get(uint16_t port_id, struct rte_eth_cman_info *info);\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice\n+ *\n+ * Initialize the ethdev congestion management configuration structure with default values.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param config\n+ *   A pointer to a structure of type *rte_eth_cman_config* to be initialized\n+ *   with default value.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if support for cman_config_init does not exist.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+__rte_experimental\n+int rte_eth_cman_config_init(uint16_t port_id, struct rte_eth_cman_config *config);\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice\n+ *\n+ * Configure ethdev congestion management\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param config\n+ *   A pointer to a structure of type *rte_eth_cman_config* to be configured.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if support for cman_config_set does not exist.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+__rte_experimental\n+int rte_eth_cman_config_set(uint16_t port_id, struct rte_eth_cman_config *config);\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice\n+ *\n+ * Retrieve the applied ethdev congestion management parameters for the given port.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param config\n+ *   A pointer to a structure of type *rte_eth_cman_config* to retrieve\n+ *   congestion management parameters for the given object.\n+ *   Application must fill all parameters except mode_param parameter in\n+ *   struct rte_eth_cman_config.\n+ *\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if support for cman_config_get does not exist.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+__rte_experimental\n+int rte_eth_cman_config_get(uint16_t port_id, struct rte_eth_cman_config *config);\n+\n #include <rte_ethdev_core.h>\n \n /**\ndiff --git a/lib/ethdev/version.map b/lib/ethdev/version.map\nindex 03f52fee91..ea9b9497ad 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -285,6 +285,12 @@ 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_eth_cman_config_get;\n+\trte_eth_cman_config_init;\n+\trte_eth_cman_config_set;\n+\trte_eth_cman_info_get;\n };\n \n INTERNAL {\n",
    "prefixes": [
        "v2",
        "1/1"
    ]
}