get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 99434,
    "url": "https://patches.dpdk.org/api/patches/99434/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210922140953.19388-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": "<20210922140953.19388-6-konstantin.ananyev@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210922140953.19388-6-konstantin.ananyev@intel.com",
    "date": "2021-09-22T14:09:53",
    "name": "[RFC,v2,5/5] ethdev: hide eth dev related structures",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "03edc1bb130341c8b4ab208dab91e5b96258a242",
    "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/20210922140953.19388-6-konstantin.ananyev@intel.com/mbox/",
    "series": [
        {
            "id": 19084,
            "url": "https://patches.dpdk.org/api/series/19084/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=19084",
            "date": "2021-09-22T14:09:48",
            "name": "hide eth dev related structures",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/19084/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/99434/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/99434/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 9A55AA0C45;\n\tWed, 22 Sep 2021 16:13:33 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 87A41411A8;\n\tWed, 22 Sep 2021 16:13:33 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 1ACC041196\n for <dev@dpdk.org>; Wed, 22 Sep 2021 16:13:30 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Sep 2021 07:13:30 -0700",
            "from sivswdev08.ir.intel.com ([10.237.217.47])\n by fmsmga008.fm.intel.com with ESMTP; 22 Sep 2021 07:13:16 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10114\"; a=\"203095929\"",
            "E=Sophos;i=\"5.85,314,1624345200\"; d=\"scan'208\";a=\"203095929\"",
            "E=Sophos;i=\"5.85,314,1624345200\"; d=\"scan'208\";a=\"512991570\""
        ],
        "X-ExtLoop1": "1",
        "From": "Konstantin Ananyev <konstantin.ananyev@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "xiaoyun.li@intel.com, anoobj@marvell.com, jerinj@marvell.com,\n ndabilpuram@marvell.com, adwivedi@marvell.com,\n shepard.siegel@atomicrules.com, ed.czeck@atomicrules.com,\n john.miller@atomicrules.com, irusskikh@marvell.com,\n ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com,\n rahul.lakkireddy@chelsio.com, hemant.agrawal@nxp.com,\n sachin.saxena@oss.nxp.com, haiyue.wang@intel.com, johndale@cisco.com,\n hyonkim@cisco.com, qi.z.zhang@intel.com, xiao.w.wang@intel.com,\n humin29@huawei.com, yisen.zhuang@huawei.com, oulijun@huawei.com,\n beilei.xing@intel.com, jingjing.wu@intel.com, qiming.yang@intel.com,\n matan@nvidia.com, viacheslavo@nvidia.com, sthemmin@microsoft.com,\n longli@microsoft.com, heinrich.kuhn@corigine.com, kirankumark@marvell.com,\n andrew.rybchenko@oktetlabs.ru, mczekaj@marvell.com,\n jiawenwu@trustnetic.com, jianwang@trustnetic.com,\n maxime.coquelin@redhat.com, chenbo.xia@intel.com, thomas@monjalon.net,\n ferruh.yigit@intel.com, mdr@ashroe.eu, jay.jayatheerthan@intel.com,\n Konstantin Ananyev <konstantin.ananyev@intel.com>",
        "Date": "Wed, 22 Sep 2021 15:09:53 +0100",
        "Message-Id": "<20210922140953.19388-6-konstantin.ananyev@intel.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<20210922140953.19388-1-konstantin.ananyev@intel.com>",
        "References": "<20210820162834.12544-1-konstantin.ananyev@intel.com>\n <20210922140953.19388-1-konstantin.ananyev@intel.com>",
        "Subject": "[dpdk-dev] [RFC v2 5/5] ethdev: hide eth dev related structures",
        "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": "Move rte_eth_dev, rte_eth_dev_data, rte_eth_rxtx_callback and related\ndata into private header (ethdev_driver.h).\nMake changes to keep DPDK building after that.\nRemove references to 'rte_eth_devices[]' from test-pmd.\n\nSigned-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>\n---\n app/test-pmd/config.c                         |  23 ++-\n drivers/common/octeontx2/otx2_sec_idev.c      |   2 +-\n drivers/crypto/octeontx2/otx2_cryptodev_ops.c |   2 +-\n drivers/net/cxgbe/base/adapter.h              |   2 +-\n drivers/net/dpaa2/dpaa2_ptp.c                 |   2 +-\n drivers/net/netvsc/hn_var.h                   |   1 +\n lib/ethdev/ethdev_driver.h                    | 152 ++++++++++++++++++\n lib/ethdev/rte_ethdev.c                       |  25 +++\n lib/ethdev/rte_ethdev.h                       |  44 +++--\n lib/ethdev/rte_ethdev_core.h                  | 144 -----------------\n lib/ethdev/version.map                        |   1 +\n lib/eventdev/rte_event_eth_rx_adapter.c       |   2 +-\n lib/eventdev/rte_event_eth_tx_adapter.c       |   2 +-\n lib/eventdev/rte_eventdev.c                   |   2 +-\n 14 files changed, 216 insertions(+), 188 deletions(-)",
    "diff": "diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex f5765b34f7..11060bad12 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -5213,20 +5213,20 @@ show_macs(portid_t port_id)\n {\n \tchar buf[RTE_ETHER_ADDR_FMT_SIZE];\n \tstruct rte_eth_dev_info dev_info;\n-\tstruct rte_ether_addr *addr;\n-\tuint32_t i, num_macs = 0;\n-\tstruct rte_eth_dev *dev;\n-\n-\tdev = &rte_eth_devices[port_id];\n+\tint32_t i, rc, num_macs = 0;\n \n \tif (eth_dev_info_get_print_err(port_id, &dev_info))\n \t\treturn;\n \n-\tfor (i = 0; i < dev_info.max_mac_addrs; i++) {\n-\t\taddr = &dev->data->mac_addrs[i];\n+\tstruct rte_ether_addr addr[dev_info.max_mac_addrs];\n+\trc = rte_eth_macaddrs_get(port_id, addr, dev_info.max_mac_addrs);\n+\tif (rc < 0)\n+\t\treturn;\n+\n+\tfor (i = 0; i < rc; i++) {\n \n \t\t/* skip zero address */\n-\t\tif (rte_is_zero_ether_addr(addr))\n+\t\tif (rte_is_zero_ether_addr(&addr[i]))\n \t\t\tcontinue;\n \n \t\tnum_macs++;\n@@ -5234,14 +5234,13 @@ show_macs(portid_t port_id)\n \n \tprintf(\"Number of MAC address added: %d\\n\", num_macs);\n \n-\tfor (i = 0; i < dev_info.max_mac_addrs; i++) {\n-\t\taddr = &dev->data->mac_addrs[i];\n+\tfor (i = 0; i < rc; i++) {\n \n \t\t/* skip zero address */\n-\t\tif (rte_is_zero_ether_addr(addr))\n+\t\tif (rte_is_zero_ether_addr(&addr[i]))\n \t\t\tcontinue;\n \n-\t\trte_ether_format_addr(buf, RTE_ETHER_ADDR_FMT_SIZE, addr);\n+\t\trte_ether_format_addr(buf, RTE_ETHER_ADDR_FMT_SIZE, &addr[i]);\n \t\tprintf(\"  %s\\n\", buf);\n \t}\n }\ndiff --git a/drivers/common/octeontx2/otx2_sec_idev.c b/drivers/common/octeontx2/otx2_sec_idev.c\nindex 6e9643c383..b561b67174 100644\n--- a/drivers/common/octeontx2/otx2_sec_idev.c\n+++ b/drivers/common/octeontx2/otx2_sec_idev.c\n@@ -4,7 +4,7 @@\n \n #include <rte_atomic.h>\n #include <rte_bus_pci.h>\n-#include <rte_ethdev.h>\n+#include <ethdev_driver.h>\n #include <rte_spinlock.h>\n \n #include \"otx2_common.h\"\ndiff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c\nindex 09ddbb5f34..723804347f 100644\n--- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c\n+++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c\n@@ -6,7 +6,7 @@\n \n #include <cryptodev_pmd.h>\n #include <rte_errno.h>\n-#include <rte_ethdev.h>\n+#include <ethdev_driver.h>\n #include <rte_event_crypto_adapter.h>\n \n #include \"otx2_cryptodev.h\"\ndiff --git a/drivers/net/cxgbe/base/adapter.h b/drivers/net/cxgbe/base/adapter.h\nindex 01a2a9d147..1c7c8afe16 100644\n--- a/drivers/net/cxgbe/base/adapter.h\n+++ b/drivers/net/cxgbe/base/adapter.h\n@@ -12,7 +12,7 @@\n #include <rte_mbuf.h>\n #include <rte_io.h>\n #include <rte_rwlock.h>\n-#include <rte_ethdev.h>\n+#include <ethdev_driver.h>\n \n #include \"../cxgbe_compat.h\"\n #include \"../cxgbe_ofld.h\"\ndiff --git a/drivers/net/dpaa2/dpaa2_ptp.c b/drivers/net/dpaa2/dpaa2_ptp.c\nindex 899dd5d442..8d79e39244 100644\n--- a/drivers/net/dpaa2/dpaa2_ptp.c\n+++ b/drivers/net/dpaa2/dpaa2_ptp.c\n@@ -10,7 +10,7 @@\n #include <unistd.h>\n #include <stdarg.h>\n \n-#include <rte_ethdev.h>\n+#include <ethdev_driver.h>\n #include <rte_log.h>\n #include <rte_eth_ctrl.h>\n #include <rte_malloc.h>\ndiff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h\nindex 2a2bac9338..74e6e6010d 100644\n--- a/drivers/net/netvsc/hn_var.h\n+++ b/drivers/net/netvsc/hn_var.h\n@@ -7,6 +7,7 @@\n  */\n \n #include <rte_eal_paging.h>\n+#include <ethdev_driver.h>\n \n /*\n  * Tunable ethdev params\ndiff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h\nindex 40e474aa7e..f841368b58 100644\n--- a/lib/ethdev/ethdev_driver.h\n+++ b/lib/ethdev/ethdev_driver.h\n@@ -21,6 +21,158 @@\n extern \"C\" {\n #endif\n \n+/**\n+ * @internal\n+ * Structure used to hold information about the callbacks to be called for a\n+ * queue on RX and TX.\n+ */\n+struct rte_eth_rxtx_callback {\n+\tstruct rte_eth_rxtx_callback *next;\n+\tunion{\n+\t\trte_rx_callback_fn rx;\n+\t\trte_tx_callback_fn tx;\n+\t} fn;\n+\tvoid *param;\n+};\n+\n+/**\n+ * @internal\n+ * The generic data structure associated with each ethernet device.\n+ *\n+ * Pointers to burst-oriented packet receive and transmit functions are\n+ * located at the beginning of the structure, along with the pointer to\n+ * where all the data elements for the particular device are stored in shared\n+ * memory. This split allows the function pointer and driver data to be per-\n+ * process, while the actual configuration data for the device is shared.\n+ */\n+struct rte_eth_dev {\n+\teth_rx_burst_t rx_pkt_burst; /**< Pointer to PMD receive function. */\n+\teth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function. */\n+\teth_tx_prep_t tx_pkt_prepare;\n+\t/**< Pointer to PMD transmit prepare function. */\n+\teth_rx_queue_count_t rx_queue_count;\n+\t/**< Get the number of used RX descriptors. */\n+\teth_rx_descriptor_done_t rx_descriptor_done;\n+\t/**< Check rxd DD bit. */\n+\teth_rx_descriptor_status_t rx_descriptor_status;\n+\t/**< Check the status of a Rx descriptor. */\n+\teth_tx_descriptor_status_t tx_descriptor_status;\n+\t/**< 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\n+\t * private. The second one is managed by PMDs if necessary.\n+\t */\n+\tstruct rte_eth_dev_data *data;  /**< Pointer to device data. */\n+\tvoid *process_private; /**< Pointer to per-process device data. */\n+\tconst struct eth_dev_ops *dev_ops; /**< Functions exported by PMD */\n+\tstruct rte_device *device; /**< Backing device */\n+\tstruct rte_intr_handle *intr_handle; /**< Device interrupt handle */\n+\t/** User application callbacks for NIC interrupts */\n+\tstruct rte_eth_dev_cb_list link_intr_cbs;\n+\t/**\n+\t * User-supplied functions called from rx_burst to post-process\n+\t * received packets before passing them to the user\n+\t */\n+\tstruct rte_eth_rxtx_callback *post_rx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];\n+\t/**\n+\t * User-supplied functions called from tx_burst to pre-process\n+\t * received packets before passing them to the driver for transmission.\n+\t */\n+\tstruct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];\n+\tenum rte_eth_dev_state state; /**< Flag indicating the port state */\n+\tvoid *security_ctx; /**< Context for security ops */\n+\n+\tuint64_t reserved_64s[4]; /**< Reserved for future fields */\n+\tvoid *reserved_ptrs[4];   /**< Reserved for future fields */\n+} __rte_cache_aligned;\n+\n+struct rte_eth_dev_sriov;\n+struct rte_eth_dev_owner;\n+\n+/**\n+ * @internal\n+ * The data part, with no function pointers, associated with each ethernet\n+ * device. This structure is safe to place in shared memory to be common\n+ * among different processes in a multi-process configuration.\n+ */\n+struct rte_eth_dev_data {\n+\tchar name[RTE_ETH_NAME_MAX_LEN]; /**< Unique identifier name */\n+\n+\tvoid **rx_queues; /**< Array of pointers to RX queues. */\n+\tvoid **tx_queues; /**< Array of pointers to TX queues. */\n+\tuint16_t nb_rx_queues; /**< Number of RX queues. */\n+\tuint16_t nb_tx_queues; /**< Number of TX queues. */\n+\n+\tstruct rte_eth_dev_sriov sriov;    /**< SRIOV data */\n+\n+\tvoid *dev_private;\n+\t\t\t/**< PMD-specific private data.\n+\t\t\t *   @see rte_eth_dev_release_port()\n+\t\t\t */\n+\n+\tstruct rte_eth_link dev_link;   /**< Link-level information & status. */\n+\tstruct rte_eth_conf dev_conf;   /**< Configuration applied to device. */\n+\tuint16_t mtu;                   /**< Maximum Transmission Unit. */\n+\tuint32_t min_rx_buf_size;\n+\t\t\t/**< Common RX buffer size handled by all queues. */\n+\n+\tuint64_t rx_mbuf_alloc_failed; /**< RX ring mbuf allocation failures. */\n+\tstruct rte_ether_addr *mac_addrs;\n+\t\t\t/**< Device Ethernet link address.\n+\t\t\t *   @see rte_eth_dev_release_port()\n+\t\t\t */\n+\tuint64_t mac_pool_sel[ETH_NUM_RECEIVE_MAC_ADDR];\n+\t\t\t/**< Bitmap associating MAC addresses to pools. */\n+\tstruct rte_ether_addr *hash_mac_addrs;\n+\t\t\t/**< Device Ethernet MAC addresses of hash filtering.\n+\t\t\t *   @see rte_eth_dev_release_port()\n+\t\t\t */\n+\tuint16_t port_id;           /**< Device [external] port identifier. */\n+\n+\t__extension__\n+\tuint8_t promiscuous   : 1,\n+\t\t/**< RX promiscuous mode ON(1) / OFF(0). */\n+\t\tscattered_rx : 1,\n+\t\t/**< RX of scattered packets is ON(1) / OFF(0) */\n+\t\tall_multicast : 1,\n+\t\t/**< RX all multicast mode ON(1) / OFF(0). */\n+\t\tdev_started : 1,\n+\t\t/**< Device state: STARTED(1) / STOPPED(0). */\n+\t\tlro         : 1,\n+\t\t/**< RX LRO is ON(1) / OFF(0) */\n+\t\tdev_configured : 1;\n+\t\t/**< Indicates whether the device is configured.\n+\t\t *   CONFIGURED(1) / NOT CONFIGURED(0).\n+\t\t */\n+\tuint8_t rx_queue_state[RTE_MAX_QUEUES_PER_PORT];\n+\t\t/**< Queues state: HAIRPIN(2) / STARTED(1) / STOPPED(0). */\n+\tuint8_t tx_queue_state[RTE_MAX_QUEUES_PER_PORT];\n+\t\t/**< Queues state: HAIRPIN(2) / STARTED(1) / STOPPED(0). */\n+\tuint32_t dev_flags;             /**< Capabilities. */\n+\tint numa_node;                  /**< NUMA node connection. */\n+\tstruct rte_vlan_filter_conf vlan_filter_conf;\n+\t\t\t/**< VLAN filter configuration. */\n+\tstruct rte_eth_dev_owner owner; /**< The port owner. */\n+\tuint16_t representor_id;\n+\t\t\t/**< Switch-specific identifier.\n+\t\t\t *   Valid if RTE_ETH_DEV_REPRESENTOR in dev_flags.\n+\t\t\t */\n+\n+\tpthread_mutex_t flow_ops_mutex; /**< rte_flow ops mutex. */\n+\tuint64_t reserved_64s[4]; /**< Reserved for future fields */\n+\tvoid *reserved_ptrs[4];   /**< Reserved for future fields */\n+} __rte_cache_aligned;\n+\n+/**\n+ * @internal\n+ * The pool of *rte_eth_dev* structures. The size of the pool\n+ * is configured at compile-time in the <rte_ethdev.c> file.\n+ */\n+extern struct rte_eth_dev rte_eth_devices[];\n+\n+\n /**< @internal Declaration of the hairpin peer queue information structure. */\n struct rte_hairpin_peer_info;\n \ndiff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex 5904bb7bae..f3ed554aa7 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -3572,6 +3572,31 @@ rte_eth_dev_set_ptypes(uint16_t port_id, uint32_t ptype_mask,\n \treturn ret;\n }\n \n+int\n+rte_eth_macaddrs_get(uint16_t port_id, struct rte_ether_addr ma[], uint32_t num)\n+{\n+\tint32_t ret;\n+\tstruct rte_eth_dev *dev;\n+\tstruct rte_eth_dev_info dev_info;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tret = rte_eth_dev_info_get(port_id, &dev_info);\n+\tif (ret != 0)\n+\t\treturn ret;\n+\n+\tif (ma == NULL) {\n+\t\tRTE_ETHDEV_LOG(ERR, \"%s: invalid parameters\\n\", __func__);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tnum = RTE_MIN(dev_info.max_mac_addrs, num);\n+\tmemcpy(ma, dev->data->mac_addrs, num * sizeof(ma[0]));\n+\n+\treturn num;\n+}\n+\n int\n rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr)\n {\ndiff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex 58ee983b03..47e830e5bd 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -3005,6 +3005,25 @@ int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id,\n  */\n int rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr);\n \n+/**\n+ * Retrieve the Ethernet addresses of an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param ma\n+ *   A pointer to an array of structures of type *ether_addr* to be filled with\n+ *   the Ethernet addresses of the Ethernet device.\n+ * @param ma\n+ *   Number of elements in the *ma* array.\n+ * @return\n+ *   - (0) if successful\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+__rte_experimental\n+int rte_eth_macaddrs_get(uint16_t port_id, struct rte_ether_addr ma[],\n+\tuint32_t num);\n+\n /**\n  * Retrieve the contextual information of an Ethernet device.\n  *\n@@ -5078,31 +5097,6 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)\n \treturn (int)(*p->rx_queue_count)(qd);\n }\n \n-/**\n- * Check if the DD bit of the specific RX descriptor in the queue has been set\n- *\n- * @param port_id\n- *  The port identifier of the Ethernet device.\n- * @param queue_id\n- *  The queue id on the specific port.\n- * @param offset\n- *  The offset of the descriptor ID from tail.\n- * @return\n- *  - (1) if the specific DD bit is set.\n- *  - (0) if the specific DD bit is not set.\n- *  - (-ENODEV) if *port_id* invalid.\n- *  - (-ENOTSUP) if the device does not support this function\n- */\n-__rte_deprecated\n-static inline int\n-rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)\n-{\n-\tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n-\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n-\tRTE_FUNC_PTR_OR_ERR_RET(*dev->rx_descriptor_done, -ENOTSUP);\n-\treturn (*dev->rx_descriptor_done)(dev->data->rx_queues[queue_id], offset);\n-}\n-\n #define RTE_ETH_RX_DESC_AVAIL    0 /**< Desc available for hw. */\n #define RTE_ETH_RX_DESC_DONE     1 /**< Desc done, filled by hw. */\n #define RTE_ETH_RX_DESC_UNAVAIL  2 /**< Desc used by driver or hw. */\ndiff --git a/lib/ethdev/rte_ethdev_core.h b/lib/ethdev/rte_ethdev_core.h\nindex da6de5de43..20fe789550 100644\n--- a/lib/ethdev/rte_ethdev_core.h\n+++ b/lib/ethdev/rte_ethdev_core.h\n@@ -98,148 +98,4 @@ struct rte_eth_burst_api {\n \n extern struct rte_eth_burst_api rte_eth_burst_api[RTE_MAX_ETHPORTS];\n \n-\n-/**\n- * @internal\n- * Structure used to hold information about the callbacks to be called for a\n- * queue on RX and TX.\n- */\n-struct rte_eth_rxtx_callback {\n-\tstruct rte_eth_rxtx_callback *next;\n-\tunion{\n-\t\trte_rx_callback_fn rx;\n-\t\trte_tx_callback_fn tx;\n-\t} fn;\n-\tvoid *param;\n-};\n-\n-/**\n- * @internal\n- * The generic data structure associated with each ethernet device.\n- *\n- * Pointers to burst-oriented packet receive and transmit functions are\n- * located at the beginning of the structure, along with the pointer to\n- * where all the data elements for the particular device are stored in shared\n- * memory. This split allows the function pointer and driver data to be per-\n- * process, while the actual configuration data for the device is shared.\n- */\n-struct rte_eth_dev {\n-\teth_rx_burst_t rx_pkt_burst; /**< Pointer to PMD receive function. */\n-\teth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function. */\n-\teth_tx_prep_t tx_pkt_prepare; /**< Pointer to PMD transmit prepare function. */\n-\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\n-\t * private. The second one is managed by PMDs if necessary.\n-\t */\n-\tstruct rte_eth_dev_data *data;  /**< Pointer to device data. */\n-\tvoid *process_private; /**< Pointer to per-process device data. */\n-\tconst struct eth_dev_ops *dev_ops; /**< Functions exported by PMD */\n-\tstruct rte_device *device; /**< Backing device */\n-\tstruct rte_intr_handle *intr_handle; /**< Device interrupt handle */\n-\t/** User application callbacks for NIC interrupts */\n-\tstruct rte_eth_dev_cb_list link_intr_cbs;\n-\t/**\n-\t * User-supplied functions called from rx_burst to post-process\n-\t * received packets before passing them to the user\n-\t */\n-\tstruct rte_eth_rxtx_callback *post_rx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];\n-\t/**\n-\t * User-supplied functions called from tx_burst to pre-process\n-\t * received packets before passing them to the driver for transmission.\n-\t */\n-\tstruct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];\n-\tenum rte_eth_dev_state state; /**< Flag indicating the port state */\n-\tvoid *security_ctx; /**< Context for security ops */\n-\n-\tuint64_t reserved_64s[4]; /**< Reserved for future fields */\n-\tvoid *reserved_ptrs[4];   /**< Reserved for future fields */\n-} __rte_cache_aligned;\n-\n-struct rte_eth_dev_sriov;\n-struct rte_eth_dev_owner;\n-\n-/**\n- * @internal\n- * The data part, with no function pointers, associated with each ethernet device.\n- *\n- * This structure is safe to place in shared memory to be common among different\n- * processes in a multi-process configuration.\n- */\n-struct rte_eth_dev_data {\n-\tchar name[RTE_ETH_NAME_MAX_LEN]; /**< Unique identifier name */\n-\n-\tvoid **rx_queues; /**< Array of pointers to RX queues. */\n-\tvoid **tx_queues; /**< Array of pointers to TX queues. */\n-\tuint16_t nb_rx_queues; /**< Number of RX queues. */\n-\tuint16_t nb_tx_queues; /**< Number of TX queues. */\n-\n-\tstruct rte_eth_dev_sriov sriov;    /**< SRIOV data */\n-\n-\tvoid *dev_private;\n-\t\t\t/**< PMD-specific private data.\n-\t\t\t *   @see rte_eth_dev_release_port()\n-\t\t\t */\n-\n-\tstruct rte_eth_link dev_link;   /**< Link-level information & status. */\n-\tstruct rte_eth_conf dev_conf;   /**< Configuration applied to device. */\n-\tuint16_t mtu;                   /**< Maximum Transmission Unit. */\n-\tuint32_t min_rx_buf_size;\n-\t\t\t/**< Common RX buffer size handled by all queues. */\n-\n-\tuint64_t rx_mbuf_alloc_failed; /**< RX ring mbuf allocation failures. */\n-\tstruct rte_ether_addr *mac_addrs;\n-\t\t\t/**< Device Ethernet link address.\n-\t\t\t *   @see rte_eth_dev_release_port()\n-\t\t\t */\n-\tuint64_t mac_pool_sel[ETH_NUM_RECEIVE_MAC_ADDR];\n-\t\t\t/**< Bitmap associating MAC addresses to pools. */\n-\tstruct rte_ether_addr *hash_mac_addrs;\n-\t\t\t/**< Device Ethernet MAC addresses of hash filtering.\n-\t\t\t *   @see rte_eth_dev_release_port()\n-\t\t\t */\n-\tuint16_t port_id;           /**< Device [external] port identifier. */\n-\n-\t__extension__\n-\tuint8_t promiscuous   : 1, /**< RX promiscuous mode ON(1) / OFF(0). */\n-\t\tscattered_rx : 1,  /**< RX of scattered packets is ON(1) / OFF(0) */\n-\t\tall_multicast : 1, /**< RX all multicast mode ON(1) / OFF(0). */\n-\t\tdev_started : 1,   /**< Device state: STARTED(1) / STOPPED(0). */\n-\t\tlro         : 1,   /**< RX LRO is ON(1) / OFF(0) */\n-\t\tdev_configured : 1;\n-\t\t/**< Indicates whether the device is configured.\n-\t\t *   CONFIGURED(1) / NOT CONFIGURED(0).\n-\t\t */\n-\tuint8_t rx_queue_state[RTE_MAX_QUEUES_PER_PORT];\n-\t\t/**< Queues state: HAIRPIN(2) / STARTED(1) / STOPPED(0). */\n-\tuint8_t tx_queue_state[RTE_MAX_QUEUES_PER_PORT];\n-\t\t/**< Queues state: HAIRPIN(2) / STARTED(1) / STOPPED(0). */\n-\tuint32_t dev_flags;             /**< Capabilities. */\n-\tint numa_node;                  /**< NUMA node connection. */\n-\tstruct rte_vlan_filter_conf vlan_filter_conf;\n-\t\t\t/**< VLAN filter configuration. */\n-\tstruct rte_eth_dev_owner owner; /**< The port owner. */\n-\tuint16_t representor_id;\n-\t\t\t/**< Switch-specific identifier.\n-\t\t\t *   Valid if RTE_ETH_DEV_REPRESENTOR in dev_flags.\n-\t\t\t */\n-\n-\tpthread_mutex_t flow_ops_mutex; /**< rte_flow ops mutex. */\n-\tuint64_t reserved_64s[4]; /**< Reserved for future fields */\n-\tvoid *reserved_ptrs[4];   /**< Reserved for future fields */\n-} __rte_cache_aligned;\n-\n-/**\n- * @internal\n- * The pool of *rte_eth_dev* structures. The size of the pool\n- * is configured at compile-time in the <rte_ethdev.c> file.\n- */\n-extern struct rte_eth_dev rte_eth_devices[];\n-\n #endif /* _RTE_ETHDEV_CORE_H_ */\ndiff --git a/lib/ethdev/version.map b/lib/ethdev/version.map\nindex 65444f9a99..d82f2bd1ce 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -251,6 +251,7 @@ EXPERIMENTAL {\n \t# added in 21.05\n \t__rte_eth_rx_epilog;\n \t__rte_eth_tx_prolog;\n+\trte_eth_macaddrs_get;\n };\n \n INTERNAL {\ndiff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c\nindex 13dfb28401..89c4ca5d40 100644\n--- a/lib/eventdev/rte_event_eth_rx_adapter.c\n+++ b/lib/eventdev/rte_event_eth_rx_adapter.c\n@@ -11,7 +11,7 @@\n #include <rte_common.h>\n #include <rte_dev.h>\n #include <rte_errno.h>\n-#include <rte_ethdev.h>\n+#include <ethdev_driver.h>\n #include <rte_log.h>\n #include <rte_malloc.h>\n #include <rte_service_component.h>\ndiff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c\nindex 18c0359db7..1c06c8707c 100644\n--- a/lib/eventdev/rte_event_eth_tx_adapter.c\n+++ b/lib/eventdev/rte_event_eth_tx_adapter.c\n@@ -3,7 +3,7 @@\n  */\n #include <rte_spinlock.h>\n #include <rte_service_component.h>\n-#include <rte_ethdev.h>\n+#include <ethdev_driver.h>\n \n #include \"eventdev_pmd.h\"\n #include \"rte_eventdev_trace.h\"\ndiff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c\nindex e347d6dfd5..ebef5f0906 100644\n--- a/lib/eventdev/rte_eventdev.c\n+++ b/lib/eventdev/rte_eventdev.c\n@@ -29,7 +29,7 @@\n #include <rte_common.h>\n #include <rte_malloc.h>\n #include <rte_errno.h>\n-#include <rte_ethdev.h>\n+#include <ethdev_driver.h>\n #include <rte_cryptodev.h>\n #include <cryptodev_pmd.h>\n #include <rte_telemetry.h>\n",
    "prefixes": [
        "RFC",
        "v2",
        "5/5"
    ]
}