网卡驱动注册到PCI总线这一过程的分析二

2. 网卡在PCI层的注册
2.1 数据结构
        前面第一章讲了总线、设备以及驱动方面的关系,也讲到了大多数网卡设备实际上是一个PCI设备。因此,本章就讲解网卡设备在注册时是如何注册到PCI总线上去的。在这里,以Intel的E100网卡驱动进行讲解。
        前面讲到每个PCI设备都由一组参数唯一地标识,这些参数保存在结构体pci_device_id中,如下所示:
  1. struct pci_device_id {
  2.         __u32 vendor, device;                /* Vendor and device ID or PCI_ANY_ID*/
  3.         __u32 subvendor, subdevice;        /* Subsystem ID's or PCI_ANY_ID */
  4.         __u32 class, class_mask;        /* (class,subclass,prog-if) triplet */
  5.         kernel_ulong_t driver_data;        /* Data private to the driver */
  6. };
复制代码

        每个PCI设备驱动都有一个pci_driver变量,它描述了一个PCI驱动的信息,如下所示:
  1. struct pci_driver {
  2.         struct list_head node;
  3.         char *name;
  4.         const struct pci_device_id *id_table;        /* must be non-NULL for probe to be called */
  5.         int  (*probe)  (struct pci_dev *dev, const struct pci_device_id *id);        /* New device inserted */
  6.         void (*remove) (struct pci_dev *dev);        /* Device removed (NULL if not a hot-plug capable driver) */
  7.         int  (*suspend) (struct pci_dev *dev, pm_message_t state);        /* Device suspended */
  8.         int  (*suspend_late) (struct pci_dev *dev, pm_message_t state);
  9.         int  (*resume_early) (struct pci_dev *dev);
  10.         int  (*resume) (struct pci_dev *dev);                        /* Device woken up */
  11.         int  (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable);   /* Enable wake event */
  12.         void (*shutdown) (struct pci_dev *dev);

  13.         struct pci_error_handlers *err_handler;
  14.         struct device_driver        driver;
  15.         struct pci_dynids dynids;

  16.         int multithread_probe;
  17. };
复制代码

        每个PCI驱动中都有一个id_table成员变量,记录了当前这个驱动所能够进行驱动的那些设备的ID值。
        对于E100网卡驱动来说,它的pci_driver变量定义为:
  1. static struct pci_driver e100_driver = {
  2.         .name =         DRV_NAME,
  3.         .id_table =     e100_id_table,
  4.         .probe =        e100_probe,
  5.         .remove =       __devexit_p(e100_remove),
  6. #ifdef CONFIG_PM
  7.         /* Power Management hooks */
  8.         .suspend =      e100_suspend,
  9.         .resume =       e100_resume,
  10. #endif
  11.         .shutdown =     e100_shutdown,
  12.         .err_handler = &e100_err_handler,
  13. };
复制代码

        里面e100_id_table就表示该E100驱动所能够支持的PCI设备的ID号,其定义为:
  1. #define INTEL_8255X_ETHERNET_DEVICE(device_id, ich) {\
  2.         PCI_VENDOR_ID_INTEL, device_id, PCI_ANY_ID, PCI_ANY_ID, \
  3.         PCI_CLASS_NETWORK_ETHERNET << 8, 0xFFFF00, ich }
  4. static struct pci_device_id e100_id_table[] = {
  5.         INTEL_8255X_ETHERNET_DEVICE(0x1029, 0),
  6.         INTEL_8255X_ETHERNET_DEVICE(0x1030, 0),
  7.         …
  8.         { 0, }
  9. };
复制代码

        当PCI层检测到一个PCI设备能够被某PCI驱动所支持时(这是通过函数pci_match_one_device来进行检测的),就会调用这个PCI驱动上的probe函数,在该函数中会对该特定的PCI设备进行一些具体的初始化等操作。比如对于E100设备驱动来说,其probe函数为e100_probe。在这个函数中,会对网卡设备进行初始化。
        e100_probe主要就涉及到网卡设备net_device的初始化,我们现在先来关注一下从网卡注册一直到调用e100_probe这一个过程的整个流程。
