ethdev: export allocate function

The function rte_eth_dev_allocate() was called by rte_eth_dev_init().
In order to use it for non-pci devices, it is now in public API.

Signed-off-by: Intel
This commit is contained in:
Intel 2013-09-18 12:00:00 +02:00 committed by Thomas Monjalon
parent 2c502225c6
commit 0b33b68d12
2 changed files with 12 additions and 1 deletions

View File

@ -152,7 +152,7 @@ rte_eth_dev_data_alloc(void)
RTE_MAX_ETHPORTS * sizeof(*rte_eth_dev_data));
}
static inline struct rte_eth_dev *
struct rte_eth_dev *
rte_eth_dev_allocate(void)
{
struct rte_eth_dev *eth_dev;

View File

@ -1134,6 +1134,17 @@ extern struct rte_eth_dev rte_eth_devices[];
*/
extern uint8_t rte_eth_dev_count(void);
/**
* Function for internal use by dummy drivers primarily, e.g. ring-based
* driver.
* Allocates a new ethdev slot for an ethernet device and returns the pointer
* to that slot for the driver to use.
*
* @return
* - Slot in the rte_dev_devices array for a new device;
*/
struct rte_eth_dev *rte_eth_dev_allocate(void);
struct eth_driver;
/**
* @internal