MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_dpaa_bus_dev_build

Function rte_dpaa_bus_dev_build

dpdk/drivers/bus/dpaa/dpaa_bus.c:561–602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

559}
560
561static int
562rte_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
604static int rte_dpaa_setup_intr(struct rte_intr_handle *intr_handle)
605{

Callers 1

rte_dpaa_bus_probeFunction · 0.85

Calls 4

of_initFunction · 0.85
netcfg_acquireFunction · 0.85
dump_netcfgFunction · 0.85
dpaa_create_device_listFunction · 0.85

Tested by

no test coverage detected