2.2 E100初始化
        E100驱动程序的初始化是在函数e100_init_module()中的,如下:
  1. static int __init e100_init_module(void)
  2. {
  3.         if(((1 << debug) - 1) & NETIF_MSG_DRV) {
  4.                 printk(KERN_INFO PFX "%s, %s\n", DRV_DESCRIPTION, DRV_VERSION);
  5.                 printk(KERN_INFO PFX "%s\n", DRV_COPYRIGHT);
  6.         }
  7.         return pci_register_driver(&e100_driver);
  8. }
复制代码

        在这个函数中,调用了pci_register_driver()函数,对e100_driver这个驱动进行注册。
2.3 PCI注册
        在前面我们已经看到,PCI的注册就是将PCI驱动程序挂载到其所在的总线的drivers链,同时扫描PCI设备,将它能够进行驱动的设备挂载到driver上的devices链表上来,这里,我们将详细地查看这整个流程的函数调用关系。
        pci_register_driver()->__pci_register_driver()
  1. /**
  2. * __pci_register_driver - register a new pci driver
  3. * @drv: the driver structure to register
  4. * @owner: owner module of drv
  5. * @mod_name: module name string

  6. * Adds the driver structure to the list of registered drivers.
  7. * Returns a negative value on error, otherwise 0. 
  8. * If no error occurred, the driver remains registered even if 
  9. * no device was claimed during registration.
  10. */        
  11. int __pci_register_driver(struct pci_driver *drv, struct module *owner, const char *mod_name);
  12.         在函数中有几个初始化语句:
  13.         drv->driver.name = drv->name;
  14.         drv->driver.bus = &pci_bus_type;
  15.         drv->driver.owner = owner;
  16.         drv->driver.mod_name = mod_name;
复制代码

        即是将PCI设备中的driver变量的总线指向pci_bus_type这个总线描述符,同时设置驱动的名字等。
        pci_bus_type定义如下:
  1. struct bus_type pci_bus_type = {
  2.         .name                = "pci",
  3.         .match                = pci_bus_match,
  4.         .uevent                = pci_uevent,
  5.         .probe                = pci_device_probe,
  6.         .remove                = pci_device_remove,
  7.         .suspend        = pci_device_suspend,
  8.         .suspend_late        = pci_device_suspend_late,
  9.         .resume_early        = pci_device_resume_early,
  10.         .resume                = pci_device_resume,
  11.         .shutdown        = pci_device_shutdown,
  12.         .dev_attrs        = pci_dev_attrs,
  13. };
复制代码

        然后再调用函数driver_register(&drv->driver);通过这个函数将这个PCI驱动中的struct device_driver driver成员变量注册到系统中去。
        pci_register_driver()->__pci_register_driver()->driver_register()
        driver_register()代码如下:
  1. /**
  2. *        driver_register - register driver with bus
  3. *        @drv:        driver to register
  4. *
  5. *        We pass off most of the work to the bus_add_driver() call,
  6. *        since most of the things we have to do deal with the bus
  7. *        structures.
  8. *
  9. *        The one interesting aspect is that we setup @drv->unloaded
  10. *        as a completion that gets complete when the driver reference
  11. *        count reaches 0.
  12. */
  13. int driver_register(struct device_driver * drv)
  14. {
  15.         if ((drv->bus->probe && drv->probe) ||
  16.             (drv->bus->remove && drv->remove) ||
  17.             (drv->bus->shutdown && drv->shutdown)) {
  18.                 printk(KERN_WARNING "Driver '%s' needs updating - please use bus_type methods\n", drv->name);
  19.         }
  20.         klist_init(&drv->klist_devices, NULL, NULL);
  21.         init_completion(&drv->unloaded);
  22.         return bus_add_driver(drv);
  23. }
复制代码

        klist_init()是为设备驱动的klist_devices成员进行初始化,这个klist_devices是一个对链表进行操作的包裹结构,它会链接这个驱动能够支持的那些设备。
        最后就调用bus_add_driver()函数。这个函数的功能就是将这个驱动加到其所在的总线的驱动链上。
        pci_register_driver()->__pci_register_driver()->driver_register()->bus_add_driver()->driver_attach()
        在bus_add_driver()函数中,最重要的是调用driver_attach()函数,其定义如下:
  1. /**
  2. *        driver_attach - try to bind driver to devices.
  3. *        @drv:        driver.
  4. *
  5. *        Walk the list of devices that the bus has on it and try to
  6. *        match the driver with each one.  If driver_probe_device()
  7. *        returns 0 and the @dev->driver is set, we've found a
  8. *        compatible pair.
  9. */
  10. int driver_attach(struct device_driver * drv)
  11. {
  12.         return bus_for_each_dev(drv->bus, NULL, drv, __driver_attach);
  13. }
