get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 107384,
    "url": "https://patches.dpdk.org/api/patches/107384/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220211191143.3432311-1-ferruh.yigit@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": "<20220211191143.3432311-1-ferruh.yigit@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220211191143.3432311-1-ferruh.yigit@intel.com",
    "date": "2022-02-11T19:11:42",
    "name": "[v5,1/2] ethdev: introduce generic dummy packet burst function",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "893df84b3d2c86cf66502ac46cd0aa1d04c42387",
    "submitter": {
        "id": 324,
        "url": "https://patches.dpdk.org/api/people/324/?format=api",
        "name": "Ferruh Yigit",
        "email": "ferruh.yigit@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/20220211191143.3432311-1-ferruh.yigit@intel.com/mbox/",
    "series": [
        {
            "id": 21640,
            "url": "https://patches.dpdk.org/api/series/21640/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=21640",
            "date": "2022-02-11T19:11:42",
            "name": "[v5,1/2] ethdev: introduce generic dummy packet burst function",
            "version": 5,
            "mbox": "https://patches.dpdk.org/series/21640/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/107384/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/107384/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 BB074A00C2;\n\tFri, 11 Feb 2022 20:11:55 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5505240683;\n\tFri, 11 Feb 2022 20:11:55 +0100 (CET)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id A95C340140\n for <dev@dpdk.org>; Fri, 11 Feb 2022 20:11:53 +0100 (CET)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Feb 2022 11:11:52 -0800",
            "from silpixa00399752.ir.intel.com (HELO\n silpixa00399752.ger.corp.intel.com) ([10.237.222.27])\n by orsmga005.jf.intel.com with ESMTP; 11 Feb 2022 11:11:46 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1644606713; x=1676142713;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=MG62C/8BoJH8MEnLX1QKgvK/SEL76EG4L+3MR4z9K3I=;\n b=PDJQrgMfmK+XJzJlsOnM3QrGdunrYnKZxzztvpWmMfKXRMB4eIwyr01c\n 5Wao0DCTYQZgcKoUGxV0ZocqyqJyYEi2YhaygwG2xMtncx4WunEiItguJ\n g34HroMTM7u0NvjPCxbLCmrJug1xTV8/GVjL2oidF/6KcQ/UrqNBBXdVf\n mUHDYsbtA+0WtCvwJAI0rlSL3b8x/uiAZkYf9LYpfpGYGs6idzYkwH1k4\n nK+v2KeI5Nowa2nKG+6MX2PNSzrZYSsicWeCb75DK3Yfk30Ql67lnqXAq\n G9KT3nDWNoKOy97tee9z2RSWWuw7V7i4KqdMX5sQ/NyB/sF/nSr82vS5b A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10255\"; a=\"229758336\"",
            "E=Sophos;i=\"5.88,361,1635231600\"; d=\"scan'208\";a=\"229758336\"",
            "E=Sophos;i=\"5.88,361,1635231600\"; d=\"scan'208\";a=\"702210827\""
        ],
        "X-ExtLoop1": "1",
        "From": "Ferruh Yigit <ferruh.yigit@intel.com>",
        "To": "Ciara Loftus <ciara.loftus@intel.com>, Qi Zhang <qi.z.zhang@intel.com>,\n Shepard Siegel <shepard.siegel@atomicrules.com>,\n Ed Czeck <ed.czeck@atomicrules.com>,\n John Miller <john.miller@atomicrules.com>, Rasesh Mody <rmody@marvell.com>,\n Shahed Shaikh <shshaikh@marvell.com>,\n Ajit Khaparde <ajit.khaparde@broadcom.com>,\n Somnath Kotur <somnath.kotur@broadcom.com>,\n Nithin Dabilpuram <ndabilpuram@marvell.com>,\n Kiran Kumar K <kirankumark@marvell.com>,\n Sunil Kumar Kori <skori@marvell.com>, Satha Rao <skoteshwar@marvell.com>,\n Hemant Agrawal <hemant.agrawal@nxp.com>,\n Sachin Saxena <sachin.saxena@oss.nxp.com>, John Daley <johndale@cisco.com>,\n Hyong Youb Kim <hyonkim@cisco.com>, \"Min Hu (Connor)\" <humin29@huawei.com>,\n Yisen Zhuang <yisen.zhuang@huawei.com>, Lijun Ou <oulijun@huawei.com>,\n Matan Azrad <matan@nvidia.com>,\n Viacheslav Ovsiienko <viacheslavo@nvidia.com>,\n Gagandeep Singh <g.singh@nxp.com>,\n Devendra Singh Rawat <dsinghrawat@marvell.com>,\n Thomas Monjalon <thomas@monjalon.net>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Ray Kinsella <mdr@ashroe.eu>",
        "Cc": "dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>, =?utf-8?q?Morten_Br?=\n\t=?utf-8?q?=C3=B8rup?= <mb@smartsharesystems.com>",
        "Subject": "[PATCH v5 1/2] ethdev: introduce generic dummy packet burst function",
        "Date": "Fri, 11 Feb 2022 19:11:42 +0000",
        "Message-Id": "<20220211191143.3432311-1-ferruh.yigit@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20220208194437.426143-1-ferruh.yigit@intel.com>",
        "References": "<20220208194437.426143-1-ferruh.yigit@intel.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "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": "Multiple PMDs have dummy/noop Rx/Tx packet burst functions.\n\nThese dummy functions are very simple, introduce a common function in\nthe ethdev and update drivers to use it instead of each driver having\nits own functions.\n\nSigned-off-by: Ferruh Yigit <ferruh.yigit@intel.com>\nAcked-by: Morten Brørup <mb@smartsharesystems.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>\nAcked-by: Thomas Monjalon <thomas@monjalon.net>\n---\nCc: Ciara Loftus <ciara.loftus@intel.com>\n\nv2:\n* Convert inline function to actual function in new ethdev_driver.c\n  file. This is because of functions pointer comparisons in PMDs.\n  PMD interface of ethdev can be moved to 'ethdev_driver.c' later.\n\nv3:\n* updated af_xdp too\n\nv4:\n* Commit log updated and checkpatch warning fixed\n\nv5:\n* Commit log updated, 'driver API' -> 'driver helper'\n---\n drivers/net/af_xdp/rte_eth_af_xdp.c | 26 ++-------------\n drivers/net/ark/ark_ethdev.c        |  8 ++---\n drivers/net/ark/ark_ethdev_rx.c     |  9 -----\n drivers/net/ark/ark_ethdev_rx.h     |  2 --\n drivers/net/ark/ark_ethdev_tx.c     |  9 -----\n drivers/net/ark/ark_ethdev_tx.h     |  3 --\n drivers/net/bnx2x/bnx2x_rxtx.c      | 12 ++-----\n drivers/net/bnxt/bnxt.h             |  4 ---\n drivers/net/bnxt/bnxt_cpr.c         |  4 +--\n drivers/net/bnxt/bnxt_rxr.c         | 14 --------\n drivers/net/bnxt/bnxt_txr.c         | 14 --------\n drivers/net/cnxk/cnxk_ethdev.c      | 14 ++------\n drivers/net/dpaa2/dpaa2_ethdev.c    |  2 +-\n drivers/net/dpaa2/dpaa2_ethdev.h    |  1 -\n drivers/net/dpaa2/dpaa2_rxtx.c      | 25 --------------\n drivers/net/enic/enic.h             |  3 --\n drivers/net/enic/enic_ethdev.c      |  2 +-\n drivers/net/enic/enic_main.c        |  2 +-\n drivers/net/enic/enic_rxtx.c        | 11 ------\n drivers/net/hns3/hns3_rxtx.c        | 18 +++-------\n drivers/net/hns3/hns3_rxtx.h        |  3 --\n drivers/net/mlx4/mlx4.c             |  8 ++---\n drivers/net/mlx4/mlx4_mp.c          |  4 +--\n drivers/net/mlx4/mlx4_rxtx.c        | 52 -----------------------------\n drivers/net/mlx4/mlx4_rxtx.h        |  4 ---\n drivers/net/mlx5/linux/mlx5_mp_os.c |  4 +--\n drivers/net/mlx5/linux/mlx5_os.c    |  4 +--\n drivers/net/mlx5/mlx5.c             |  4 +--\n drivers/net/mlx5/mlx5_rx.c          | 27 +--------------\n drivers/net/mlx5/mlx5_rx.h          |  2 --\n drivers/net/mlx5/mlx5_trigger.c     |  4 +--\n drivers/net/mlx5/mlx5_tx.c          | 25 --------------\n drivers/net/mlx5/mlx5_tx.h          |  2 --\n drivers/net/mlx5/windows/mlx5_os.c  |  4 +--\n drivers/net/pfe/pfe_ethdev.c        | 20 ++---------\n drivers/net/qede/qede_ethdev.c      |  4 +--\n drivers/net/qede/qede_rxtx.c        |  9 -----\n drivers/net/qede/qede_rxtx.h        |  3 --\n lib/ethdev/ethdev_driver.c          | 13 ++++++++\n lib/ethdev/ethdev_driver.h          | 17 ++++++++++\n lib/ethdev/meson.build              |  1 +\n lib/ethdev/version.map              |  1 +\n 42 files changed, 73 insertions(+), 325 deletions(-)\n create mode 100644 lib/ethdev/ethdev_driver.c",
    "diff": "diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c\nindex 4a37c11960e1..6ac710c6bdc6 100644\n--- a/drivers/net/af_xdp/rte_eth_af_xdp.c\n+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c\n@@ -1916,28 +1916,6 @@ afxdp_mp_send_fds(const struct rte_mp_msg *request, const void *peer)\n \treturn 0;\n }\n \n-/* Secondary process rx function. RX is disabled because memory mapping of the\n- * rings being assigned by the kernel in the primary process only.\n- */\n-static uint16_t\n-eth_af_xdp_rx_noop(void *queue __rte_unused,\n-\t\tstruct rte_mbuf **bufs __rte_unused,\n-\t\tuint16_t nb_pkts __rte_unused)\n-{\n-\treturn 0;\n-}\n-\n-/* Secondary process tx function. TX is disabled because memory mapping of the\n- * rings being assigned by the kernel in the primary process only.\n- */\n-static uint16_t\n-eth_af_xdp_tx_noop(void *queue __rte_unused,\n-\t\t\tstruct rte_mbuf **bufs __rte_unused,\n-\t\t\tuint16_t nb_pkts __rte_unused)\n-{\n-\treturn 0;\n-}\n-\n static int\n rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)\n {\n@@ -1961,8 +1939,8 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)\n \t\t}\n \t\teth_dev->dev_ops = &ops;\n \t\teth_dev->device = &dev->device;\n-\t\teth_dev->rx_pkt_burst = eth_af_xdp_rx_noop;\n-\t\teth_dev->tx_pkt_burst = eth_af_xdp_tx_noop;\n+\t\teth_dev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\t\teth_dev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n \t\teth_dev->process_private = (struct pmd_process_private *)\n \t\t\trte_zmalloc_socket(name,\n \t\t\t\t\t   sizeof(struct pmd_process_private),\ndiff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c\nindex b618cba3f023..230a1272e986 100644\n--- a/drivers/net/ark/ark_ethdev.c\n+++ b/drivers/net/ark/ark_ethdev.c\n@@ -271,8 +271,8 @@ eth_ark_dev_init(struct rte_eth_dev *dev)\n \tdev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;\n \n \t/* Use dummy function until setup */\n-\tdev->rx_pkt_burst = &eth_ark_recv_pkts_noop;\n-\tdev->tx_pkt_burst = &eth_ark_xmit_pkts_noop;\n+\tdev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\tdev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n \n \tark->bar0 = (uint8_t *)pci_dev->mem_resource[0].addr;\n \tark->a_bar = (uint8_t *)pci_dev->mem_resource[2].addr;\n@@ -605,8 +605,8 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)\n \tif (ark->start_pg)\n \t\tark_pktgen_pause(ark->pg);\n \n-\tdev->rx_pkt_burst = &eth_ark_recv_pkts_noop;\n-\tdev->tx_pkt_burst = &eth_ark_xmit_pkts_noop;\n+\tdev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\tdev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n \n \t/* STOP TX Side */\n \tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\ndiff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c\nindex 98658ce621e2..37a88cbedee4 100644\n--- a/drivers/net/ark/ark_ethdev_rx.c\n+++ b/drivers/net/ark/ark_ethdev_rx.c\n@@ -228,15 +228,6 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,\n \treturn 0;\n }\n \n-/* ************************************************************************* */\n-uint16_t\n-eth_ark_recv_pkts_noop(void *rx_queue __rte_unused,\n-\t\t       struct rte_mbuf **rx_pkts __rte_unused,\n-\t\t       uint16_t nb_pkts __rte_unused)\n-{\n-\treturn 0;\n-}\n-\n /* ************************************************************************* */\n uint16_t\n eth_ark_recv_pkts(void *rx_queue,\ndiff --git a/drivers/net/ark/ark_ethdev_rx.h b/drivers/net/ark/ark_ethdev_rx.h\nindex 859fcf1e6f71..f64b3dd137b3 100644\n--- a/drivers/net/ark/ark_ethdev_rx.h\n+++ b/drivers/net/ark/ark_ethdev_rx.h\n@@ -20,8 +20,6 @@ int eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,\n uint32_t eth_ark_dev_rx_queue_count(void *rx_queue);\n int eth_ark_rx_stop_queue(struct rte_eth_dev *dev, uint16_t queue_id);\n int eth_ark_rx_start_queue(struct rte_eth_dev *dev, uint16_t queue_id);\n-uint16_t eth_ark_recv_pkts_noop(void *rx_queue, struct rte_mbuf **rx_pkts,\n-\t\t\t\tuint16_t nb_pkts);\n uint16_t eth_ark_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t\t\t   uint16_t nb_pkts);\n void eth_ark_dev_rx_queue_release(void *rx_queue);\ndiff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c\nindex 676e4115d3bf..abdce6a8cc0d 100644\n--- a/drivers/net/ark/ark_ethdev_tx.c\n+++ b/drivers/net/ark/ark_ethdev_tx.c\n@@ -105,15 +105,6 @@ eth_ark_tx_desc_fill(struct ark_tx_queue *queue,\n }\n \n \n-/* ************************************************************************* */\n-uint16_t\n-eth_ark_xmit_pkts_noop(void *vtxq __rte_unused,\n-\t\t       struct rte_mbuf **tx_pkts __rte_unused,\n-\t\t       uint16_t nb_pkts __rte_unused)\n-{\n-\treturn 0;\n-}\n-\n /* ************************************************************************* */\n uint16_t\n eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)\ndiff --git a/drivers/net/ark/ark_ethdev_tx.h b/drivers/net/ark/ark_ethdev_tx.h\nindex 12c71a7158a9..7134dbfeed81 100644\n--- a/drivers/net/ark/ark_ethdev_tx.h\n+++ b/drivers/net/ark/ark_ethdev_tx.h\n@@ -10,9 +10,6 @@\n #include <ethdev_driver.h>\n \n \n-uint16_t eth_ark_xmit_pkts_noop(void *vtxq,\n-\t\t\t\tstruct rte_mbuf **tx_pkts,\n-\t\t\t\tuint16_t nb_pkts);\n uint16_t eth_ark_xmit_pkts(void *vtxq,\n \t\t\t   struct rte_mbuf **tx_pkts,\n \t\t\t   uint16_t nb_pkts);\ndiff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c\nindex 66b0512c8695..cb5733c5972b 100644\n--- a/drivers/net/bnx2x/bnx2x_rxtx.c\n+++ b/drivers/net/bnx2x/bnx2x_rxtx.c\n@@ -465,18 +465,10 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n \treturn nb_rx;\n }\n \n-static uint16_t\n-bnx2x_rxtx_pkts_dummy(__rte_unused void *p_rxq,\n-\t\t      __rte_unused struct rte_mbuf **rx_pkts,\n-\t\t      __rte_unused uint16_t nb_pkts)\n-{\n-\treturn 0;\n-}\n-\n void bnx2x_dev_rxtx_init_dummy(struct rte_eth_dev *dev)\n {\n-\tdev->rx_pkt_burst = bnx2x_rxtx_pkts_dummy;\n-\tdev->tx_pkt_burst = bnx2x_rxtx_pkts_dummy;\n+\tdev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\tdev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n }\n \n void bnx2x_dev_rxtx_init(struct rte_eth_dev *dev)\ndiff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h\nindex 0cbb58b2cf3e..44724a9dfe91 100644\n--- a/drivers/net/bnxt/bnxt.h\n+++ b/drivers/net/bnxt/bnxt.h\n@@ -1014,10 +1014,6 @@ void bnxt_print_link_info(struct rte_eth_dev *eth_dev);\n uint16_t bnxt_rss_hash_tbl_size(const struct bnxt *bp);\n int bnxt_link_update_op(struct rte_eth_dev *eth_dev,\n \t\t\tint wait_to_complete);\n-uint16_t bnxt_dummy_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n-\t\t\t      uint16_t nb_pkts);\n-uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n-\t\t\t      uint16_t nb_pkts);\n \n extern const struct rte_flow_ops bnxt_flow_ops;\n \ndiff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c\nindex 9b9285b79903..99af0f9e87ee 100644\n--- a/drivers/net/bnxt/bnxt_cpr.c\n+++ b/drivers/net/bnxt/bnxt_cpr.c\n@@ -408,8 +408,8 @@ bool bnxt_is_recovery_enabled(struct bnxt *bp)\n \n void bnxt_stop_rxtx(struct rte_eth_dev *eth_dev)\n {\n-\teth_dev->rx_pkt_burst = &bnxt_dummy_recv_pkts;\n-\teth_dev->tx_pkt_burst = &bnxt_dummy_xmit_pkts;\n+\teth_dev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\teth_dev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n \n \trte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst =\n \t\teth_dev->rx_pkt_burst;\ndiff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c\nindex b60c2470f39e..5a9cf48e6739 100644\n--- a/drivers/net/bnxt/bnxt_rxr.c\n+++ b/drivers/net/bnxt/bnxt_rxr.c\n@@ -1147,20 +1147,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \treturn nb_rx_pkts;\n }\n \n-/*\n- * Dummy DPDK callback for RX.\n- *\n- * This function is used to temporarily replace the real callback during\n- * unsafe control operations on the queue, or in case of error.\n- */\n-uint16_t\n-bnxt_dummy_recv_pkts(void *rx_queue __rte_unused,\n-\t\t     struct rte_mbuf **rx_pkts __rte_unused,\n-\t\t     uint16_t nb_pkts __rte_unused)\n-{\n-\treturn 0;\n-}\n-\n void bnxt_free_rx_rings(struct bnxt *bp)\n {\n \tint i;\ndiff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c\nindex 3b8f2382f92e..7a7196a23731 100644\n--- a/drivers/net/bnxt/bnxt_txr.c\n+++ b/drivers/net/bnxt/bnxt_txr.c\n@@ -527,20 +527,6 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \treturn nb_tx_pkts;\n }\n \n-/*\n- * Dummy DPDK callback for TX.\n- *\n- * This function is used to temporarily replace the real callback during\n- * unsafe control operations on the queue, or in case of error.\n- */\n-uint16_t\n-bnxt_dummy_xmit_pkts(void *tx_queue __rte_unused,\n-\t\t     struct rte_mbuf **tx_pkts __rte_unused,\n-\t\t     uint16_t nb_pkts __rte_unused)\n-{\n-\treturn 0;\n-}\n-\n int bnxt_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)\n {\n \tstruct bnxt *bp = dev->data->dev_private;\ndiff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c\nindex 53dfb5eae80e..c6a9ada05bb4 100644\n--- a/drivers/net/cnxk/cnxk_ethdev.c\n+++ b/drivers/net/cnxk/cnxk_ethdev.c\n@@ -942,16 +942,6 @@ nix_restore_queue_cfg(struct rte_eth_dev *eth_dev)\n \treturn rc;\n }\n \n-static uint16_t\n-nix_eth_nop_burst(void *queue, struct rte_mbuf **mbufs, uint16_t pkts)\n-{\n-\tRTE_SET_USED(queue);\n-\tRTE_SET_USED(mbufs);\n-\tRTE_SET_USED(pkts);\n-\n-\treturn 0;\n-}\n-\n static void\n nix_set_nop_rxtx_function(struct rte_eth_dev *eth_dev)\n {\n@@ -962,8 +952,8 @@ nix_set_nop_rxtx_function(struct rte_eth_dev *eth_dev)\n \t * which caused app crash since rx/tx burst is still\n \t * on different lcores\n \t */\n-\teth_dev->tx_pkt_burst = nix_eth_nop_burst;\n-\teth_dev->rx_pkt_burst = nix_eth_nop_burst;\n+\teth_dev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\teth_dev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n \trte_mb();\n }\n \ndiff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c\nindex 379daec5f4e8..5be4fef8fe68 100644\n--- a/drivers/net/dpaa2/dpaa2_ethdev.c\n+++ b/drivers/net/dpaa2/dpaa2_ethdev.c\n@@ -2005,7 +2005,7 @@ dpaa2_dev_set_link_down(struct rte_eth_dev *dev)\n \t}\n \n \t/*changing  tx burst function to avoid any more enqueues */\n-\tdev->tx_pkt_burst = dummy_dev_tx;\n+\tdev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n \n \t/* Loop while dpni_disable() attempts to drain the egress FQs\n \t * and confirm them back to us.\ndiff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h\nindex 1b49f43103a7..e79a7fc2e286 100644\n--- a/drivers/net/dpaa2/dpaa2_ethdev.h\n+++ b/drivers/net/dpaa2/dpaa2_ethdev.h\n@@ -264,7 +264,6 @@ __rte_internal\n uint16_t dpaa2_dev_tx_multi_txq_ordered(void **queue,\n \t\tstruct rte_mbuf **bufs, uint16_t nb_pkts);\n \n-uint16_t dummy_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts);\n void dpaa2_dev_free_eqresp_buf(uint16_t eqresp_ci);\n void dpaa2_flow_clean(struct rte_eth_dev *dev);\n uint16_t dpaa2_dev_tx_conf(void *queue)  __rte_unused;\ndiff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c\nindex 81b28e20cb47..b8844fbdf107 100644\n--- a/drivers/net/dpaa2/dpaa2_rxtx.c\n+++ b/drivers/net/dpaa2/dpaa2_rxtx.c\n@@ -1802,31 +1802,6 @@ dpaa2_dev_tx_ordered(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \treturn num_tx;\n }\n \n-/**\n- * Dummy DPDK callback for TX.\n- *\n- * This function is used to temporarily replace the real callback during\n- * unsafe control operations on the queue, or in case of error.\n- *\n- * @param dpdk_txq\n- *   Generic pointer to TX queue structure.\n- * @param[in] pkts\n- *   Packets to transmit.\n- * @param pkts_n\n- *   Number of packets in array.\n- *\n- * @return\n- *   Number of packets successfully transmitted (<= pkts_n).\n- */\n-uint16_t\n-dummy_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n-{\n-\t(void)queue;\n-\t(void)bufs;\n-\t(void)nb_pkts;\n-\treturn 0;\n-}\n-\n #if defined(RTE_TOOLCHAIN_GCC)\n #pragma GCC diagnostic push\n #pragma GCC diagnostic ignored \"-Wcast-qual\"\ndiff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h\nindex d5493c98345d..163a1f037e26 100644\n--- a/drivers/net/enic/enic.h\n+++ b/drivers/net/enic/enic.h\n@@ -426,9 +426,6 @@ uint16_t enic_recv_pkts_64(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t\t\t   uint16_t nb_pkts);\n uint16_t enic_noscatter_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t\t\t\t  uint16_t nb_pkts);\n-uint16_t enic_dummy_recv_pkts(void *rx_queue,\n-\t\t\t      struct rte_mbuf **rx_pkts,\n-\t\t\t      uint16_t nb_pkts);\n uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\t\tuint16_t nb_pkts);\n uint16_t enic_simple_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\ndiff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c\nindex 163be09809b1..a8d470e8ac93 100644\n--- a/drivers/net/enic/enic_ethdev.c\n+++ b/drivers/net/enic/enic_ethdev.c\n@@ -538,7 +538,7 @@ static const uint32_t *enicpmd_dev_supported_ptypes_get(struct rte_eth_dev *dev)\n \t\tRTE_PTYPE_UNKNOWN\n \t};\n \n-\tif (dev->rx_pkt_burst != enic_dummy_recv_pkts &&\n+\tif (dev->rx_pkt_burst != rte_eth_pkt_burst_dummy &&\n \t    dev->rx_pkt_burst != NULL) {\n \t\tstruct enic *enic = pmd_priv(dev);\n \t\tif (enic->overlay_offload)\ndiff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c\nindex 97d97ea793f2..9f351de72eb4 100644\n--- a/drivers/net/enic/enic_main.c\n+++ b/drivers/net/enic/enic_main.c\n@@ -1664,7 +1664,7 @@ int enic_set_mtu(struct enic *enic, uint16_t new_mtu)\n \t}\n \n \t/* replace Rx function with a no-op to avoid getting stale pkts */\n-\teth_dev->rx_pkt_burst = enic_dummy_recv_pkts;\n+\teth_dev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n \trte_eth_fp_ops[enic->port_id].rx_pkt_burst = eth_dev->rx_pkt_burst;\n \trte_mb();\n \ndiff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c\nindex 74a90694c718..7a66d72275d9 100644\n--- a/drivers/net/enic/enic_rxtx.c\n+++ b/drivers/net/enic/enic_rxtx.c\n@@ -31,17 +31,6 @@\n #define rte_packet_prefetch(p) do {} while (0)\n #endif\n \n-/* dummy receive function to replace actual function in\n- * order to do safe reconfiguration operations.\n- */\n-uint16_t\n-enic_dummy_recv_pkts(__rte_unused void *rx_queue,\n-\t\t     __rte_unused struct rte_mbuf **rx_pkts,\n-\t\t     __rte_unused uint16_t nb_pkts)\n-{\n-\treturn 0;\n-}\n-\n static inline uint16_t\n enic_recv_pkts_common(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t\t      uint16_t nb_pkts, const bool use_64b_desc)\ndiff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c\nindex 3b72c2375a60..8dc6cfac704d 100644\n--- a/drivers/net/hns3/hns3_rxtx.c\n+++ b/drivers/net/hns3/hns3_rxtx.c\n@@ -4383,14 +4383,6 @@ hns3_get_tx_function(struct rte_eth_dev *dev, eth_tx_prep_t *prep)\n \treturn hns3_xmit_pkts;\n }\n \n-uint16_t\n-hns3_dummy_rxtx_burst(void *dpdk_txq __rte_unused,\n-\t\t      struct rte_mbuf **pkts __rte_unused,\n-\t\t      uint16_t pkts_n __rte_unused)\n-{\n-\treturn 0;\n-}\n-\n static void\n hns3_trace_rxtx_function(struct rte_eth_dev *dev)\n {\n@@ -4432,14 +4424,14 @@ hns3_set_rxtx_function(struct rte_eth_dev *eth_dev)\n \t\teth_dev->rx_pkt_burst = hns3_get_rx_function(eth_dev);\n \t\teth_dev->rx_descriptor_status = hns3_dev_rx_descriptor_status;\n \t\teth_dev->tx_pkt_burst = hw->set_link_down ?\n-\t\t\t\t\thns3_dummy_rxtx_burst :\n+\t\t\t\t\trte_eth_pkt_burst_dummy :\n \t\t\t\t\thns3_get_tx_function(eth_dev, &prep);\n \t\teth_dev->tx_pkt_prepare = prep;\n \t\teth_dev->tx_descriptor_status = hns3_dev_tx_descriptor_status;\n \t\thns3_trace_rxtx_function(eth_dev);\n \t} else {\n-\t\teth_dev->rx_pkt_burst = hns3_dummy_rxtx_burst;\n-\t\teth_dev->tx_pkt_burst = hns3_dummy_rxtx_burst;\n+\t\teth_dev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\t\teth_dev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n \t\teth_dev->tx_pkt_prepare = NULL;\n \t}\n \n@@ -4632,7 +4624,7 @@ hns3_tx_done_cleanup(void *txq, uint32_t free_cnt)\n \n \tif (dev->tx_pkt_burst == hns3_xmit_pkts)\n \t\treturn hns3_tx_done_cleanup_full(q, free_cnt);\n-\telse if (dev->tx_pkt_burst == hns3_dummy_rxtx_burst)\n+\telse if (dev->tx_pkt_burst == rte_eth_pkt_burst_dummy)\n \t\treturn 0;\n \telse\n \t\treturn -ENOTSUP;\n@@ -4742,7 +4734,7 @@ hns3_enable_rxd_adv_layout(struct hns3_hw *hw)\n void\n hns3_stop_tx_datapath(struct rte_eth_dev *dev)\n {\n-\tdev->tx_pkt_burst = hns3_dummy_rxtx_burst;\n+\tdev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n \tdev->tx_pkt_prepare = NULL;\n \thns3_eth_dev_fp_ops_config(dev);\n \ndiff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h\nindex 094b65b7de70..a000318357ab 100644\n--- a/drivers/net/hns3/hns3_rxtx.h\n+++ b/drivers/net/hns3/hns3_rxtx.h\n@@ -729,9 +729,6 @@ void hns3_init_rx_ptype_tble(struct rte_eth_dev *dev);\n void hns3_set_rxtx_function(struct rte_eth_dev *eth_dev);\n eth_tx_burst_t hns3_get_tx_function(struct rte_eth_dev *dev,\n \t\t\t\t    eth_tx_prep_t *prep);\n-uint16_t hns3_dummy_rxtx_burst(void *dpdk_txq __rte_unused,\n-\t\t\t       struct rte_mbuf **pkts __rte_unused,\n-\t\t\t       uint16_t pkts_n __rte_unused);\n \n uint32_t hns3_get_tqp_intr_reg_offset(uint16_t tqp_intr_id);\n void hns3_set_queue_intr_gl(struct hns3_hw *hw, uint16_t queue_id,\ndiff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c\nindex 3f3c4a7c7214..910b76a92c42 100644\n--- a/drivers/net/mlx4/mlx4.c\n+++ b/drivers/net/mlx4/mlx4.c\n@@ -350,8 +350,8 @@ mlx4_dev_stop(struct rte_eth_dev *dev)\n \t\treturn 0;\n \tDEBUG(\"%p: detaching flows from all RX queues\", (void *)dev);\n \tpriv->started = 0;\n-\tdev->tx_pkt_burst = mlx4_tx_burst_removed;\n-\tdev->rx_pkt_burst = mlx4_rx_burst_removed;\n+\tdev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\tdev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n \trte_wmb();\n \t/* Disable datapath on secondary process. */\n \tmlx4_mp_req_stop_rxtx(dev);\n@@ -383,8 +383,8 @@ mlx4_dev_close(struct rte_eth_dev *dev)\n \tDEBUG(\"%p: closing device \\\"%s\\\"\",\n \t      (void *)dev,\n \t      ((priv->ctx != NULL) ? priv->ctx->device->name : \"\"));\n-\tdev->rx_pkt_burst = mlx4_rx_burst_removed;\n-\tdev->tx_pkt_burst = mlx4_tx_burst_removed;\n+\tdev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\tdev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n \trte_wmb();\n \t/* Disable datapath on secondary process. */\n \tmlx4_mp_req_stop_rxtx(dev);\ndiff --git a/drivers/net/mlx4/mlx4_mp.c b/drivers/net/mlx4/mlx4_mp.c\nindex 8fcfb5490ee9..1da64910aadd 100644\n--- a/drivers/net/mlx4/mlx4_mp.c\n+++ b/drivers/net/mlx4/mlx4_mp.c\n@@ -150,8 +150,8 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)\n \t\tbreak;\n \tcase MLX4_MP_REQ_STOP_RXTX:\n \t\tINFO(\"port %u stopping datapath\", dev->data->port_id);\n-\t\tdev->tx_pkt_burst = mlx4_tx_burst_removed;\n-\t\tdev->rx_pkt_burst = mlx4_rx_burst_removed;\n+\t\tdev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\t\tdev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n \t\trte_mb();\n \t\tmp_init_msg(dev, &mp_res, param->type);\n \t\tres->result = 0;\ndiff --git a/drivers/net/mlx4/mlx4_rxtx.c b/drivers/net/mlx4/mlx4_rxtx.c\nindex ed9e41fcdea9..059e432a63fc 100644\n--- a/drivers/net/mlx4/mlx4_rxtx.c\n+++ b/drivers/net/mlx4/mlx4_rxtx.c\n@@ -1338,55 +1338,3 @@ mlx4_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)\n \trxq->stats.ipackets += i;\n \treturn i;\n }\n-\n-/**\n- * Dummy DPDK callback for Tx.\n- *\n- * This function is used to temporarily replace the real callback during\n- * unsafe control operations on the queue, or in case of error.\n- *\n- * @param dpdk_txq\n- *   Generic pointer to Tx queue structure.\n- * @param[in] pkts\n- *   Packets to transmit.\n- * @param pkts_n\n- *   Number of packets in array.\n- *\n- * @return\n- *   Number of packets successfully transmitted (<= pkts_n).\n- */\n-uint16_t\n-mlx4_tx_burst_removed(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)\n-{\n-\t(void)dpdk_txq;\n-\t(void)pkts;\n-\t(void)pkts_n;\n-\trte_mb();\n-\treturn 0;\n-}\n-\n-/**\n- * Dummy DPDK callback for Rx.\n- *\n- * This function is used to temporarily replace the real callback during\n- * unsafe control operations on the queue, or in case of error.\n- *\n- * @param dpdk_rxq\n- *   Generic pointer to Rx queue structure.\n- * @param[out] pkts\n- *   Array to store received packets.\n- * @param pkts_n\n- *   Maximum number of packets in array.\n- *\n- * @return\n- *   Number of packets successfully received (<= pkts_n).\n- */\n-uint16_t\n-mlx4_rx_burst_removed(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)\n-{\n-\t(void)dpdk_rxq;\n-\t(void)pkts;\n-\t(void)pkts_n;\n-\trte_mb();\n-\treturn 0;\n-}\ndiff --git a/drivers/net/mlx4/mlx4_rxtx.h b/drivers/net/mlx4/mlx4_rxtx.h\nindex 83e9534cd0a7..70f3cd868058 100644\n--- a/drivers/net/mlx4/mlx4_rxtx.h\n+++ b/drivers/net/mlx4/mlx4_rxtx.h\n@@ -149,10 +149,6 @@ uint16_t mlx4_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts,\n \t\t       uint16_t pkts_n);\n uint16_t mlx4_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts,\n \t\t       uint16_t pkts_n);\n-uint16_t mlx4_tx_burst_removed(void *dpdk_txq, struct rte_mbuf **pkts,\n-\t\t\t       uint16_t pkts_n);\n-uint16_t mlx4_rx_burst_removed(void *dpdk_rxq, struct rte_mbuf **pkts,\n-\t\t\t       uint16_t pkts_n);\n \n /* mlx4_txq.c */\n \ndiff --git a/drivers/net/mlx5/linux/mlx5_mp_os.c b/drivers/net/mlx5/linux/mlx5_mp_os.c\nindex c448a3e9eb87..e607089e0e20 100644\n--- a/drivers/net/mlx5/linux/mlx5_mp_os.c\n+++ b/drivers/net/mlx5/linux/mlx5_mp_os.c\n@@ -192,8 +192,8 @@ struct rte_mp_msg mp_res;\n \t\tbreak;\n \tcase MLX5_MP_REQ_STOP_RXTX:\n \t\tDRV_LOG(INFO, \"port %u stopping datapath\", dev->data->port_id);\n-\t\tdev->rx_pkt_burst = removed_rx_burst;\n-\t\tdev->tx_pkt_burst = removed_tx_burst;\n+\t\tdev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\t\tdev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n \t\trte_mb();\n \t\tmp_init_msg(&priv->mp_id, &mp_res, param->type);\n \t\tres->result = 0;\ndiff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c\nindex aecdc5a68abb..bbe05bb837e0 100644\n--- a/drivers/net/mlx5/linux/mlx5_os.c\n+++ b/drivers/net/mlx5/linux/mlx5_os.c\n@@ -1623,8 +1623,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,\n \tDRV_LOG(DEBUG, \"port %u MTU is %u\", eth_dev->data->port_id,\n \t\tpriv->mtu);\n \t/* Initialize burst functions to prevent crashes before link-up. */\n-\teth_dev->rx_pkt_burst = removed_rx_burst;\n-\teth_dev->tx_pkt_burst = removed_tx_burst;\n+\teth_dev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\teth_dev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n \teth_dev->dev_ops = &mlx5_dev_ops;\n \teth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;\n \teth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;\ndiff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex 67eda41a60a5..5571e9067787 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -1559,8 +1559,8 @@ mlx5_dev_close(struct rte_eth_dev *dev)\n \tmlx5_action_handle_flush(dev);\n \tmlx5_flow_meter_flush(dev, NULL);\n \t/* Prevent crashes when queues are still in use. */\n-\tdev->rx_pkt_burst = removed_rx_burst;\n-\tdev->tx_pkt_burst = removed_tx_burst;\n+\tdev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\tdev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n \trte_wmb();\n \t/* Disable datapath on secondary process. */\n \tmlx5_mp_os_req_stop_rxtx(dev);\ndiff --git a/drivers/net/mlx5/mlx5_rx.c b/drivers/net/mlx5/mlx5_rx.c\nindex f388fcc31395..11ea935d72f0 100644\n--- a/drivers/net/mlx5/mlx5_rx.c\n+++ b/drivers/net/mlx5/mlx5_rx.c\n@@ -252,7 +252,7 @@ mlx5_rx_queue_count(void *rx_queue)\n \tdev = &rte_eth_devices[rxq->port_id];\n \n \tif (dev->rx_pkt_burst == NULL ||\n-\t    dev->rx_pkt_burst == removed_rx_burst) {\n+\t    dev->rx_pkt_burst == rte_eth_pkt_burst_dummy) {\n \t\trte_errno = ENOTSUP;\n \t\treturn -rte_errno;\n \t}\n@@ -1153,31 +1153,6 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)\n \treturn i;\n }\n \n-/**\n- * Dummy DPDK callback for RX.\n- *\n- * This function is used to temporarily replace the real callback during\n- * unsafe control operations on the queue, or in case of error.\n- *\n- * @param dpdk_rxq\n- *   Generic pointer to RX queue structure.\n- * @param[out] pkts\n- *   Array to store received packets.\n- * @param pkts_n\n- *   Maximum number of packets in array.\n- *\n- * @return\n- *   Number of packets successfully received (<= pkts_n).\n- */\n-uint16_t\n-removed_rx_burst(void *dpdk_rxq __rte_unused,\n-\t\t struct rte_mbuf **pkts __rte_unused,\n-\t\t uint16_t pkts_n __rte_unused)\n-{\n-\trte_mb();\n-\treturn 0;\n-}\n-\n /*\n  * Vectorized Rx routines are not compiled in when required vector instructions\n  * are not supported on a target architecture.\ndiff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h\nindex cb5d51340db7..7e417819f7e8 100644\n--- a/drivers/net/mlx5/mlx5_rx.h\n+++ b/drivers/net/mlx5/mlx5_rx.h\n@@ -275,8 +275,6 @@ __rte_noinline int mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec);\n void mlx5_mprq_buf_free(struct mlx5_mprq_buf *buf);\n uint16_t mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts,\n \t\t\t    uint16_t pkts_n);\n-uint16_t removed_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts,\n-\t\t\t  uint16_t pkts_n);\n int mlx5_rx_descriptor_status(void *rx_queue, uint16_t offset);\n uint32_t mlx5_rx_queue_count(void *rx_queue);\n void mlx5_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,\ndiff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c\nindex 74c9c0a4fff8..3a59237b1a7a 100644\n--- a/drivers/net/mlx5/mlx5_trigger.c\n+++ b/drivers/net/mlx5/mlx5_trigger.c\n@@ -1244,8 +1244,8 @@ mlx5_dev_stop(struct rte_eth_dev *dev)\n \n \tdev->data->dev_started = 0;\n \t/* Prevent crashes when queues are still in use. */\n-\tdev->rx_pkt_burst = removed_rx_burst;\n-\tdev->tx_pkt_burst = removed_tx_burst;\n+\tdev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\tdev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n \trte_wmb();\n \t/* Disable datapath on secondary process. */\n \tmlx5_mp_os_req_stop_rxtx(dev);\ndiff --git a/drivers/net/mlx5/mlx5_tx.c b/drivers/net/mlx5/mlx5_tx.c\nindex fd2cf2096753..8453b2701a9f 100644\n--- a/drivers/net/mlx5/mlx5_tx.c\n+++ b/drivers/net/mlx5/mlx5_tx.c\n@@ -135,31 +135,6 @@ mlx5_tx_error_cqe_handle(struct mlx5_txq_data *__rte_restrict txq,\n \treturn 0;\n }\n \n-/**\n- * Dummy DPDK callback for TX.\n- *\n- * This function is used to temporarily replace the real callback during\n- * unsafe control operations on the queue, or in case of error.\n- *\n- * @param dpdk_txq\n- *   Generic pointer to TX queue structure.\n- * @param[in] pkts\n- *   Packets to transmit.\n- * @param pkts_n\n- *   Number of packets in array.\n- *\n- * @return\n- *   Number of packets successfully transmitted (<= pkts_n).\n- */\n-uint16_t\n-removed_tx_burst(void *dpdk_txq __rte_unused,\n-\t\t struct rte_mbuf **pkts __rte_unused,\n-\t\t uint16_t pkts_n __rte_unused)\n-{\n-\trte_mb();\n-\treturn 0;\n-}\n-\n /**\n  * Update completion queue consuming index via doorbell\n  * and flush the completed data buffers.\ndiff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h\nindex 398cadfeaa46..c4b8271f6fb3 100644\n--- a/drivers/net/mlx5/mlx5_tx.h\n+++ b/drivers/net/mlx5/mlx5_tx.h\n@@ -221,8 +221,6 @@ void mlx5_txq_dynf_timestamp_set(struct rte_eth_dev *dev);\n \n /* mlx5_tx.c */\n \n-uint16_t removed_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts,\n-\t\t\t  uint16_t pkts_n);\n void mlx5_tx_handle_completion(struct mlx5_txq_data *__rte_restrict txq,\n \t\t\t       unsigned int olx __rte_unused);\n int mlx5_tx_descriptor_status(void *tx_queue, uint16_t offset);\ndiff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c\nindex ac0af0ff7d43..7f3532426f1f 100644\n--- a/drivers/net/mlx5/windows/mlx5_os.c\n+++ b/drivers/net/mlx5/windows/mlx5_os.c\n@@ -574,8 +574,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,\n \tDRV_LOG(DEBUG, \"port %u MTU is %u.\", eth_dev->data->port_id,\n \t\tpriv->mtu);\n \t/* Initialize burst functions to prevent crashes before link-up. */\n-\teth_dev->rx_pkt_burst = removed_rx_burst;\n-\teth_dev->tx_pkt_burst = removed_tx_burst;\n+\teth_dev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\teth_dev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n \teth_dev->dev_ops = &mlx5_dev_ops;\n \teth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;\n \teth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;\ndiff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c\nindex edf32aa70da6..c2991ab1ccaa 100644\n--- a/drivers/net/pfe/pfe_ethdev.c\n+++ b/drivers/net/pfe/pfe_ethdev.c\n@@ -235,22 +235,6 @@ pfe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)\n \treturn nb_pkts;\n }\n \n-static uint16_t\n-pfe_dummy_xmit_pkts(__rte_unused void *tx_queue,\n-\t\t__rte_unused struct rte_mbuf **tx_pkts,\n-\t\t__rte_unused uint16_t nb_pkts)\n-{\n-\treturn 0;\n-}\n-\n-static uint16_t\n-pfe_dummy_recv_pkts(__rte_unused void *rxq,\n-\t\t__rte_unused struct rte_mbuf **rx_pkts,\n-\t\t__rte_unused uint16_t nb_pkts)\n-{\n-\treturn 0;\n-}\n-\n static int\n pfe_eth_open(struct rte_eth_dev *dev)\n {\n@@ -383,8 +367,8 @@ pfe_eth_stop(struct rte_eth_dev *dev/*, int wake*/)\n \tgemac_disable(priv->EMAC_baseaddr);\n \tgpi_disable(priv->GPI_baseaddr);\n \n-\tdev->rx_pkt_burst = &pfe_dummy_recv_pkts;\n-\tdev->tx_pkt_burst = &pfe_dummy_xmit_pkts;\n+\tdev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\tdev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n \n \treturn 0;\n }\ndiff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c\nindex a1122a297e6b..ea6b71f09355 100644\n--- a/drivers/net/qede/qede_ethdev.c\n+++ b/drivers/net/qede/qede_ethdev.c\n@@ -322,8 +322,8 @@ qede_assign_rxtx_handlers(struct rte_eth_dev *dev, bool is_dummy)\n \tbool use_tx_offload = false;\n \n \tif (is_dummy) {\n-\t\tdev->rx_pkt_burst = qede_rxtx_pkts_dummy;\n-\t\tdev->tx_pkt_burst = qede_rxtx_pkts_dummy;\n+\t\tdev->rx_pkt_burst = rte_eth_pkt_burst_dummy;\n+\t\tdev->tx_pkt_burst = rte_eth_pkt_burst_dummy;\n \t\treturn;\n \t}\n \ndiff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c\nindex 7088c57b501d..85784f4a82a6 100644\n--- a/drivers/net/qede/qede_rxtx.c\n+++ b/drivers/net/qede/qede_rxtx.c\n@@ -2734,15 +2734,6 @@ qede_xmit_pkts_cmt(void *p_fp_cmt, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)\n \treturn eng0_pkts + eng1_pkts;\n }\n \n-uint16_t\n-qede_rxtx_pkts_dummy(__rte_unused void *p_rxq,\n-\t\t     __rte_unused struct rte_mbuf **pkts,\n-\t\t     __rte_unused uint16_t nb_pkts)\n-{\n-\treturn 0;\n-}\n-\n-\n /* this function does a fake walk through over completion queue\n  * to calculate number of BDs used by HW.\n  * At the end, it restores the state of completion queue.\ndiff --git a/drivers/net/qede/qede_rxtx.h b/drivers/net/qede/qede_rxtx.h\nindex 11ed1d9b9c50..013a4a07c716 100644\n--- a/drivers/net/qede/qede_rxtx.h\n+++ b/drivers/net/qede/qede_rxtx.h\n@@ -272,9 +272,6 @@ uint16_t qede_recv_pkts_cmt(void *p_rxq, struct rte_mbuf **rx_pkts,\n uint16_t\n qede_recv_pkts_regular(void *p_rxq, struct rte_mbuf **rx_pkts,\n \t\t       uint16_t nb_pkts);\n-uint16_t qede_rxtx_pkts_dummy(void *p_rxq,\n-\t\t\t      struct rte_mbuf **pkts,\n-\t\t\t      uint16_t nb_pkts);\n \n int qede_start_queues(struct rte_eth_dev *eth_dev);\n \ndiff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c\nnew file mode 100644\nindex 000000000000..fb7323f4d327\n--- /dev/null\n+++ b/lib/ethdev/ethdev_driver.c\n@@ -0,0 +1,13 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2022 Intel Corporation\n+ */\n+\n+#include \"ethdev_driver.h\"\n+\n+uint16_t\n+rte_eth_pkt_burst_dummy(void *queue __rte_unused,\n+\t\tstruct rte_mbuf **pkts __rte_unused,\n+\t\tuint16_t nb_pkts __rte_unused)\n+{\n+\treturn 0;\n+}\ndiff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h\nindex 617b450d5763..8de8e1c67113 100644\n--- a/lib/ethdev/ethdev_driver.h\n+++ b/lib/ethdev/ethdev_driver.h\n@@ -1509,6 +1509,23 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev,\n \t*dst = __atomic_load_n(src, __ATOMIC_SEQ_CST);\n }\n \n+/**\n+ * @internal\n+ * Dummy DPDK callback for Rx/Tx packet burst.\n+ *\n+ * @param queue\n+ *  Pointer to Rx/Tx queue\n+ * @param pkts\n+ *  Packet array\n+ * @param nb_pkts\n+ *  Number of packets in packet array\n+ */\n+__rte_internal\n+uint16_t\n+rte_eth_pkt_burst_dummy(void *queue __rte_unused,\n+\t\tstruct rte_mbuf **pkts __rte_unused,\n+\t\tuint16_t nb_pkts __rte_unused);\n+\n /**\n  * Allocate an unique switch domain identifier.\n  *\ndiff --git a/lib/ethdev/meson.build b/lib/ethdev/meson.build\nindex 0205c853df53..a094585bf715 100644\n--- a/lib/ethdev/meson.build\n+++ b/lib/ethdev/meson.build\n@@ -2,6 +2,7 @@\n # Copyright(c) 2017 Intel Corporation\n \n sources = files(\n+        'ethdev_driver.c',\n         'ethdev_private.c',\n         'ethdev_profile.c',\n         'ethdev_trace_points.c',\ndiff --git a/lib/ethdev/version.map b/lib/ethdev/version.map\nindex 1a43282ce45d..d5cc56a56023 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -289,6 +289,7 @@ INTERNAL {\n \trte_eth_hairpin_queue_peer_unbind;\n \trte_eth_hairpin_queue_peer_update;\n \trte_eth_ip_reassembly_dynfield_register;\n+\trte_eth_pkt_burst_dummy;\n \trte_eth_representor_id_get;\n \trte_eth_switch_domain_alloc;\n \trte_eth_switch_domain_free;\n",
    "prefixes": [
        "v5",
        "1/2"
    ]
}