1.3.3 在进入rte_bus_probe之前当rte_bus_scan处理完毕之后,所有的pci device都插入到了rte_pci_bus.devcie_list链下。在gcc构造函数中注册的pci pmd driver链,存储到了rte_pci_bus.driver_list链中,其中有一个是我们需要用到的e1000 em pmd 驱动。 2 rte_bus_probe 在前面的步骤之后,rte_pci_bus.driver...
以PCI 设备举例, pci_scan_one (扫描/sys/bus/pci/devices目录下的设备) -eal_parse_sysfs_value (/* get device id */) -》 -pci_get_kernel_driver_by_path(扫描/sys/bus/pci/devices/driver目录下的设备驱动) -》 rte_pci_match(检查驱动知否支持设备)-》 rte_pci_map_device (设备分配资源) ...
首先,初始化pci_device_list链表,后面扫描的到的pci网卡设备信息会记录到这个链表中; 然后,调用rte_eal_pci_scan()扫描系统中的PCI网卡:遍历”/sys/bus/pci/devices”目录下的所有pci地址,逐个获取对应的pci地址、pci id、sriov使能时的vf个数、亲和的numa、设备地址空间、驱动类型等; /* * Scan the content ...
pci pdump pipeline port power rawdev rcu regexdev reorder rib ring sched security stack table telemetry timer vhost meson.build license usertools .editorconfig .gitattributes .gitignore .mailmap ABI_VERSION MAINTAINERS Makefile README VERSION meson.build meson_options.txtBreadcrumbs...
UIO出现的原因是,对于标准的硬件设备如PCI设备,USB设备等。它们被不同的内核子系统支持。这些标准的设备的驱动编写较为容易而且容易维护。很容易加入主内核源码树,但是有一些设备如I/O卡,现场总线接口或者定制的FPGA。通常这些非标准设备的驱动被实现为字符驱动。这些驱动使用了很多内核内部函数和宏。而这些内部函数和...