复制代码

        该函数遍历这个驱动所在的总线上的所有设备,然后将这些设备与当前驱动进行匹配,以检测这个驱动是否能够支持某个设备,也即是将设备与驱动联系起来。
        bus_for_each_dev函数是扫描在drv->bus这个总线上的所有设备,然后将每个设备以及当前驱动这两个指针传递给__driver_attach函数。
        pci_register_driver()->__pci_register_driver()->driver_register()->bus_add_driver()->driver_attach()->__driver_attach()
        __driver_attach()函数是将驱动与设备联系起来的函数。
  1. static int __driver_attach(struct device * dev, void * data)
  2. {
  3.         struct device_driver * drv = data;

  4.         /*
  5.          * Lock device and try to bind to it. We drop the error
  6.          * here and always return 0, because we need to keep trying
  7.          * to bind to devices and some drivers will return an error
  8.          * simply if it didn't support the device.
  9.          *
  10.          * driver_probe_device() will spit a warning if there
  11.          * is an error.
  12.          */

  13.         if (dev->parent)        /* Needed for USB */
  14.                 down(&dev->parent->sem);
  15.         down(&dev->sem);
  16.         if (!dev->driver)
  17.                 driver_probe_device(drv, dev);
  18.         up(&dev->sem);
  19.         if (dev->parent)
  20.                 up(&dev->parent->sem);

  21.         return 0;
  22. }
复制代码

        在函数中有两条语句:
  1.         if (!dev->driver)
  2.                 driver_probe_device(drv, dev);
复制代码

        也即是判断当前设备是否已经注册了一个驱动,如果没有注册驱动,则调用driver_probe_device()函数。
        pci_register_driver()->__pci_register_driver()->driver_register()->bus_add_driver()->driver_attach()->__driver_attach()->driver_probe_device()
        如下:
  1. /**
  2. * driver_probe_device - attempt to bind device & driver together
  3. * @drv: driver to bind a device to
  4. * @dev: device to try to bind to the driver
  5. *
  6. * First, we call the bus's match function, if one present, which should
  7. * compare the device IDs the driver supports with the device IDs of the
  8. * device. Note we don't do this ourselves because we don't know the
  9. * format of the ID structures, nor what is to be considered a match and
  10. * what is not.
  11. *
  12. * This function returns 1 if a match is found, an error if one occurs
  13. * (that is not -ENODEV or -ENXIO), and 0 otherwise.
  14. *
  15. * This function must be called with @dev->sem held.  When called for a
  16. * USB interface, @dev->parent->sem must be held as well.
  17. */
  18. int driver_probe_device(struct device_driver * drv, struct device * dev)
  19. {
  20.         struct stupid_thread_structure *data;
  21.         struct task_struct *probe_task;
  22.         int ret = 0;

  23.         if (!device_is_registered(dev))
  24.                 return -ENODEV;
  25.         if (drv->bus->match && !drv->bus->match(dev, drv))
  26.                 goto done;

  27.         pr_debug("%s: Matched Device %s with Driver %s\n",
  28.                  drv->bus->name, dev->bus_id, drv->name);

  29.         data = kmalloc(sizeof(*data), GFP_KERNEL);
  30.         if (!data)
  31.                 return -ENOMEM;
  32.         data->drv = drv;
  33.         data->dev = dev;

  34.         if (drv->multithread_probe) {
  35.                 probe_task = kthread_run(really_probe, data,
  36.                                          "probe-%s", dev->bus_id);
  37.                 if (IS_ERR(probe_task))
  38.                         ret = really_probe(data);
  39.         } else
  40.                 ret = really_probe(data);

  41. done:
  42.         return ret;
  43. }       
