ethdev: remove rte_pmd_init_all function
Now that we've converted all the pmds in dpdk to use the driver registration macro, rte_pmd_init_all has become empty. As theres no reason to keep it around anymore, just remove it and fix up all the eample callers. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This commit is contained in:
parent
2e87457ef9
commit
e5ffdd1457
@ -1806,9 +1806,6 @@ main(int argc, char** argv)
|
||||
if (diag < 0)
|
||||
rte_panic("Cannot init EAL\n");
|
||||
|
||||
if (rte_pmd_init_all())
|
||||
rte_panic("Cannot init PMD\n");
|
||||
|
||||
if (rte_eal_pci_probe())
|
||||
rte_panic("Cannot probe PCI\n");
|
||||
|
||||
|
@ -509,11 +509,6 @@ test_kni(void)
|
||||
printf("fail to create mempool for kni\n");
|
||||
return -1;
|
||||
}
|
||||
ret = rte_pmd_init_all();
|
||||
if (ret < 0) {
|
||||
printf("fail to initialize PMD\n");
|
||||
return -1;
|
||||
}
|
||||
ret = rte_eal_pci_probe();
|
||||
if (ret < 0) {
|
||||
printf("fail to probe PCI devices\n");
|
||||
|
@ -566,11 +566,6 @@ main(int argc, char** argv)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Initialise PMD driver(s) */
|
||||
ret = rte_pmd_init_all();
|
||||
if (ret < 0)
|
||||
FATAL_ERROR("Could not probe PMD (%d)", ret);
|
||||
|
||||
/* Scan PCI bus for recognised devices */
|
||||
ret = rte_eal_pci_probe();
|
||||
if (ret < 0)
|
||||
|
@ -1553,10 +1553,6 @@ MAIN(int argc, char **argv)
|
||||
rte_exit(EXIT_FAILURE, "init_lcore_rx_queues failed\n");
|
||||
|
||||
|
||||
/* init driver(s) */
|
||||
if (rte_pmd_init_all() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
|
||||
|
||||
if (rte_eal_pci_probe() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
|
||||
|
||||
|
@ -608,10 +608,6 @@ MAIN(int argc, char **argv)
|
||||
if (pool_indirect == NULL)
|
||||
rte_panic("Cannot init indirect mbuf pool\n");
|
||||
|
||||
/* init driver */
|
||||
if (rte_pmd_init_all() < 0)
|
||||
rte_panic("Cannot init PMD\n");
|
||||
|
||||
if (rte_eal_pci_probe() < 0)
|
||||
rte_panic("Cannot probe PCI\n");
|
||||
|
||||
|
@ -753,10 +753,6 @@ MAIN(int argc, char **argv)
|
||||
if (clone_pool == NULL)
|
||||
rte_exit(EXIT_FAILURE, "Cannot init clone mbuf pool\n");
|
||||
|
||||
/* init driver */
|
||||
if (rte_pmd_init_all() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
|
||||
|
||||
if (rte_eal_pci_probe() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
|
||||
|
||||
|
@ -889,11 +889,6 @@ main(int argc, char** argv)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Initialise PMD driver(s) */
|
||||
ret = rte_pmd_init_all();
|
||||
if (ret < 0)
|
||||
rte_exit(EXIT_FAILURE, "Could not initialise PMD (%d)\n", ret);
|
||||
|
||||
/* Scan PCI bus for recognised devices */
|
||||
ret = rte_eal_pci_probe();
|
||||
if (ret < 0)
|
||||
|
@ -716,10 +716,6 @@ int main(int argc, char **argv)
|
||||
if (l2fwd_ivshmem_pktmbuf_pool == NULL)
|
||||
rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n");
|
||||
|
||||
/* init driver(s) */
|
||||
if (rte_pmd_init_all() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
|
||||
|
||||
if (rte_eal_pci_probe() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
|
||||
|
||||
|
@ -615,10 +615,6 @@ MAIN(int argc, char **argv)
|
||||
if (l2fwd_pktmbuf_pool == NULL)
|
||||
rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n");
|
||||
|
||||
/* init driver(s) */
|
||||
if (rte_pmd_init_all() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
|
||||
|
||||
if (rte_eal_pci_probe() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
|
||||
|
||||
|
@ -1547,10 +1547,6 @@ MAIN(int argc, char **argv)
|
||||
rte_exit(EXIT_FAILURE, "init_lcore_rx_queues failed\n");
|
||||
|
||||
|
||||
/* init driver(s) */
|
||||
if (rte_pmd_init_all() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
|
||||
|
||||
if (rte_eal_pci_probe() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
|
||||
|
||||
|
@ -1007,10 +1007,6 @@ MAIN(int argc, char **argv)
|
||||
if (ret < 0)
|
||||
rte_exit(EXIT_FAILURE, "init_lcore_rx_queues failed\n");
|
||||
|
||||
/* init driver */
|
||||
if (rte_pmd_init_all() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
|
||||
|
||||
if (rte_eal_pci_probe() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
|
||||
|
||||
|
@ -1841,10 +1841,6 @@ MAIN(int argc, char **argv)
|
||||
rte_exit(EXIT_FAILURE, "init_lcore_rx_queues failed\n");
|
||||
|
||||
|
||||
/* init driver(s) */
|
||||
if (rte_pmd_init_all() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
|
||||
|
||||
if (rte_eal_pci_probe() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
|
||||
|
||||
|
@ -663,10 +663,6 @@ MAIN(int argc, char **argv)
|
||||
if (lsi_pktmbuf_pool == NULL)
|
||||
rte_panic("Cannot init mbuf pool\n");
|
||||
|
||||
/* init driver(s) */
|
||||
if (rte_pmd_init_all() < 0)
|
||||
rte_panic("Cannot init pmd\n");
|
||||
|
||||
if (rte_eal_pci_probe() < 0)
|
||||
rte_panic("Cannot probe PCI\n");
|
||||
|
||||
|
@ -450,12 +450,6 @@ app_init_nics(void)
|
||||
int ret;
|
||||
uint32_t n_rx_queues, n_tx_queues;
|
||||
|
||||
/* Init driver */
|
||||
printf("Initializing the PMD driver ...\n");
|
||||
if (rte_pmd_init_all() < 0) {
|
||||
rte_panic("Cannot init PMD\n");
|
||||
}
|
||||
|
||||
if (rte_eal_pci_probe() < 0) {
|
||||
rte_panic("Cannot probe PCI\n");
|
||||
}
|
||||
|
@ -40,7 +40,7 @@
|
||||
static inline int
|
||||
init_drivers(void)
|
||||
{
|
||||
if (rte_pmd_init_all() < 0 || rte_eal_pci_probe() < 0)
|
||||
if (rte_eal_pci_probe() < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
|
@ -1050,10 +1050,6 @@ MAIN(int argc, char **argv)
|
||||
for (i = 0; i < RTE_MAX_LCORE; i++)
|
||||
lcore_resource[i].lcore_id = i;
|
||||
|
||||
/* init driver(s) */
|
||||
if (rte_pmd_init_all() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
|
||||
|
||||
if (rte_eal_pci_probe() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
|
||||
|
||||
|
@ -463,8 +463,6 @@ main(int argc, char **argv)
|
||||
|
||||
/* probe to determine the NIC devices available */
|
||||
proc_type = rte_eal_process_type();
|
||||
if (rte_pmd_init_all() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
|
||||
if (rte_eal_pci_probe() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
|
||||
if (rte_eth_dev_count() == 0)
|
||||
|
@ -294,10 +294,6 @@ int main(int argc, char *argv[])
|
||||
if (ports.num == 0)
|
||||
rte_exit(EXIT_FAILURE, "no ports specified\n");
|
||||
|
||||
err = rte_pmd_init_all();
|
||||
if (err < 0)
|
||||
rte_exit(EXIT_FAILURE, "rte_pmd_init_all(): error %d\n", err);
|
||||
|
||||
err = rte_eal_pci_probe();
|
||||
if (err < 0)
|
||||
rte_exit(EXIT_FAILURE, "rte_eal_pci_probe(): error %d\n", err);
|
||||
|
@ -386,10 +386,6 @@ MAIN(int argc, char **argv)
|
||||
if (pool == NULL)
|
||||
rte_exit(EXIT_FAILURE, "Buffer pool creation error\n");
|
||||
|
||||
/* PMD init */
|
||||
if (rte_pmd_init_all() < 0)
|
||||
rte_exit(EXIT_FAILURE, "PMD init error\n");
|
||||
|
||||
if (rte_eal_pci_probe() < 0)
|
||||
rte_exit(EXIT_FAILURE, "PCI probe error\n");
|
||||
|
||||
|
@ -305,10 +305,6 @@ int app_init(void)
|
||||
char ring_name[MAX_NAME_LEN];
|
||||
char pool_name[MAX_NAME_LEN];
|
||||
|
||||
/* init driver(s) */
|
||||
if (rte_pmd_init_all() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot init PMD\n");
|
||||
|
||||
if (rte_eal_pci_probe() < 0)
|
||||
rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
|
||||
|
||||
|
@ -138,11 +138,6 @@ init_dpdk(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Initialize the PMD */
|
||||
ret = rte_pmd_init_all();
|
||||
if (ret < 0)
|
||||
rte_exit(EXIT_FAILURE, "Failed to initialize poll mode drivers (error %d)\n", ret);
|
||||
|
||||
/* Bind the drivers to usable devices */
|
||||
ret = rte_eal_pci_probe();
|
||||
if (ret < 0)
|
||||
|
@ -1657,7 +1657,7 @@ MAIN(int argc, char *argv[])
|
||||
if (ret < 0)
|
||||
rte_exit(EXIT_FAILURE, "Invalid argument\n");
|
||||
|
||||
if (rte_pmd_init_all() != 0 || rte_eal_pci_probe() != 0)
|
||||
if (rte_eal_pci_probe() != 0)
|
||||
rte_exit(EXIT_FAILURE, "Error with NIC driver initialization\n");
|
||||
|
||||
for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id ++)
|
||||
|
@ -1464,7 +1464,7 @@ MAIN(int argc, char *argv[])
|
||||
if (ret < 0)
|
||||
rte_exit(EXIT_FAILURE, "Invalid argument\n");
|
||||
|
||||
if (rte_pmd_init_all() != 0 || rte_eal_pci_probe() != 0)
|
||||
if (rte_eal_pci_probe() != 0)
|
||||
rte_exit(EXIT_FAILURE, "Error with NIC driver initialization\n");
|
||||
|
||||
for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id ++)
|
||||
|
@ -597,7 +597,7 @@ MAIN(int argc, char *argv[])
|
||||
if (ret < 0)
|
||||
rte_exit(EXIT_FAILURE, "Invalid VMDQ argument\n");
|
||||
|
||||
if (rte_pmd_init_all() != 0 || rte_eal_pci_probe() != 0)
|
||||
if (rte_eal_pci_probe() != 0)
|
||||
rte_exit(EXIT_FAILURE, "Error with NIC driver initialization\n");
|
||||
|
||||
for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id ++)
|
||||
|
@ -1315,33 +1315,6 @@ struct eth_driver {
|
||||
*/
|
||||
extern void rte_eth_driver_register(struct eth_driver *eth_drv);
|
||||
|
||||
/**
|
||||
* The initialization function of *all* supported and enabled drivers.
|
||||
* Right now, the following PMDs are supported:
|
||||
* - igb
|
||||
* - igbvf
|
||||
* - em
|
||||
* - ixgbe
|
||||
* - ixgbevf
|
||||
* - virtio
|
||||
* - vmxnet3
|
||||
* This function is invoked once at EAL start time.
|
||||
* @return
|
||||
* 0 on success.
|
||||
* Error code of the device initialization failure,
|
||||
* -ENODEV if there are no drivers available
|
||||
* (e.g. if all driver config options are = n).
|
||||
*/
|
||||
static inline
|
||||
int rte_pmd_init_all(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (ret == -ENODEV)
|
||||
RTE_LOG(ERR, PMD, "No PMD(s) are configured\n");
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure an Ethernet device.
|
||||
* This function must be invoked first before any other function in the
|
||||
|
Loading…
Reference in New Issue
Block a user