X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_ethdev%2Frte_ethdev_driver.h;h=936ff8c986516f0cc7e21532ec7a90b795c37fe1;hb=f0c2dc8201d68aa9a48639c933adf9156ebc32d7;hp=e2426aff821d32150f86658806f662825581b1d1;hpb=70815c9ecadd780af101810119d385009cb0eb2d;p=dpdk.git diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h index e2426aff82..936ff8c986 100644 --- a/lib/librte_ethdev/rte_ethdev_driver.h +++ b/lib/librte_ethdev/rte_ethdev_driver.h @@ -38,7 +38,6 @@ struct rte_eth_dev *rte_eth_dev_allocated(const char *name); * to that slot for the driver to use. * * @param name Unique identifier name for each Ethernet device - * @param type Device type of this Ethernet device * @return * - Slot in the rte_dev_devices array for a new device; */ @@ -59,10 +58,17 @@ struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name); /** * @internal - * Release the specified ethdev port. + * Notify RTE_ETH_EVENT_DESTROY and release the specified ethdev port. + * + * The following PMD-managed data fields will be freed: + * - dev_private + * - mac_addrs + * - hash_mac_addrs + * If one of these fields should not be freed, + * it must be reset to NULL by the PMD, typically in dev_close method. * * @param eth_dev - * The *eth_dev* pointer is the address of the *rte_eth_dev* structure. + * Device to be detached. * @return * - 0 on success, negative on error */ @@ -219,7 +225,8 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev, * @return * Negative errno value on error, 0 on success. */ -int __rte_experimental +__rte_experimental +int rte_eth_switch_domain_alloc(uint16_t *domain_id); /** @@ -237,7 +244,8 @@ rte_eth_switch_domain_alloc(uint16_t *domain_id); * @return * Negative errno value on error, 0 on success. */ -int __rte_experimental +__rte_experimental +int rte_eth_switch_domain_free(uint16_t domain_id); /** Generic Ethernet device arguments */ @@ -266,7 +274,8 @@ struct rte_eth_devargs { * @return * Negative errno value on error, 0 on success. */ -int __rte_experimental +__rte_experimental +int rte_eth_devargs_parse(const char *devargs, struct rte_eth_devargs *eth_devargs); @@ -298,7 +307,8 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev, * @return * Negative errno value on error, 0 on success. */ -int __rte_experimental +__rte_experimental +int rte_eth_dev_create(struct rte_device *device, const char *name, size_t priv_data_size, ethdev_bus_specific_init bus_specific_init, void *bus_init_params, @@ -311,7 +321,7 @@ typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev); * @warning * @b EXPERIMENTAL: this API may change without prior notice. * - * PMD helper function for cleaing up the resources of a ethdev port on it's + * PMD helper function for cleaning up the resources of a ethdev port on it's * destruction. * * @param ethdev @@ -322,35 +332,10 @@ typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev); * @return * Negative errno value on error, 0 on success. */ -int __rte_experimental +__rte_experimental +int rte_eth_dev_destroy(struct rte_eth_dev *ethdev, ethdev_uninit_t ethdev_uninit); -/** - * PMD helper function to check if keeping CRC is requested - * - * @note - * When CRC_STRIP offload flag is removed and default behavior switch to - * strip CRC, as planned, this helper function is not that useful and will be - * removed. In PMDs this function will be replaced with check: - * if (offloads & DEV_RX_OFFLOAD_KEEP_CRC) - * - * @param rx_offloads - * offload bits to be applied - * - * @return - * Return positive if keeping CRC is requested, - * zero if stripping CRC is requested - */ -static inline int -rte_eth_dev_must_keep_crc(uint64_t rx_offloads) -{ - if (rx_offloads & DEV_RX_OFFLOAD_CRC_STRIP) - return 0; - - /* no KEEP_CRC or CRC_STRIP offload flags means keep CRC */ - return 1; -} - #ifdef __cplusplus } #endif