X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Flibrte_ethdev%2Frte_ethdev_core.h;h=6e985bb7d85787f64c092bed1b37a4ed184aecfe;hb=9970a9ad07db7745ca6bc441819b287940ae86ea;hp=2394b32c836e95f17bf022094356aac1aef8029e;hpb=bdad90d12ec8eea8c9552880d715f10b0af93cc6;p=dpdk.git diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h index 2394b32c83..6e985bb7d8 100644 --- a/lib/librte_ethdev/rte_ethdev_core.h +++ b/lib/librte_ethdev/rte_ethdev_core.h @@ -52,11 +52,55 @@ typedef int (*eth_dev_reset_t)(struct rte_eth_dev *dev); typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev); /**< @internal Function used to detect an Ethernet device removal. */ -typedef void (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev); -/**< @internal Function used to enable the RX promiscuous mode of an Ethernet device. */ +/** + * @internal + * Function used to enable the Rx promiscuous mode of an Ethernet device. + * + * @param dev + * ethdev handle of port. + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, promiscuous mode is enabled. + * @retval -ENOTSUP + * Promiscuous mode is not supported. + * @retval -ENODEV + * Device is gone. + * @retval -E_RTE_SECONDARY + * Function was called from a secondary process instance and not supported. + * @retval -ETIMEDOUT + * Attempt to enable promiscuos mode failed because of timeout. + * @retval -EAGAIN + * Failed to enable promiscuous mode. + */ +typedef int (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev); -typedef void (*eth_promiscuous_disable_t)(struct rte_eth_dev *dev); -/**< @internal Function used to disable the RX promiscuous mode of an Ethernet device. */ +/** + * @internal + * Function used to disable the Rx promiscuous mode of an Ethernet device. + * + * @param dev + * ethdev handle of port. + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, promiscuous mode is disabled. + * @retval -ENOTSUP + * Promiscuous mode disabling is not supported. + * @retval -ENODEV + * Device is gone. + * @retval -E_RTE_SECONDARY + * Function was called from a secondary process instance and not supported. + * @retval -ETIMEDOUT + * Attempt to disable promiscuos mode failed because of timeout. + * @retval -EAGAIN + * Failed to disable promiscuous mode. + */ +typedef int (*eth_promiscuous_disable_t)(struct rte_eth_dev *dev); typedef void (*eth_allmulticast_enable_t)(struct rte_eth_dev *dev); /**< @internal Enable the receipt of all multicast packets by an Ethernet device. */ @@ -72,8 +116,26 @@ typedef int (*eth_stats_get_t)(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats); /**< @internal Get global I/O statistics of an Ethernet device. */ -typedef void (*eth_stats_reset_t)(struct rte_eth_dev *dev); -/**< @internal Reset global I/O statistics of an Ethernet device to 0. */ +/** + * @internal + * Reset global I/O statistics of an Ethernet device to 0. + * + * @param dev + * ethdev handle of port. + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, statistics has been reset. + * @retval -ENOTSUP + * Resetting statistics is not supported. + * @retval -EINVAL + * Resetting statistics is not valid. + * @retval -ENOMEM + * Not enough memory to get the stats. + */ +typedef int (*eth_stats_reset_t)(struct rte_eth_dev *dev); typedef int (*eth_xstats_get_t)(struct rte_eth_dev *dev, struct rte_eth_xstat *stats, unsigned n); @@ -85,8 +147,26 @@ typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev, unsigned int n); /**< @internal Get extended stats of an Ethernet device. */ -typedef void (*eth_xstats_reset_t)(struct rte_eth_dev *dev); -/**< @internal Reset extended stats of an Ethernet device. */ +/** + * @internal + * Reset extended stats of an Ethernet device. + * + * @param dev + * ethdev handle of port. + * + * @return + * Negative errno value on error, 0 on success. + * + * @retval 0 + * Success, statistics has been reset. + * @retval -ENOTSUP + * Resetting statistics is not supported. + * @retval -EINVAL + * Resetting statistics is not valid. + * @retval -ENOMEM + * Not enough memory to get the stats. + */ +typedef int (*eth_xstats_reset_t)(struct rte_eth_dev *dev); typedef int (*eth_xstats_get_names_t)(struct rte_eth_dev *dev, struct rte_eth_xstat_name *xstats_names, unsigned size);