get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 97171,
    "url": "https://patches.dpdk.org/api/patches/97171/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210820162834.12544-6-konstantin.ananyev@intel.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": "<20210820162834.12544-6-konstantin.ananyev@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210820162834.12544-6-konstantin.ananyev@intel.com",
    "date": "2021-08-20T16:28:32",
    "name": "[RFC,5/7] eth: make drivers to use new API to obtain descriptor status",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0ef5c9c36c42f1799004a155539773a2a2c2e611",
    "submitter": {
        "id": 33,
        "url": "https://patches.dpdk.org/api/people/33/?format=api",
        "name": "Ananyev, Konstantin",
        "email": "konstantin.ananyev@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210820162834.12544-6-konstantin.ananyev@intel.com/mbox/",
    "series": [
        {
            "id": 18382,
            "url": "https://patches.dpdk.org/api/series/18382/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=18382",
            "date": "2021-08-20T16:28:27",
            "name": "hide eth dev related structures",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/18382/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/97171/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/97171/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 3EB25A0C4D;\n\tFri, 20 Aug 2021 18:29:49 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0535841226;\n\tFri, 20 Aug 2021 18:29:40 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id 2034941226;\n Fri, 20 Aug 2021 18:29:37 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 20 Aug 2021 09:29:37 -0700",
            "from sivswdev08.ir.intel.com ([10.237.217.47])\n by fmsmga008.fm.intel.com with ESMTP; 20 Aug 2021 09:29:35 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10082\"; a=\"203946824\"",
            "E=Sophos;i=\"5.84,338,1620716400\"; d=\"scan'208\";a=\"203946824\"",
            "E=Sophos;i=\"5.84,338,1620716400\"; d=\"scan'208\";a=\"490551967\""
        ],
        "X-ExtLoop1": "1",
        "From": "Konstantin Ananyev <konstantin.ananyev@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, ferruh.yigit@intel.com,\n andrew.rybchenko@oktetlabs.ru,\n qiming.yang@intel.com, qi.z.zhang@intel.com, beilei.xing@intel.com,\n techboard@dpdk.org, Konstantin Ananyev <konstantin.ananyev@intel.com>",
        "Date": "Fri, 20 Aug 2021 17:28:32 +0100",
        "Message-Id": "<20210820162834.12544-6-konstantin.ananyev@intel.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<20210820162834.12544-1-konstantin.ananyev@intel.com>",
        "References": "<20210820162834.12544-1-konstantin.ananyev@intel.com>",
        "Subject": "[dpdk-dev] [RFC 5/7] eth: make drivers to use new API to obtain\n descriptor status",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "ethdev: make changes so drivers can start using new API for\n        rx_descriptor_status() and tx_descriptor_status().\n        remove related function pointers from 'struct rte_eth_dev'.\ndrivers/net: adjust to new API.\n\nSigned-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>\n---\n drivers/net/i40e/i40e_ethdev.c    |   6 +-\n drivers/net/i40e/i40e_ethdev_vf.c |   6 +-\n drivers/net/i40e/i40e_rxtx.c      |   8 +-\n drivers/net/i40e/i40e_rxtx.h      |   4 +-\n drivers/net/ice/ice_ethdev.c      |   6 +-\n drivers/net/ice/ice_rxtx.c        |   8 +-\n drivers/net/ice/ice_rxtx.h        |   4 +-\n lib/ethdev/ethdev_driver.h        | 132 ++++++++++++++++++++++++++++++\n lib/ethdev/rte_ethdev.c           |  45 +++++++++-\n lib/ethdev/rte_ethdev.h           |  40 ++++-----\n lib/ethdev/rte_ethdev_core.h      |   3 -\n lib/ethdev/version.map            |   4 +\n 12 files changed, 221 insertions(+), 45 deletions(-)",
    "diff": "diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex bd6408da90..da5a7ec168 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -1435,8 +1435,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)\n \tdev->dev_ops = &i40e_eth_dev_ops;\n \tdev->rx_queue_count = i40e_dev_rx_queue_count;\n \tdev->rx_descriptor_done = i40e_dev_rx_descriptor_done;\n-\tdev->rx_descriptor_status = i40e_dev_rx_descriptor_status;\n-\tdev->tx_descriptor_status = i40e_dev_tx_descriptor_status;\n+\trte_eth_set_rx_desc_st(dev->data->port_id,\n+\t\t_RTE_ETH_FUNC(i40e_dev_rx_descriptor_status));\n+\trte_eth_set_tx_desc_st(dev->data->port_id,\n+\t\t_RTE_ETH_FUNC(i40e_dev_tx_descriptor_status));\n \trte_eth_set_rx_burst(dev->data->port_id, _RTE_ETH_FUNC(i40e_recv_pkts));\n \trte_eth_set_tx_burst(dev->data->port_id, _RTE_ETH_FUNC(i40e_xmit_pkts));\n \trte_eth_set_tx_prep(dev->data->port_id, _RTE_ETH_FUNC(i40e_prep_pkts));\ndiff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c\nindex 3755bdb66a..f1bd6d4e1b 100644\n--- a/drivers/net/i40e/i40e_ethdev_vf.c\n+++ b/drivers/net/i40e/i40e_ethdev_vf.c\n@@ -1574,8 +1574,10 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)\n \teth_dev->dev_ops = &i40evf_eth_dev_ops;\n \teth_dev->rx_queue_count       = i40e_dev_rx_queue_count;\n \teth_dev->rx_descriptor_done   = i40e_dev_rx_descriptor_done;\n-\teth_dev->rx_descriptor_status = i40e_dev_rx_descriptor_status;\n-\teth_dev->tx_descriptor_status = i40e_dev_tx_descriptor_status;\n+\trte_eth_set_rx_desc_st(eth_dev->data->port_id,\n+\t\t_RTE_ETH_FUNC(i40e_dev_rx_descriptor_status));\n+\trte_eth_set_tx_desc_st(eth_dev->data->port_id,\n+\t\t_RTE_ETH_FUNC(i40e_dev_tx_descriptor_status));\n \trte_eth_set_rx_burst(eth_dev->data->port_id,\n \t\t_RTE_ETH_FUNC(i40e_recv_pkts));\n \trte_eth_set_tx_burst(eth_dev->data->port_id,\ndiff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c\nindex 44c4d33879..310bb3f496 100644\n--- a/drivers/net/i40e/i40e_rxtx.c\n+++ b/drivers/net/i40e/i40e_rxtx.c\n@@ -2189,7 +2189,7 @@ i40e_dev_rx_descriptor_done(void *rx_queue, uint16_t offset)\n \treturn ret;\n }\n \n-int\n+static int\n i40e_dev_rx_descriptor_status(void *rx_queue, uint16_t offset)\n {\n \tstruct i40e_rx_queue *rxq = rx_queue;\n@@ -2216,7 +2216,9 @@ i40e_dev_rx_descriptor_status(void *rx_queue, uint16_t offset)\n \treturn RTE_ETH_RX_DESC_AVAIL;\n }\n \n-int\n+_RTE_ETH_RX_DESC_DEF(i40e_dev_rx_descriptor_status)\n+\n+static int\n i40e_dev_tx_descriptor_status(void *tx_queue, uint16_t offset)\n {\n \tstruct i40e_tx_queue *txq = tx_queue;\n@@ -2247,6 +2249,8 @@ i40e_dev_tx_descriptor_status(void *tx_queue, uint16_t offset)\n \treturn RTE_ETH_TX_DESC_FULL;\n }\n \n+_RTE_ETH_TX_DESC_DEF(i40e_dev_tx_descriptor_status)\n+\n static int\n i40e_dev_tx_queue_setup_runtime(struct rte_eth_dev *dev,\n \t\t\t\tstruct i40e_tx_queue *txq)\ndiff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h\nindex 85bc29b23a..42b3407fe2 100644\n--- a/drivers/net/i40e/i40e_rxtx.h\n+++ b/drivers/net/i40e/i40e_rxtx.h\n@@ -223,8 +223,8 @@ void i40e_rx_queue_release_mbufs(struct i40e_rx_queue *rxq);\n uint32_t i40e_dev_rx_queue_count(struct rte_eth_dev *dev,\n \t\t\t\t uint16_t rx_queue_id);\n int i40e_dev_rx_descriptor_done(void *rx_queue, uint16_t offset);\n-int i40e_dev_rx_descriptor_status(void *rx_queue, uint16_t offset);\n-int i40e_dev_tx_descriptor_status(void *tx_queue, uint16_t offset);\n+_RTE_ETH_RX_DESC_PROTO(i40e_dev_rx_descriptor_status);\n+_RTE_ETH_TX_DESC_PROTO(i40e_dev_tx_descriptor_status);\n \n _RTE_ETH_RX_PROTO(i40e_recv_pkts_vec);\n _RTE_ETH_RX_PROTO(i40e_recv_scattered_pkts_vec);\ndiff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c\nindex 42b6f5928d..8907737ba3 100644\n--- a/drivers/net/ice/ice_ethdev.c\n+++ b/drivers/net/ice/ice_ethdev.c\n@@ -1994,8 +1994,10 @@ ice_dev_init(struct rte_eth_dev *dev)\n \n \tdev->dev_ops = &ice_eth_dev_ops;\n \tdev->rx_queue_count = ice_rx_queue_count;\n-\tdev->rx_descriptor_status = ice_rx_descriptor_status;\n-\tdev->tx_descriptor_status = ice_tx_descriptor_status;\n+\trte_eth_set_rx_desc_st(dev->data->port_id,\n+\t\t _RTE_ETH_FUNC(ice_rx_descriptor_status));\n+\trte_eth_set_tx_desc_st(dev->data->port_id,\n+\t\t _RTE_ETH_FUNC(ice_tx_descriptor_status));\n \trte_eth_set_rx_burst(dev->data->port_id, _RTE_ETH_FUNC(ice_recv_pkts));\n \trte_eth_set_tx_burst(dev->data->port_id, _RTE_ETH_FUNC(ice_xmit_pkts));\n \trte_eth_set_tx_prep(dev->data->port_id, _RTE_ETH_FUNC(ice_prep_pkts));\ndiff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c\nindex 2ddcbbb721..461135b4b4 100644\n--- a/drivers/net/ice/ice_rxtx.c\n+++ b/drivers/net/ice/ice_rxtx.c\n@@ -2021,7 +2021,7 @@ ice_dev_supported_ptypes_get(struct rte_eth_dev *dev)\n \treturn NULL;\n }\n \n-int\n+static int\n ice_rx_descriptor_status(void *rx_queue, uint16_t offset)\n {\n \tvolatile union ice_rx_flex_desc *rxdp;\n@@ -2046,7 +2046,9 @@ ice_rx_descriptor_status(void *rx_queue, uint16_t offset)\n \treturn RTE_ETH_RX_DESC_AVAIL;\n }\n \n-int\n+_RTE_ETH_RX_DESC_DEF(ice_rx_descriptor_status)\n+\n+static int\n ice_tx_descriptor_status(void *tx_queue, uint16_t offset)\n {\n \tstruct ice_tx_queue *txq = tx_queue;\n@@ -2077,6 +2079,8 @@ ice_tx_descriptor_status(void *tx_queue, uint16_t offset)\n \treturn RTE_ETH_TX_DESC_FULL;\n }\n \n+_RTE_ETH_TX_DESC_DEF(ice_tx_descriptor_status)\n+\n void\n ice_free_queues(struct rte_eth_dev *dev)\n {\ndiff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h\nindex 53f6080cc9..49418442eb 100644\n--- a/drivers/net/ice/ice_rxtx.h\n+++ b/drivers/net/ice/ice_rxtx.h\n@@ -228,8 +228,8 @@ int ice_rx_burst_mode_get(struct rte_eth_dev *dev, uint16_t queue_id,\n \t\t\t  struct rte_eth_burst_mode *mode);\n int ice_tx_burst_mode_get(struct rte_eth_dev *dev, uint16_t queue_id,\n \t\t\t  struct rte_eth_burst_mode *mode);\n-int ice_rx_descriptor_status(void *rx_queue, uint16_t offset);\n-int ice_tx_descriptor_status(void *tx_queue, uint16_t offset);\n+_RTE_ETH_RX_DESC_PROTO(ice_rx_descriptor_status);\n+_RTE_ETH_TX_DESC_PROTO(ice_tx_descriptor_status);\n void ice_set_default_ptype_table(struct rte_eth_dev *dev);\n const uint32_t *ice_dev_supported_ptypes_get(struct rte_eth_dev *dev);\n void ice_select_rxd_to_pkt_fields_handler(struct ice_rx_queue *rxq,\ndiff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h\nindex fe1b4fc349..eec56189a0 100644\n--- a/lib/ethdev/ethdev_driver.h\n+++ b/lib/ethdev/ethdev_driver.h\n@@ -1789,6 +1789,138 @@ rte_eth_tx_prep_t rte_eth_get_tx_prep(uint16_t port_id);\n __rte_experimental\n int rte_eth_set_tx_prep(uint16_t port_id, rte_eth_tx_prep_t txf);\n \n+/**\n+ * @internal\n+ * Helper routine for eth driver rx_descriptor_status API.\n+ * Should be called as first thing on entrance to the PMD's\n+ * rx_descriptor_status implementation.\n+ * Does necessary checks and retrieves pointer to device RX queue.\n+ *\n+ * @param port_id\n+ *  The port identifier of the Ethernet device.\n+ * @param queue_id\n+ *  The index of the receive queue.\n+ * @param rxq\n+ *  The output pointer to the RX queue structure.\n+ *\n+ * @return\n+ *  Zero on success or negative error code otherwise.\n+ */\n+__rte_internal\n+static inline int\n+_rte_eth_rx_desc_prolog(uint16_t port_id, uint16_t queue_id, void **rxq)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+#ifdef RTE_ETHDEV_DEBUG_RX\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+#endif\n+\tdev = &rte_eth_devices[port_id];\n+#ifdef RTE_ETHDEV_DEBUG_RX\n+\tif (queue_id >= dev->data->nb_rx_queues)\n+\t\treturn -ENODEV;\n+#endif\n+\t*rxq = dev->data->rx_queues[queue_id];\n+        return 0;\n+}\n+\n+/**\n+ * @internal\n+ * Helper macro to create new API wrappers for existing PMD rx_descriptor_status\n+ * functions.\n+ */\n+#define _RTE_ETH_RX_DESC_PROTO(fn) \\\n+\tint _RTE_ETH_FUNC(fn)(uint16_t port_id, uint16_t queue_id, \\\n+\t\t\tuint16_t offset)\n+\n+/**\n+ * @internal\n+ * Helper macro to create new API wrappers for existing PMD rx_descriptor_status\n+ * functions.\n+ */\n+#define _RTE_ETH_RX_DESC_DEF(fn) \\\n+_RTE_ETH_RX_DESC_PROTO(fn) \\\n+{ \\\n+\tint rc; \\\n+\tvoid *rxq; \\\n+\trc = _rte_eth_rx_desc_prolog(port_id, queue_id, &rxq); \\\n+\tif (rc != 0) \\\n+\t\treturn rc; \\\n+\treturn fn(rxq, offset); \\\n+}\n+\n+__rte_experimental\n+rte_eth_rx_descriptor_status_t rte_eth_get_rx_desc_st(uint16_t port_id);\n+\n+__rte_experimental\n+int rte_eth_set_rx_desc_st(uint16_t port_id, rte_eth_rx_descriptor_status_t rf);\n+\n+/**\n+ * @internal\n+ * Helper routine for eth driver tx_descriptor_status API.\n+ * Should be called as first thing on entrance to the PMD's\n+ * tx_descriptor_status implementation.\n+ * Does necessary checks and retrieves pointer to device TX queue.\n+ *\n+ * @param port_id\n+ *  The port identifier of the Ethernet device.\n+ * @param queue_id\n+ *  The index of the transmit queue.\n+ * @param txq\n+ *  The output pointer to the TX queue structure.\n+ *\n+ * @return\n+ *  Zero on success or negative error code otherwise.\n+ */\n+__rte_internal\n+static inline int\n+_rte_eth_tx_desc_prolog(uint16_t port_id, uint16_t queue_id, void **txq)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+#ifdef RTE_ETHDEV_DEBUG_TX\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+#endif\n+\tdev = &rte_eth_devices[port_id];\n+#ifdef RTE_ETHDEV_DEBUG_TX\n+\tif (queue_id >= dev->data->nb_tx_queues)\n+\t\treturn -ENODEV;\n+#endif\n+\t*txq = dev->data->tx_queues[queue_id];\n+        return 0;\n+}\n+\n+/**\n+ * @internal\n+ * Helper macro to create new API wrappers for existing PMD tx_descriptor_status\n+ * functions.\n+ */\n+#define _RTE_ETH_TX_DESC_PROTO(fn) \\\n+\tint _RTE_ETH_FUNC(fn)(uint16_t port_id, uint16_t queue_id, \\\n+\t\t\tuint16_t offset)\n+\n+/**\n+ * @internal\n+ * Helper macro to create new API wrappers for existing PMD tx_descriptor_status\n+ * functions.\n+ */\n+#define _RTE_ETH_TX_DESC_DEF(fn) \\\n+_RTE_ETH_TX_DESC_PROTO(fn) \\\n+{ \\\n+\tint rc; \\\n+\tvoid *txq; \\\n+\trc = _rte_eth_tx_desc_prolog(port_id, queue_id, &txq); \\\n+\tif (rc != 0) \\\n+\t\treturn rc; \\\n+\treturn fn(txq, offset); \\\n+}\n+\n+__rte_experimental\n+rte_eth_tx_descriptor_status_t rte_eth_get_tx_desc_st(uint16_t port_id);\n+\n+__rte_experimental\n+int rte_eth_set_tx_desc_st(uint16_t port_id, rte_eth_tx_descriptor_status_t rf);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex 6b1d9c5f83..e48d1ec281 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -590,8 +590,6 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)\n \teth_dev->intr_handle = NULL;\n \teth_dev->rx_queue_count = NULL;\n \teth_dev->rx_descriptor_done = NULL;\n-\teth_dev->rx_descriptor_status = NULL;\n-\teth_dev->tx_descriptor_status = NULL;\n \teth_dev->dev_ops = NULL;\n \n \tif (rte_eal_process_type() == RTE_PROC_PRIMARY) {\n@@ -6400,3 +6398,46 @@ rte_eth_set_tx_prep(uint16_t port_id, rte_eth_tx_prep_t tpf)\n \trte_eth_burst_api[port_id].tx_pkt_prepare = tpf;\n \treturn 0;\n }\n+\n+__rte_experimental\n+rte_eth_rx_descriptor_status_t\n+rte_eth_get_rx_desc_st(uint16_t port_id)\n+{\n+\tif (port_id >= RTE_DIM(rte_eth_burst_api)) {\n+\t\trte_errno = EINVAL;\n+\t\treturn NULL;\n+\t}\n+\treturn rte_eth_burst_api[port_id].rx_descriptor_status;\n+}\n+\n+__rte_experimental\n+int\n+rte_eth_set_rx_desc_st(uint16_t port_id, rte_eth_rx_descriptor_status_t rf)\n+{\n+\tif (port_id >= RTE_DIM(rte_eth_burst_api))\n+\t\treturn -EINVAL;\n+\n+\trte_eth_burst_api[port_id].rx_descriptor_status = rf;\n+\treturn 0;\n+}\n+\n+rte_eth_tx_descriptor_status_t\n+rte_eth_get_tx_desc_st(uint16_t port_id)\n+{\n+\tif (port_id >= RTE_DIM(rte_eth_burst_api)) {\n+\t\trte_errno = EINVAL;\n+\t\treturn NULL;\n+\t}\n+\treturn rte_eth_burst_api[port_id].tx_descriptor_status;\n+}\n+\n+__rte_experimental\n+int\n+rte_eth_set_tx_desc_st(uint16_t port_id, rte_eth_tx_descriptor_status_t tf)\n+{\n+\tif (port_id >= RTE_DIM(rte_eth_burst_api))\n+\t\treturn -EINVAL;\n+\n+\trte_eth_burst_api[port_id].tx_descriptor_status = tf;\n+\treturn 0;\n+}\ndiff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex 01fd1c99c3..073b532b7b 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -5082,21 +5082,15 @@ static inline int\n rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,\n \tuint16_t offset)\n {\n-\tstruct rte_eth_dev *dev;\n-\tvoid *rxq;\n+\trte_eth_rx_descriptor_status_t rds;\n \n-#ifdef RTE_ETHDEV_DEBUG_RX\n-\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n-#endif\n-\tdev = &rte_eth_devices[port_id];\n-#ifdef RTE_ETHDEV_DEBUG_RX\n-\tif (queue_id >= dev->data->nb_rx_queues)\n-\t\treturn -ENODEV;\n-#endif\n-\tRTE_FUNC_PTR_OR_ERR_RET(*dev->rx_descriptor_status, -ENOTSUP);\n-\trxq = dev->data->rx_queues[queue_id];\n+\tif (port_id >= RTE_MAX_ETHPORTS)\n+\t\treturn -EINVAL;\n+\n+\trds = rte_eth_burst_api[port_id].rx_descriptor_status;\n+\tRTE_FUNC_PTR_OR_ERR_RET(rds, -ENOTSUP);\n \n-\treturn (*dev->rx_descriptor_status)(rxq, offset);\n+\treturn (rds)(port_id, queue_id, offset);\n }\n \n #define RTE_ETH_TX_DESC_FULL    0 /**< Desc filled for hw, waiting xmit. */\n@@ -5139,21 +5133,15 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,\n static inline int rte_eth_tx_descriptor_status(uint16_t port_id,\n \tuint16_t queue_id, uint16_t offset)\n {\n-\tstruct rte_eth_dev *dev;\n-\tvoid *txq;\n+\trte_eth_tx_descriptor_status_t tds;\n \n-#ifdef RTE_ETHDEV_DEBUG_TX\n-\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n-#endif\n-\tdev = &rte_eth_devices[port_id];\n-#ifdef RTE_ETHDEV_DEBUG_TX\n-\tif (queue_id >= dev->data->nb_tx_queues)\n-\t\treturn -ENODEV;\n-#endif\n-\tRTE_FUNC_PTR_OR_ERR_RET(*dev->tx_descriptor_status, -ENOTSUP);\n-\ttxq = dev->data->tx_queues[queue_id];\n+\tif (port_id >= RTE_MAX_ETHPORTS)\n+\t\treturn -EINVAL;\n+\n+\ttds = rte_eth_burst_api[port_id].tx_descriptor_status;\n+\tRTE_FUNC_PTR_OR_ERR_RET(tds, -ENOTSUP);\n \n-\treturn (*dev->tx_descriptor_status)(txq, offset);\n+\treturn (tds)(port_id, queue_id, offset);\n }\n \n /**\ndiff --git a/lib/ethdev/rte_ethdev_core.h b/lib/ethdev/rte_ethdev_core.h\nindex 2d4600af4d..1e42bacfce 100644\n--- a/lib/ethdev/rte_ethdev_core.h\n+++ b/lib/ethdev/rte_ethdev_core.h\n@@ -117,9 +117,6 @@ struct rte_eth_rxtx_callback {\n struct rte_eth_dev {\n \teth_rx_queue_count_t       rx_queue_count; /**< Get the number of used RX descriptors. */\n \teth_rx_descriptor_done_t   rx_descriptor_done;   /**< Check rxd DD bit. */\n-\teth_rx_descriptor_status_t rx_descriptor_status; /**< Check the status of a Rx descriptor. */\n-\teth_tx_descriptor_status_t tx_descriptor_status; /**< Check the status of a Tx descriptor. */\n-\n \t/**\n \t * Next two fields are per-device data but *data is shared between\n \t * primary and secondary processes and *process_private is per-process\ndiff --git a/lib/ethdev/version.map b/lib/ethdev/version.map\nindex b26fd478aa..802d9c3c11 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -253,9 +253,13 @@ EXPERIMENTAL {\n \t# added in 21.11\n \trte_eth_burst_api;\n \trte_eth_get_rx_burst;\n+\trte_eth_get_rx_desc_st;\n+\trte_eth_get_tx_desc_st;\n \trte_eth_get_tx_burst;\n \trte_eth_get_tx_prep;\n \trte_eth_set_rx_burst;\n+\trte_eth_set_rx_desc_st;\n+\trte_eth_set_tx_desc_st;\n \trte_eth_set_tx_burst;\n \trte_eth_set_tx_prep;\n };\n",
    "prefixes": [
        "RFC",
        "5/7"
    ]
}