复制代码

        该函数首先会调用总线上的match函数,以判断当前的PCI驱动能否支持该PCI设备,如果可以,则继续往后面执行。
        drv->bus->match函数也即是pci_bus_type中的match成员变量,它为pci_bus_match函数。
        pci_register_driver()->__pci_register_driver()->driver_register()->bus_add_driver()->driver_attach()->__driver_attach()->driver_probe_device()->pci_bus_match()
  1. /**
  2. * pci_bus_match - Tell if a PCI device structure has a matching PCI device id structure
  3. * @dev: the PCI device structure to match against
  4. * @drv: the device driver to search for matching PCI device id structures

  5. * Used by a driver to check whether a PCI device present in the
  6. * system is in its list of supported devices. Returns the matching
  7. * pci_device_id structure or %NULL if there is no match.
  8. */
  9. static int pci_bus_match(struct device *dev, struct device_driver *drv)
  10. {
  11.         struct pci_dev *pci_dev = to_pci_dev(dev);
  12.         struct pci_driver *pci_drv = to_pci_driver(drv);
  13.         const struct pci_device_id *found_id;

  14.         found_id = pci_match_device(pci_drv, pci_dev);
  15.         if (found_id)
  16.                 return 1;

  17.         return 0;
  18. }
复制代码

        pci_bus_match函数的作用就是将PCI设备与PCI驱动进行比较以检查该驱动是否能够支持这个设备。在函数的最前面是两个宏to_pci_dev和to_pci_driver。因为在函数执行的过程中,虽然最开始传进来的是pci_driver结构与pci_dev结构,但是在执行的时候却取了这两个结构体中的device_driver和device成员变量,所以现在就要通过这两个成员变量找到之前对应的pci_driver和pci_dev结构的地址。
#define        to_pci_dev(n) container_of(n, struct pci_dev, dev)
#define        to_pci_driver(drv) container_of(drv,struct pci_driver, driver)
        这两个宏在<Linux Device Driver> 3rd书上有相应的讲解,这里也就是找到E100的pci_driver:e100_driver以及该网卡设备的pci_dev结构。现在就要对它们进行比较以看它们之间是否能够联系起来。这是通过函数pci_match_device实现的。
        pci_register_driver()->__pci_register_driver()->driver_register()->bus_add_driver()->driver_attach()->__driver_attach()->driver_probe_device()->pci_bus_match()->pci_match_device()
  1. /**
  2. * pci_match_device - Tell if a PCI device structure has a matching PCI device id structure
  3. * @drv: the PCI driver to match against
  4. * @dev: the PCI device structure to match against
  5. *
  6. * Used by a driver to check whether a PCI device present in the
  7. * system is in its list of supported devices.  Returns the matching
  8. * pci_device_id structure or %NULL if there is no match.
  9. */
  10. const struct pci_device_id *pci_match_device(struct pci_driver *drv,
  11.                                              struct pci_dev *dev)
  12. {
  13.         struct pci_dynid *dynid;

  14.         /* Look at the dynamic ids first, before the static ones */
  15.         spin_lock(&drv->dynids.lock);
  16.         list_for_each_entry(dynid, &drv->dynids.list, node) {
  17.                 if (pci_match_one_device(&dynid->id, dev)) {
  18.                         spin_unlock(&drv->dynids.lock);
  19.                         return &dynid->id;
  20.                 }
  21.         }
  22.         spin_unlock(&drv->dynids.lock);

  23.         return pci_match_id(drv->id_table, dev);
  24. }
复制代码

        pci_match_one_driver函数的作用是将一个PCI设备与PCI驱动进行比较,以查看它们是否相匹配。如果相匹配,则返回匹配的pci_device_id结构体指针。
        此时,如果该PCI驱动已经找到了一个可以想符的PCI设备,则返回,然后再退回到之前的driver_probe_device函数中。在该函数最后将调用really_probe函数。将device_driver与device结构体指针作为参数传递到这个函数中。下面几行是调用驱动或者总线的probe函数来扫描设备。
        pci_register_driver()->__pci_register_driver()->driver_register()->bus_add_driver()->driver_attach()->__driver_attach()->driver_probe_device()->really_probe()
        在函数really_probe()中:
  1.         if (dev->bus->probe) {
  2.                 ret = dev->bus->probe(dev);
  3.                 if (ret)
  4.                         goto probe_failed;
  5.         } else if (drv->probe) {
  6.                 ret = drv->probe(dev);
  7.                 if (ret)
  8.                         goto probe_failed;
  9.         }
