src/dpdk/lib/librte_ethdev/ethdev_pci.h
static inline int
rte_eth_dev_pci_generic_probe(struct rte_pci_device *pci_dev,
	size_t private_data_size, eth_dev_pci_callback_t dev_init)
{
	struct rte_eth_dev *eth_dev;
	int ret;

	eth_dev = rte_eth_dev_pci_allocate(pci_dev, private_data_size);
	if (!eth_dev)
		return -ENOMEM;

	RTE_FUNC_PTR_OR_ERR_RET(*dev_init, -EINVAL);
	ret = dev_init(eth_dev);
	if (ret)
		rte_eth_dev_release_port(eth_dev);
	else
		rte_eth_dev_probing_finish(eth_dev);

	return ret;
}
/**
 * @internal
 * Wrapper for use by pci drivers in a .probe function to attach to a ethdev
 * interface.
 */
@internal
Wrapper for use by pci drivers in a .probe function to attach to a ethdev
interface.
@internal Wrapper for use by pci drivers in a . probe function to attach to a ethdev interface .
static inline int
rte_eth_dev_pci_generic_probe(struct rte_pci_device *pci_dev,
	size_t private_data_size, eth_dev_pci_callback_t dev_init)
{
	struct rte_eth_dev *eth_dev;
	int ret;
	eth_dev = rte_eth_dev_pci_allocate(pci_dev, private_data_size);
	if (!eth_dev)
		return -ENOMEM;
	RTE_FUNC_PTR_OR_ERR_RET(*dev_init, -EINVAL);
	ret = dev_init(eth_dev);
	if (ret)
		rte_eth_dev_release_port(eth_dev);
	else
		rte_eth_dev_probing_finish(eth_dev);
	return ret;
}
static inline int rte_eth_dev_pci_generic_probe ( struct rte_pci_device * pci_dev , size_t private_data_size , eth_dev_pci_callback_t dev_init ) { struct rte_eth_dev * eth_dev ; int ret ; eth_dev = rte_eth_dev_pci_allocate ( pci_dev , private_data_size ) ; if ( ! eth_dev ) return - ENOMEM ; RTE_FUNC_PTR_OR_ERR_RET ( * dev_init , - EINVAL ) ; ret = dev_init ( eth_dev ) ; if ( ret ) rte_eth_dev_release_port ( eth_dev ) ; else rte_eth_dev_probing_finish ( eth_dev ) ; return ret ; }
@internal
 Wrapper for use by pci drivers in a .probe function to attach to a ethdev
 interface.
@internal Wrapper for use by pci drivers in a . probe function to attach to a ethdev interface .