DPDK 网卡驱动总结

RTE_PMD_REGISTER_PCI(net_ixgbe, rte_ixgbe_pmd)
    调构造函数,在mian函数之前将rte_ixgbe_pmd驱动注册到rte_pci_bus.driver_list上,driver名为net_ixgbe; --》该链表在ret_bus_probe时触发
RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe, pci_id_ixgbe_map); 
    向PMD注册net_ixgbe驱动名上的网卡设备的id相关信息;
RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe, "* igb_uio | uio_pci_generic | vfio-pci");
    将net_ixgbe驱动名的驱动通过igb_uio绑定到PMD上;

rte_ixgbe_pmd:
    static struct rte_pci_driver rte_ixgbe_pmd = {
        .id_table = pci_id_ixgbe_map,      ---》设置driver下的设备id信息
        .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |
                 RTE_PCI_DRV_IOVA_AS_VA,   ---》设置driver的flag;
        .probe = eth_ixgbe_pci_probe,
        .remove = eth_ixgbe_pci_remove,
    };

eth_ixgbe_pci_probe:
    1、rte_eth_devargs_parse:若设备被传入参数,对参数字符串进行解析;

猜你喜欢

转载自blog.csdn.net/qq_29044159/article/details/103184234
今日推荐