#ifndef _RTE_EVENTDEV_PMD_H_
#define _RTE_EVENTDEV_PMD_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** @file
* RTE Event PMD APIs
*
/**< Pointer to PMD dequeue function. */
event_dequeue_burst_t dequeue_burst;
/**< Pointer to PMD dequeue burst function. */
+ event_maintain_t maintain;
+ /**< Pointer to PMD port maintenance function. */
event_tx_adapter_enqueue_t txa_enqueue_same_dest;
/**< Pointer to PMD eth Tx adapter burst enqueue function with
* events destined to same Eth port & Tx queue.
/**
* Definitions of all functions exported by a driver through the
- * the generic structure of type *event_dev_ops* supplied in the
+ * generic structure of type *event_dev_ops* supplied in the
* *rte_eventdev* structure associated with a device.
*/
typedef void (*eventdev_queue_release_t)(struct rte_eventdev *dev,
uint8_t queue_id);
+/**
+ * Get an event queue attribute at runtime.
+ *
+ * @param dev
+ * Event device pointer
+ * @param queue_id
+ * Event queue index
+ * @param attr_id
+ * Event queue attribute id
+ * @param[out] attr_value
+ * Event queue attribute value
+ *
+ * @return
+ * - 0: Success.
+ * - <0: Error code on failure.
+ */
+typedef int (*eventdev_queue_attr_get_t)(struct rte_eventdev *dev,
+ uint8_t queue_id, uint32_t attr_id,
+ uint32_t *attr_value);
+
+/**
+ * Set an event queue attribute at runtime.
+ *
+ * @param dev
+ * Event device pointer
+ * @param queue_id
+ * Event queue index
+ * @param attr_id
+ * Event queue attribute id
+ * @param attr_value
+ * Event queue attribute value
+ *
+ * @return
+ * - 0: Success.
+ * - <0: Error code on failure.
+ */
+typedef int (*eventdev_queue_attr_set_t)(struct rte_eventdev *dev,
+ uint8_t queue_id, uint32_t attr_id,
+ uint64_t attr_value);
+
/**
* Retrieve the default event port configuration.
*
*/
typedef void (*eventdev_port_release_t)(void *port);
+/**
+ * Quiesce any core specific resources consumed by the event port
+ *
+ * @param dev
+ * Event device pointer.
+ * @param port
+ * Event port pointer.
+ * @param flush_cb
+ * User-provided event flush function.
+ * @param args
+ * Arguments to be passed to the user-provided event flush function.
+ *
+ */
+typedef void (*eventdev_port_quiesce_t)(struct rte_eventdev *dev, void *port,
+ rte_eventdev_port_flush_t flush_cb,
+ void *args);
+
/**
* Link multiple source event queues to destination event port.
*
typedef int (*eventdev_eth_rx_adapter_stats_reset)
(const struct rte_eventdev *dev,
const struct rte_eth_dev *eth_dev);
+
+struct rte_event_eth_rx_adapter_queue_stats;
+
+/**
+ * Retrieve ethernet Rx adapter queue statistics.
+ *
+ * @param dev
+ * Event device pointer
+ *
+ * @param eth_dev
+ * Ethernet device pointer
+ *
+ * @param rx_queue_id
+ * Ethernet device receive queue index.
+ *
+ * @param[out] q_stats
+ * Pointer to queue stats structure
+ *
+ * @return
+ * Return 0 on success.
+ */
+typedef int (*eventdev_eth_rx_adapter_q_stats_get)
+ (const struct rte_eventdev *dev,
+ const struct rte_eth_dev *eth_dev,
+ uint16_t rx_queue_id,
+ struct rte_event_eth_rx_adapter_queue_stats *q_stats);
+
+/**
+ * Reset ethernet Rx adapter queue statistics.
+ *
+ * @param dev
+ * Event device pointer
+ *
+ * @param eth_dev
+ * Ethernet device pointer
+ *
+ * @param rx_queue_id
+ * Ethernet device receive queue index.
+ *
+ * @return
+ * Return 0 on success.
+ */
+typedef int (*eventdev_eth_rx_adapter_q_stats_reset)
+ (const struct rte_eventdev *dev,
+ const struct rte_eth_dev *eth_dev,
+ uint16_t rx_queue_id);
+
/**
* Start eventdev selftest.
*
/**< Set up an event queue. */
eventdev_queue_release_t queue_release;
/**< Release an event queue. */
+ eventdev_queue_attr_get_t queue_attr_get;
+ /**< Get an event queue attribute. */
+ eventdev_queue_attr_set_t queue_attr_set;
+ /**< Set an event queue attribute. */
eventdev_port_default_conf_get_t port_def_conf;
/**< Get default port configuration. */
/**< Set up an event port. */
eventdev_port_release_t port_release;
/**< Release an event port. */
+ eventdev_port_quiesce_t port_quiesce;
+ /**< Quiesce an event port. */
eventdev_port_link_t port_link;
/**< Link event queues to an event port. */
eventdev_crypto_adapter_stats_reset crypto_adapter_stats_reset;
/**< Reset crypto stats */
+ eventdev_eth_rx_adapter_q_stats_get eth_rx_adapter_queue_stats_get;
+ /**< Get ethernet Rx queue stats */
+ eventdev_eth_rx_adapter_q_stats_reset eth_rx_adapter_queue_stats_reset;
+ /**< Reset ethernet Rx queue stats */
+
eventdev_eth_tx_adapter_caps_get_t eth_tx_adapter_caps_get;
/**< Get ethernet Tx adapter capabilities */