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:
parent
2c502225c6
commit
0b33b68d12
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user