| 559 | } |
| 560 | |
| 561 | static int |
| 562 | rte_dpaa_bus_dev_build(void) |
| 563 | { |
| 564 | int ret; |
| 565 | |
| 566 | /* Load the device-tree driver */ |
| 567 | ret = of_init(); |
| 568 | if (ret) { |
| 569 | DPAA_BUS_LOG(ERR, "of_init failed with ret: %d", ret); |
| 570 | return -1; |
| 571 | } |
| 572 | |
| 573 | /* Get the interface configurations from device-tree */ |
| 574 | dpaa_netcfg = netcfg_acquire(); |
| 575 | if (!dpaa_netcfg) { |
| 576 | DPAA_BUS_LOG(ERR, |
| 577 | "netcfg failed: /dev/fsl_usdpaa device not available"); |
| 578 | DPAA_BUS_WARN( |
| 579 | "Check if you are using USDPAA based device tree"); |
| 580 | return -EINVAL; |
| 581 | } |
| 582 | |
| 583 | RTE_LOG(NOTICE, EAL, "DPAA Bus Detected\n"); |
| 584 | |
| 585 | if (!dpaa_netcfg->num_ethports) { |
| 586 | DPAA_BUS_LOG(INFO, "NO DPDK mapped net interfaces available"); |
| 587 | /* This is not an error */ |
| 588 | } |
| 589 | |
| 590 | #ifdef RTE_LIBRTE_DPAA_DEBUG_DRIVER |
| 591 | dump_netcfg(dpaa_netcfg); |
| 592 | #endif |
| 593 | |
| 594 | DPAA_BUS_LOG(DEBUG, "Number of ethernet devices = %d", |
| 595 | dpaa_netcfg->num_ethports); |
| 596 | ret = dpaa_create_device_list(); |
| 597 | if (ret) { |
| 598 | DPAA_BUS_LOG(ERR, "Unable to create device list. (%d)", ret); |
| 599 | return ret; |
| 600 | } |
| 601 | return 0; |
| 602 | } |
| 603 | |
| 604 | static int rte_dpaa_setup_intr(struct rte_intr_handle *intr_handle) |
| 605 | { |
no test coverage detected