复制代码

        此时的dev->bus为pci_bus_type,其probe函数则对应为:pci_device_probe。
        pci_register_driver()->__pci_register_driver()->driver_register()->bus_add_driver()->driver_attach()->__driver_attach()->driver_probe_device()->really_probe()->pci_device_probe()
        同样,在该函数中会获得当前的PCI设备的pci_dev结构体指针以及PCI驱动程序的pci_driver结构体指针。分别使用宏to_pci_dev和to_pci_driver。最后则调用函数__pci_device_probe。在该函数中还会调用函数pci_call_probe,这是最后的函数
        pci_register_driver()->__pci_register_driver()->driver_register()->bus_add_driver()->driver_attach()->__driver_attach()->driver_probe_device()->really_probe()->pci_device_probe()->__pci_device_probe()->pci_call_probe()
        在函数pci_call_probe里有一条语句:
  1. static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev,
  2.                           const struct pci_device_id *id)
  3. {
  4.         int error;
  5. /*  省略  */
  6.         error = drv->probe(dev, id);
复制代码

        在此处就调用了pci_driver的probe函数,对于这里的E100驱动来说,它的probe函数是最开始注册的e100_probe函数,在该函数中会完成对网卡设备net_device的初始化等操作。
  1.         pci_register_driver()->__pci_register_driver()->driver_register()->bus_add_driver()->driver_attach()->__driver_attach()->driver_probe_device()->really_probe()->pci_device_probe()->__pci_device_probe()->pci_call_probe()->e100_probe()
复制代码

        到这里,我们对网卡驱动的PCI层的初始化分析就告一个段落了,剩下的部分就是网卡驱动对网卡设备本身的初始化等操作。

2.4 函数调用流程图
        在这里,为网卡在PCI层的注册画了一个函数调用的流程图,能够更直观地展现网卡从注册到调用其自身的网卡初始化的这一个函数调用过程。
网卡注册流程图1.jpg

补充一下,贴一下open函数的调用的笔记:

86, ifconfig eth0 up 会导致 net_device->open被调用,内幕!
        
            # strace ifconfig eth0 up 2>&1 |less -N
    
    可以看到,它是先用sockfd = socket(AF_INET, SOCK_DGRAM, 0)生成一个sockfd文件描述符,
    再ioctl(sockfd, SIOCSIFFLAGS, 加上IFF_UP标志)。 这样就导致了open方法的调用。

    socket文件描述符都是用socket(2)系统调用生成的:
            
        sys_socket() > sock_map_fd() > sock_attach_fd() : 

                dentry->d_op = &sockfs_dentry_operations;
                ...

                init_file(file, sock_mnt, dentry, FMODE_READ|FMODE_WRITE, &socket_file_ops);
                SOCK_INODE(sock)->i_fop = &socket_file_ops;
        
        (回忆一下,这个是不是就类似于ext3_iget()里头对inode->i_fop的赋值?)


                static const struct file_operations socket_file_ops = {
                        .owner =        THIS_MODULE,
                        .llseek =        no_llseek,
                        .aio_read =        sock_aio_read,
                        .aio_write =        sock_aio_write,
                        .poll =                sock_poll,
                        .unlocked_ioctl = sock_ioctl,
                #ifdef CONFIG_COMPAT
                        .compat_ioctl = compat_sock_ioctl,
                #endif
                        .mmap =                sock_mmap,
                        .open =                sock_no_open,        /* special open code to disallow open via /proc */
                        .release =        sock_close,
                        .fasync =        sock_fasync,
                        .sendpage =        sock_sendpage,
                        .splice_write = generic_splice_sendpage,
                        .splice_read =        sock_splice_read,
                }

        其unlocked_ioctl = sock_ioctl,那么我们沿着sock_ioctl走下去:
                
                sock_ioctl() --switch到了default--> dev_ioctl() > --SIOCSIFFLAGS--> dev_ifsioc() 
                > dev_change_flags() :
                        
                        if ((old_flags ^ flags) & IFF_UP) {IFF_UP/* Bit is different  ? */
                                ret = ((old_flags & IFF_UP) ? dev_close : dev_open)(dev);

        如果是设置了IFF_UP,就调用dev_open;如果是清除了IFF_UP,就调用dev_close。 看dev_open里的:
                
                ret = dev->open(dev);
        
        就在此时,struct net_device的open方法被调用。

2). remove函数何时被调用?
            
            当pci_dev消失时(设备被拔出),或者module被rmmod时。

            pci_unregister_driver() > driver_unregister() > driver_detach() > __device_release_driver():

                if (dev->bus && dev->bus->remove)
                        dev->bus->remove(dev);
                else if (drv->remove)
                        drv->remove(dev);
           
            对pci设备来说,这里的dev->bus就是&pci_bus_type,参考1)中的定义,我们知道其remove函数是
            pci_device_remove():

                        struct pci_dev * pci_dev = to_pci_dev(dev);
                        struct pci_driver * drv = pci_dev->driver;

                        if (drv) {
                                if (drv->remove)
                                        drv->remove(pci_dev);
                                pci_dev->driver = NULL;
                        }


