app/crypto-perf: support lookaside IPsec
[dpdk.git] / lib / ethdev / ethdev_driver.h
index 40e474a..7ce0f77 100644 (file)
 
 #include <rte_ethdev.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**< @internal Declaration of the hairpin peer queue information structure. */
 struct rte_hairpin_peer_info;
 
@@ -187,11 +183,28 @@ typedef int (*eth_xstats_get_t)(struct rte_eth_dev *dev,
        struct rte_eth_xstat *stats, unsigned int n);
 /**< @internal Get extended stats of an Ethernet device. */
 
+/**
+ * @internal
+ * Get extended stats of an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ * @param ids
+ *   IDs array to retrieve specific statistics. Must not be NULL.
+ * @param values
+ *   A pointer to a table to be filled with device statistics values.
+ *   Must not be NULL.
+ * @param n
+ *   Element count in @p ids and @p values.
+ *
+ * @return
+ *   - A number of filled in stats.
+ *   - A negative value on error.
+ */
 typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev,
                                      const uint64_t *ids,
                                      uint64_t *values,
                                      unsigned int n);
-/**< @internal Get extended stats of an Ethernet device. */
 
 /**
  * @internal
@@ -218,10 +231,27 @@ typedef int (*eth_xstats_get_names_t)(struct rte_eth_dev *dev,
        struct rte_eth_xstat_name *xstats_names, unsigned int size);
 /**< @internal Get names of extended stats of an Ethernet device. */
 
+/**
+ * @internal
+ * Get names of extended stats of an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ * @param ids
+ *   IDs array to retrieve specific statistics. Must not be NULL.
+ * @param xstats_names
+ *   An rte_eth_xstat_name array of at least @p size elements to be filled.
+ *   Must not be NULL.
+ * @param size
+ *   Element count in @p ids and @p xstats_names.
+ *
+ * @return
+ *   - A number of filled in stats.
+ *   - A negative value on error.
+ */
 typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev,
-       struct rte_eth_xstat_name *xstats_names, const uint64_t *ids,
+       const uint64_t *ids, struct rte_eth_xstat_name *xstats_names,
        unsigned int size);
-/**< @internal Get names of extended stats of an Ethernet device. */
 
 typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev,
                                             uint16_t queue_id,
@@ -282,7 +312,8 @@ typedef int (*eth_rx_disable_intr_t)(struct rte_eth_dev *dev,
                                    uint16_t rx_queue_id);
 /**< @internal Disable interrupt of a receive queue of an Ethernet device. */
 
-typedef void (*eth_queue_release_t)(void *queue);
+typedef void (*eth_queue_release_t)(struct rte_eth_dev *dev,
+                                   uint16_t queue_id);
 /**< @internal Release memory resources allocated by given RX/TX queue. */
 
 typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev,
@@ -389,16 +420,6 @@ typedef int (*eth_set_queue_rate_limit_t)(struct rte_eth_dev *dev,
                                uint16_t tx_rate);
 /**< @internal Set queue TX rate */
 
-typedef int (*eth_mirror_rule_set_t)(struct rte_eth_dev *dev,
-                                 struct rte_eth_mirror_conf *mirror_conf,
-                                 uint8_t rule_id,
-                                 uint8_t on);
-/**< @internal Add a traffic mirroring rule on an Ethernet device */
-
-typedef int (*eth_mirror_rule_reset_t)(struct rte_eth_dev *dev,
-                                 uint8_t rule_id);
-/**< @internal Remove a traffic mirroring rule on an Ethernet device */
-
 typedef int (*eth_udp_tunnel_port_add_t)(struct rte_eth_dev *dev,
                                         struct rte_eth_udp_tunnel *tunnel_udp);
 /**< @internal Add tunneling UDP port */
@@ -863,9 +884,6 @@ struct eth_dev_ops {
        eth_uc_hash_table_set_t    uc_hash_table_set; /**< Set Unicast Table Array. */
        eth_uc_all_hash_table_set_t uc_all_hash_table_set; /**< Set Unicast hash bitmap. */
 
-       eth_mirror_rule_set_t      mirror_rule_set; /**< Add a traffic mirror rule. */
-       eth_mirror_rule_reset_t    mirror_rule_reset; /**< reset a traffic mirror rule. */
-
        eth_udp_tunnel_port_add_t  udp_tunnel_port_add; /** Add UDP tunnel port. */
        eth_udp_tunnel_port_del_t  udp_tunnel_port_del; /** Del UDP tunnel port. */
 
@@ -1513,8 +1531,4 @@ struct rte_eth_tunnel_filter_conf {
        uint16_t queue_id;      /**< Queue assigned to if match. */
 };
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _RTE_ETHDEV_DRIVER_H_ */