+/**
+ * @internal
+ * Structure used to hold information about the callbacks to be called for a
+ * queue on Rx and Tx.
+ */
+struct rte_eth_rxtx_callback {
+ struct rte_eth_rxtx_callback *next;
+ union{
+ rte_rx_callback_fn rx;
+ rte_tx_callback_fn tx;
+ } fn;
+ void *param;
+};
+
+/**
+ * @internal
+ * The generic data structure associated with each Ethernet device.
+ *
+ * Pointers to burst-oriented packet receive and transmit functions are
+ * located at the beginning of the structure, along with the pointer to
+ * where all the data elements for the particular device are stored in shared
+ * memory. This split allows the function pointer and driver data to be per-
+ * process, while the actual configuration data for the device is shared.
+ */
+struct rte_eth_dev {
+ eth_rx_burst_t rx_pkt_burst; /**< Pointer to PMD receive function */
+ eth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function */
+
+ /** Pointer to PMD transmit prepare function */
+ eth_tx_prep_t tx_pkt_prepare;
+ /** Get the number of used Rx descriptors */
+ eth_rx_queue_count_t rx_queue_count;
+ /** Check the status of a Rx descriptor */
+ eth_rx_descriptor_status_t rx_descriptor_status;
+ /** Check the status of a Tx descriptor */
+ eth_tx_descriptor_status_t tx_descriptor_status;
+
+ /**
+ * Device data that is shared between primary and secondary processes
+ */
+ struct rte_eth_dev_data *data;
+ void *process_private; /**< Pointer to per-process device data */
+ const struct eth_dev_ops *dev_ops; /**< Functions exported by PMD */
+ struct rte_device *device; /**< Backing device */
+ struct rte_intr_handle *intr_handle; /**< Device interrupt handle */
+
+ /** User application callbacks for NIC interrupts */
+ struct rte_eth_dev_cb_list link_intr_cbs;
+ /**
+ * User-supplied functions called from rx_burst to post-process
+ * received packets before passing them to the user
+ */
+ struct rte_eth_rxtx_callback *post_rx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
+ /**
+ * User-supplied functions called from tx_burst to pre-process
+ * received packets before passing them to the driver for transmission
+ */
+ struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
+
+ enum rte_eth_dev_state state; /**< Flag indicating the port state */
+ void *security_ctx; /**< Context for security ops */
+} __rte_cache_aligned;
+
+struct rte_eth_dev_sriov;
+struct rte_eth_dev_owner;
+
+/**
+ * @internal
+ * The data part, with no function pointers, associated with each Ethernet
+ * device. This structure is safe to place in shared memory to be common
+ * among different processes in a multi-process configuration.
+ */
+struct rte_eth_dev_data {
+ char name[RTE_ETH_NAME_MAX_LEN]; /**< Unique identifier name */
+
+ void **rx_queues; /**< Array of pointers to Rx queues */
+ void **tx_queues; /**< Array of pointers to Tx queues */
+ uint16_t nb_rx_queues; /**< Number of Rx queues */
+ uint16_t nb_tx_queues; /**< Number of Tx queues */
+
+ struct rte_eth_dev_sriov sriov; /**< SRIOV data */
+
+ /** PMD-specific private data. @see rte_eth_dev_release_port() */
+ void *dev_private;
+
+ struct rte_eth_link dev_link; /**< Link-level information & status */
+ struct rte_eth_conf dev_conf; /**< Configuration applied to device */
+ uint16_t mtu; /**< Maximum Transmission Unit */
+
+ /** Common Rx buffer size handled by all queues */
+ uint32_t min_rx_buf_size;
+
+ uint64_t rx_mbuf_alloc_failed; /**< Rx ring mbuf allocation failures */