增加/删除一个PCI device时的情景。 
              (只有boot时的enumeration和hotplug两种情况可能导致设备出现与消失)


              pci device的发现:

                      [ pci_scan_slot() > pci_scan_single_device() > pci_scan_device()
                                                             > pci_device_add() ]


                pci_bus_add_devices() > pci_bus_add_device() > device_add() > bus_attach_device() :
                        
                        int device_attach(struct device *dev)
                        {
                                int ret = 0;

                                down(&dev->sem);
                                if (dev->driver) {
                                        ret = device_bind_driver(dev);
                                        if (ret == 0)
                                                ret = 1;
                                        else {
                                                dev->driver = NULL;
                                                ret = 0;
                                        }
                                } else {
                                        ret = bus_for_each_drv(dev->bus, NULL, dev, __device_attach);
                                }
                                up(&dev->sem);
                                return ret;
                        }

                也就是说,如果已经有了dev->driver这个值,那么就直接bind上去;如果没有,那么:
                        
                        bus_for_each_drv() > __device_attach() > driver_probe_device() > really_probe()

                此后发生的情形就和从pci_register_driver()一直调用到really_probe()的一样了。


        remove:
        =======
                pci_remove_bus_device() > pci_destroy_dev() > pci_stop_dev() > device_unregister() >
                device_del() > bus_remove_device() > device_release_driver() > __device_release_driver() :

                        static void __device_release_driver(struct device *dev)
                        {
                                struct device_driver *drv;

                                drv = dev->driver;
                                if (drv) {
                                        driver_sysfs_remove(dev);
                                        sysfs_remove_link(&dev->kobj, "driver");

                                        if (dev->bus)
                                                blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
                                                                             BUS_NOTIFY_UNBIND_DRIVER,
                                                                             dev);

                                        if (dev->bus && dev->bus->remove)
                                                dev->bus->remove(dev);
                                        else if (drv->remove)
                                                drv->remove(dev);
                                        devres_release_all(dev);
                                        dev->driver = NULL;
                                        klist_remove(&dev->knode_driver);
                                }
                        }

                注意,如果可以,首先尝试调用pci_bus_type的remove方法(a.k.a pci_device_remove),否则调用
                device_driver的remove方法。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Linux内核中包含了大量的PCI驱动程序,这些驱动程序的功能各不相同,但都是用于支持PCI设备的工作。下面我们来详细分析一些典型的PCI驱动程序。 1. e1000e驱动程序 e1000e驱动程序是用于Intel网卡的驱动程序,它支持Intel 82563/6/7, 82571/2/3/4/7/8/9, or 82583 NICs。e1000e驱动程序采用DMA总线传输机制,能够提供高性能的网络传输。 2. ahci驱动程序 ahci驱动程序是用于SATA硬盘控制器的驱动程序,它支持AHCI(Advanced Host Controller Interface)标准,能够提供高速稳定的数据传输,支持NCQ(Native Command Queuing)和Hot Plug等特性。 3. igb驱动程序 igb驱动程序是用于Intel Gigabit以太网卡的驱动程序,它支持Intel 82575/6, 82580, I350, I210/1, and I211 NICs。igb驱动程序采用DMA总线传输机制,能够提供高性能的网络传输。 4. nvme驱动程序 nvme驱动程序是用于NVMe(NVM Express)SSD固态硬盘的驱动程序,它支持PCIe接口,能够提供高速稳定的数据传输,支持多队列和命令集等特性。 5. mlx4驱动程序 mlx4驱动程序是用于Mellanox Connect-IB/Connect-X Infiniband和以太网适配器的驱动程序,它采用DMA总线传输机制,支持InfiniBand和Ethernet网络通信协议,能够提供高性能的网络传输。 总之,Linux内核中的PCI驱动程序功能丰富,能够支持各种类型的PCI设备,为系统的性能和稳定性提供了重要的保障。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值