精华内容
下载资源
问答
  • i40e-2.10.19.30.tar.gz

    2019-11-19 11:01:02
    ubuntu14.04 intelX722网卡驱动 ubuntu14.04 intelX722网卡驱动 i40e-2.10.19.30.tar.gz
  • i40e-2.13.10.tar.gz

    2021-03-26 17:15:02
    Intel i40e最新网卡驱动源码及文档
  • 在 2.6.39 内核上编译 i40e 官方驱动 i40e 驱动未合入 2.6.39 内核中,需要单独编译。 从如下地址下载 2.4.6 版本的 i40e 官方驱动: https://sourceforge.net/projects/e1000/files/i40e%20stable/2.4.6/ 下载后...

    在 2.6.39 内核上编译 i40e 官方驱动

    i40e 驱动未合入 2.6.39 内核中,需要单独编译。

    从如下地址下载 2.4.6 版本的 i40e 官方驱动:

    https://sourceforge.net/projects/e1000/files/i40e%20stable/2.4.6/

    下载后加压 tar 包,查看 Makefile 的信息,重点关注如下内容:

    obj-$(CONFIG_I40E) += i40e.o
    
    i40e-y := i40e_main.o \
        i40e_ethtool.o \
        i40e_adminq.o \
        i40e_common.o \
        i40e_hmc.o \
        i40e_lan_hmc.o \
        i40e_nvm.o \
        i40e_debugfs.o \
        i40e_diag.o \
        i40e_txrx.o \
        i40e_ptp.o \
        i40e_client.o \
        i40e_virtchnl_pf.o
    
    i40e-$(CONFIG_DCB) += i40e_dcb.o i40e_dcb_nl.o
    i40e-y += kcompat.o
    

    由于 2.6.39 内核源码树里面没有合并 i40e 驱动,上面的 CONFIG_I40E 与
    CONFIG_DCB 配置项在 2.6.39 里面不可用。为此,将上述内容进行修改,修
    改为如下内容:

    obj-m += i40e.o
    
    i40e-y := i40e_main.o \
        i40e_ethtool.o \
        i40e_adminq.o \
        i40e_common.o \
        i40e_hmc.o \
        i40e_lan_hmc.o \
        i40e_nvm.o \
        i40e_debugfs.o \
        i40e_diag.o \
        i40e_txrx.o \
        i40e_ptp.o \
        i40e_client.o \
        i40e_virtchnl_pf.o
    
    i40e-y += i40e_dcb.o i40e_dcb_nl.o
    i40e-y += kcompat.o
    

    这之后进行编译。有如下报错信息:

    执行如下命令:

    ···bash
    make -C ~/linux-2.6.39/linux-2.6.39-gentoo-r3-64bit M=$(pwd) modules
    ···
    编译发现有下面的报错信息:

    longyu@debian ~/i40e_driver_for_2.6.39/test/i40e-2.4.6/src $ make -C ~/linux-2.6.39/linux-2.6.39-gentoo-r3-64bit M=$(pwd) modules
    make: Entering directory `/home/longyu/linux-2.6.39/linux-2.6.39-gentoo-r3-64bit'
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_main.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.o
    /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.c: In function ‘i40e_get_cloud_filter_entry’:
    /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.c:3543:31: error: ‘union _kc_ethtool_flow_union’ has no member named ‘ether_spec’
    /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.c:3544:31: error: ‘union _kc_ethtool_flow_union’ has no member named ‘ether_spec’
    /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.c:3547:32: error: ‘union _kc_ethtool_flow_union’ has no member named ‘ether_spec’
    /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.c:3549:32: error: ‘union _kc_ethtool_flow_union’ has no member named ‘ether_spec’
    /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.c: In function ‘i40e_cloud_filter_mask2flags’:
    /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.c:3811:39: error: ‘union _kc_ethtool_flow_union’ has no member named ‘ether_spec’
    /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.c:3813:41: error: ‘union _kc_ethtool_flow_union’ has no member named ‘ether_spec’
    /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.c:3816:67: error: ‘union _kc_ethtool_flow_union’ has no member named ‘ether_spec’
    /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.c:3821:39: error: ‘union _kc_ethtool_flow_union’ has no member named ‘ether_spec’
    /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.c:3823:41: error: ‘union _kc_ethtool_flow_union’ has no member named ‘ether_spec’
    /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.c:3826:69: error: ‘union _kc_ethtool_flow_union’ has no member named ‘ether_spec’
    /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.c: In function ‘i40e_add_cloud_filter_ethtool’:
    /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.c:3995:13: error: ‘union _kc_ethtool_flow_union’ has no member named ‘ether_spec’
    /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.c:3997:13: error: ‘union _kc_ethtool_flow_union’ has no member named ‘ether_spec’
    At top level:
    cc1: warning: unrecognized command line option "-Wno-unused-but-set-variable"
    make[1]: *** [/home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ethtool.o] Error 1
    make: *** [_module_/home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src] Error 2
    make: Leaving directory `/home/longyu/linux-2.6.39/linux-2.6.39-gentoo-r3-64bit'
    

    上面的报错信息显示 _kc_ethtool_flow_union 中缺少字段,这应该是因为 2.6.39 内核版本过低的原因。可以先
    将 i40e_ethtool.c 从 Makefile 中注掉,重新编译看看还有没有其它错误,如果错误太多就换低版本尝试。

    重新编译有如下信息输出:

    longyu@debian ~/i40e_driver_for_2.6.39/test/i40e-2.4.6/src $ make -C ~/linux-2.6.39/linux-2.6.39-gentoo-r3-64bit M=$(pwd) modules
    make: Entering directory `/home/longyu/linux-2.6.39/linux-2.6.39-gentoo-r3-64bit'
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_adminq.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_common.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_hmc.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_lan_hmc.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_nvm.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_debugfs.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_diag.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_txrx.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_ptp.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_client.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_virtchnl_pf.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_dcb.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e_dcb_nl.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/kcompat.o
      LD [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e.o
      Building modules, stage 2.
      MODPOST 1 modules
    WARNING: "i40e_set_ethtool_ops" [/home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e.ko] undefined!
      CC      /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e.mod.o
      LD [M]  /home/longyu/i40e_driver_for_2.6.39/test/i40e-2.4.6/src/i40e.ko
    make: Leaving directory `/home/longyu/linux-2.6.39/linux-2.6.39-gentoo-r3-64bit'
    

    可以发现,有一个警告:i40e_set_ethtool_ops 函数未定义。这个函数是在 i40e_ethtool.c 中的,没有编译 i40e_ethtool.c 当
    然找不到这个函数的定义。

    有了上面的基础后,可以发现并没有很多报错,这时研究下 i40e_ethtool.c 中的函数,可以先屏蔽掉相应的位置,这只对 ethtool
    命令有些影响,对我们使用 ifconfig 来操作网卡没有任何影响。

    屏蔽后重新编译,就能够编译出 2.6.39 上面可以使用的 i40e.ko 驱动了。
    操作记录如下:

    longyu@debian ~/i40e_driver_for_2.6.39/i40e-2.4.6/src $ make -C ~/linux-2.6.39/linux-2.6.39-gentoo-r3-64bit M=$(pwd) modules
    make: Entering directory `/home/longyu/linux-2.6.39/linux-2.6.39-gentoo-r3-64bit'
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e_main.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e_ethtool.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e_adminq.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e_common.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e_hmc.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e_lan_hmc.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e_nvm.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e_debugfs.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e_diag.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e_txrx.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e_ptp.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e_client.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e_virtchnl_pf.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e_dcb.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e_dcb_nl.o
      CC [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/kcompat.o
      LD [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e.o
      Building modules, stage 2.
      MODPOST 1 modules
      CC      /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e.mod.o
      LD [M]  /home/longyu/i40e_driver_for_2.6.39/i40e-2.4.6/src/i40e.ko
    make: Leaving directory `/home/longyu/linux-2.6.39/linux-2.6.39-gentoo-r3-64bit'
    

    modinfo 查看 i40e.ko 的信息

    /sbin/modinfo i40e.ko
    filename:       i40e.ko
    version:        2.4.6
    license:        GPL
    description:    Intel(R) 40-10 Gigabit Ethernet Connection Network Driver
    author:         Intel Corporation, <e1000-devel@lists.sourceforge.net>
    srcversion:     D0C8A0EE39952FD6702D35F
    alias:          pci:v00008086d0000158Bsv*sd*bc*sc*i*
    alias:          pci:v00008086d0000158Asv*sd*bc*sc*i*
    alias:          pci:v00008086d000037D3sv*sd*bc*sc*i*
    alias:          pci:v00008086d000037D2sv*sd*bc*sc*i*
    alias:          pci:v00008086d000037D1sv*sd*bc*sc*i*
    alias:          pci:v00008086d000037D0sv*sd*bc*sc*i*
    alias:          pci:v00008086d000037CFsv*sd*bc*sc*i*
    alias:          pci:v00008086d000037CEsv*sd*bc*sc*i*
    alias:          pci:v00008086d00001588sv*sd*bc*sc*i*
    alias:          pci:v00008086d00001587sv*sd*bc*sc*i*
    alias:          pci:v00008086d00001589sv*sd*bc*sc*i*
    alias:          pci:v00008086d00001586sv*sd*bc*sc*i*
    alias:          pci:v00008086d00001585sv*sd*bc*sc*i*
    alias:          pci:v00008086d00001584sv*sd*bc*sc*i*
    alias:          pci:v00008086d00001583sv*sd*bc*sc*i*
    alias:          pci:v00008086d00001581sv*sd*bc*sc*i*
    alias:          pci:v00008086d00001580sv*sd*bc*sc*i*
    alias:          pci:v00008086d00001574sv*sd*bc*sc*i*
    alias:          pci:v00008086d00001572sv*sd*bc*sc*i*
    depends:
    vermagic:       2.6.39-gentoo-r3-nsfocus SMP preempt mod_unload
    parm:           debug:Debug level (0=none,...,16=all) (int)
    
    展开全文
  • i40e驱动安装方法

    千次阅读 2019-09-26 17:35:27
    i40e-2.4.6-1-rhel6.7-2.6.32-573.el6.x86_64.rpm –Intel Xl710,X722网卡控制器驱动 (我的上传中有rpm包) 注意事项: 本目录下驱动文件仅适用于RHEL6.7初始内核版本(2.6.32-573.el6.x86_64), 安装驱动程序...

    驱动说明:
    i40e-2.4.6-1-rhel6.7-2.6.32-573.el6.x86_64.rpm
    –Intel Xl710,X722网卡控制器驱动
    在这里插入图片描述

    注意事项:
    本目录下驱动文件仅适用于RHEL6.7初始内核版本(2.6.32-573.el6.x86_64),
    安装驱动程序之前请先使用以下命令确认内核版本:
    # uname -r

    RPM包安装步骤:
    1、查看是否已安装过i40e驱动程序
    # rpm -qa | grep i40e
    2、如果已安装过i40e驱动程序,需要先将它卸载,否则直接跳至步骤3
    # rpm -e “此处输入步骤1查询到的rpm包名”
    3、安装新驱动程序
    # rpm -Uvh i40e-2.4.6-1-rhel6.7-2.6.32-573.el6.x86_64.rpm
    4、确认i40e驱动模块版本已更新
    # modinfo i40e | grep version

    展开全文
  • 2、如果已安装过i40e驱动程序,需要先将它卸载,否则直接跳至步骤3 # rpm -e “此处输入步骤1查询到的rpm包名” 3、安装新驱动程序 # rpm -Uvh i40e-2.4.6-1-rhel6.7-2.6.32-573.el6.x86_64.rpm 4、确认i40e驱动模块...
  • filename: /home/ubuntu/./netmapi40e/LINUX/i40e/i40e.ko version: 2.3.6 license: GPL description: Intel(R) 40-10 Gigabit Ethernet Connection Network Driver author: Intel Corporation, srcversion: E7FD78...
  • driver: i40e version: 2.1.14-k firmware-version: 5.04 0x800024db 0.0.0 expansion-rom-version: bus-info: 0000:05:00.0 supports-statistics: yes supports-test: yes supports-eeprom-access: yes ...

    确认驱动名称

    #ethtool -i enp5s0f0

    driver: i40e

    version: 2.1.14-k

    firmware-version: 5.04 0x800024db 0.0.0

    expansion-rom-version:

    bus-info: 0000:05:00.0

    supports-statistics: yes

    supports-test: yes

    supports-eeprom-access: yes

    supports-register-dump: yes

    supports-priv-flags: yes

    查找驱动所在的目录

    #modinfo i40e

    filename:      /lib/modules/4.13.0-16-generic/kernel/drivers/net/ethernet/intel/i40e/i40e.ko

    version:        2.1.14-k

    license:        GPL

    description:    Intel(R) Ethernet Connection XL710 Network Driver

    author:        Intel Corporation,

    srcversion:    F4615BE658BE7DED9D7D2D6

    #mkdir /opt/software

    #mv i40e-2.4.6.tar.gz /opt/software

    #cd /opt/software

    #tar zxvf i40e-2.4.6.tar.gz

    #cd /opt/software/i40e-2.4.6/src

    #make

    #make install

    生成的i40e.ko文件在下面的目录下

    /lib/modules//updates/drivers/net/ethernet/intel/i40e/i40e.ko

    OS自带的

    /lib/modules/4.13.0-16-generic/kernel/drivers/net/ethernet/intel/i40e/i40e.ko

    卸载掉OS自带的驱动

    #rmmod i40e

    安装新驱动

    #insmod /lib/modules/4.13.0-16-generic/updates/drivers/net/ethernet/intel/i40e/i40e.ko

    #update-initramfs -u

    #reboot

    重启后查看是否加载了最新的驱动

    #modinfo i40e

    filename:      /lib/modules/4.13.0-16-generic/updates/drivers/net/ethernet/intel/i40e/i40e.ko

    version:        2.4.6

    license:        GPL

    description:    Intel(R) 40-10 Gigabit Ethernet Connection Network Driver

    author:        Intel Corporation,

    srcversion:    AED7BF3F5ECA621CC4402E8

     

     

    确认i40evf所在的目录

    root@ubuntu-2:~# ethtool -i enp5s2f6

    driver: i40evf

    version: 3.0.0-k

    firmware-version: N/A

    expansion-rom-version:

    bus-info: 0000:05:02.6

    supports-statistics: yes

    supports-test: no

    supports-eeprom-access: no

    supports-register-dump: no

    supports-priv-flags: yes

    root@ubuntu-2:~# ethtool -i enp5s0f0

    driver: i40e

    version: 2.1.14-k

    firmware-version: 5.04 0x800024db 0.0.0

    expansion-rom-version:

    bus-info: 0000:05:00.0

    supports-statistics: yes

    supports-test: yes

    supports-eeprom-access: yes

    supports-register-dump: yes

    supports-priv-flags: yes

    root@ubuntu-2:~# modinfo i40evf

    filename:      /lib/modules/4.13.0-16-generic/kernel/drivers/net/ethernet/intel/i40evf/i40evf.ko

    version:        3.0.0-k

    license:        GPL

    description:    Intel(R) XL710 X710 Virtual Function Network Driver

    author:        Intel Corporation,

    srcversion:    E871E95165C6F9764D3CF01

    #cd /opt/software/i40evf-3.5.6/src

    #make

    #make install

    生成的驱动模块在

    /lib/modules/4.13.0-16-generic/updates/drivers/net/ethernet/intel/i40evf/i40evf.ko

    rmmod i40evf

    insmod /lib/modules/4.13.0-16-generic/updates/drivers/net/ethernet/intel/i40evf/i40evf.ko

    root@ubuntu-2:/opt/software/i40evf-3.5.6/src# modinfo i40evf

    filename:      /lib/modules/4.13.0-16-generic/updates/drivers/net/ethernet/intel/i40evf/i40evf.ko

    version:        3.5.6

    license:        GPL

    description:    Intel(R) 40-10 Gigabit Ethernet Virtual Function Driver

    author:        Intel Corporation,

    srcversion:    475216B834436A1FDA07063

    #update-initramfs -u

    #reboot

    重启后确认驱动

    通过生成VF让其自动载入i40evf

    #echo 8 > /sys/bus/pci/devices/0000:05:00.0/sriov_numvfs

    #modinfo i40evf

    filename:      /lib/modules/4.13.0-16-generic/updates/drivers/net/ethernet/intel/i40evf/i40evf.ko

    version:        3.5.6

    license:        GPL

    description:    Intel(R) 40-10 Gigabit Ethernet Virtual Function Driver

    author:        Intel Corporation,

    srcversion:    475216B834436A1FDA07063



    作者:严炎2016
    链接:https://www.jianshu.com/p/9f49804307f6
    来源:简书
    著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

    展开全文
  • i40e网卡驱动中的PCI-E带宽警告

    千次阅读 2019-08-08 20:36:49
    i40e驱动在总线的位宽width小于i40e_bus_width_pcie_x8(值为8),或者总线的速率小于i40e_bus_speed_8000(值为8000)时,都会打印本文开头的警告信息。 enum i40e_bus_speed { i40e_bus_speed_unknown = 0, ...

    使用的处理器为Xeon5122,4个核心,每个核心2个超线程。如下:

    / # cat /proc/cpuinfo 
    processor       : 0
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 85
    model name      : Intel(R) Xeon(R) Gold 5122 CPU @ 3.60GHz
    stepping        : 4
    microcode       : 0x2000043
    cpu MHz         : 3600.000
    cache size      : 16896 KB
    physical id     : 0
    siblings        : 8
    core id         : 1
    cpu cores       : 4
    

    在启动过程中,网卡驱动i40e打印了如下的警告信息,提示PCI-E可用的带宽有可能不能够达到最优的性能。当前的PCI-E的速率为5.0GT/s,宽度为x4。此网卡具有4个10G端口。

    [   24.878466] i40e 0000:b6:00.3: fw 4.40.35115 api 1.4 nvm 4.53 0x80001cdf 0.0.0
    [   25.202189] i40e 0000:b6:00.3: MAC address: 00:60:e0:6d:94:01
    [   25.210023] i40e 0000:b6:00.3: irq 411 for MSI/MSI-X
    [   25.215000] i40e 0000:b6:00.3: irq 412 for MSI/MSI-X
    ...
    [   25.294766] i40e 0000:b6:00.3: irq 428 for MSI/MSI-X
    [   25.398203] i40e 0000:b6:00.3: Added LAN device PF3 bus=0x00 func=0x03
    [   25.404713] i40e 0000:b6:00.3: PCI-Express: Speed 5.0GT/s Width x4
    [   25.410876] i40e 0000:b6:00.3: PCI-Express bandwidth available for this device may be insufficient for optimal performance.
    [   25.421968] i40e 0000:b6:00.3: Please move the device to a different PCI-e link with more lanes and/or higher transfer rate.
    [   25.439172] i40e 0000:b6:00.3: Features: PF-id[3] VFs: 32 VSIs: 34 QP: 8 RX: 1BUF RSS FD_ATR FD_SB NTUPLE PTP VEPA
    

    内核中的i40e_probe函数如下,以上的打印信息位于此函数的最后部分。其首先由PCI配置空间的PCI_EXP_LNKSTA中获取到协商的连接状态信息,函数i40e_set_pci_config_data负责解析连接状态信息,并且结果保存到hw->bus结构的成员width和speed中。

    static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
    {
        /* Devices on the IOSF bus do not have this information and will report PCI Gen 1 x 1 by default so don't bother checking them. */
        if (!(pf->hw_features & I40E_HW_NO_PCI_LINK_CHECK)) {
            char speed[PCI_SPEED_SIZE] = "Unknown";
            char width[PCI_WIDTH_SIZE] = "Unknown";
    
            /* Get the negotiated link width and speed from PCI config space */
            pcie_capability_read_word(pf->pdev, PCI_EXP_LNKSTA, &link_status);
    
            i40e_set_pci_config_data(hw, link_status);
    
            switch (hw->bus.speed) {
            case i40e_bus_speed_8000:
                strncpy(speed, "8.0", PCI_SPEED_SIZE); break;
            case i40e_bus_speed_5000:
                strncpy(speed, "5.0", PCI_SPEED_SIZE); break;
            case i40e_bus_speed_2500:
                strncpy(speed, "2.5", PCI_SPEED_SIZE); break;
            default:
                break;
            }
            switch (hw->bus.width) {
            case i40e_bus_width_pcie_x8:
                strncpy(width, "8", PCI_WIDTH_SIZE); break;
            case i40e_bus_width_pcie_x4:
                strncpy(width, "4", PCI_WIDTH_SIZE); break;
            case i40e_bus_width_pcie_x2:
                strncpy(width, "2", PCI_WIDTH_SIZE); break;
            case i40e_bus_width_pcie_x1:
                strncpy(width, "1", PCI_WIDTH_SIZE); break;
            default:
                break;
            }
            dev_info(&pdev->dev, "PCI-Express: Speed %sGT/s Width x%s\n", speed, width);
    
            if (hw->bus.width < i40e_bus_width_pcie_x8 || hw->bus.speed < i40e_bus_speed_8000) {
                dev_warn(&pdev->dev, "PCI-Express bandwidth available for this device may be insufficient for optimal performance      .\n");
                dev_warn(&pdev->dev, "Please move the device to a different PCI-e link with more lanes and/or higher transfer rat      e.\n");
            }
        }
    

    i40e驱动在总线的位宽width小于i40e_bus_width_pcie_x8(值为8),或者总线的速率小于i40e_bus_speed_8000(值为8000)时,都会打印本文开头的警告信息。

    enum i40e_bus_speed {
        i40e_bus_speed_unknown  = 0,
        i40e_bus_speed_33   = 33,
        i40e_bus_speed_66   = 66,
        i40e_bus_speed_100  = 100,
        i40e_bus_speed_120  = 120,
        i40e_bus_speed_133  = 133,
        i40e_bus_speed_2500 = 2500,
        i40e_bus_speed_5000 = 5000,
        i40e_bus_speed_8000 = 8000,
        i40e_bus_speed_reserved 
    };       
    
    /* PCI bus widths */
    enum i40e_bus_width {
        i40e_bus_width_unknown  = 0,
        i40e_bus_width_pcie_x1  = 1,
        i40e_bus_width_pcie_x2  = 2,
        i40e_bus_width_pcie_x4  = 4,
        i40e_bus_width_pcie_x8  = 8,
    

    wikipedia网站上对PCI Express的带宽介绍,如下图。

    在这里插入图片描述

    如果速率为:5.0GT/s, 位宽为: x4,得到的吞吐量为2.0 GB/s,单位是字节Byte,转换为网络吞吐为20Gbit/s。只能满足2个10G网口的最大吞吐,满足不了另外的两个10G网口的需求。

    展开全文
  • 更新i40e网卡驱动程序

    千次阅读 2019-11-24 11:08:50
    下载最新驱动 ... 执行: yum install kernel kernel-headers kernel-devel...
  • 下面是具体的升级方案与测试过程: 替换 /lib/modules/xx 下的 i40e.ko.xz 文件 重启宿主机后发现仍旧用的是旧的 i40e 驱动,确认内核的 config 文件中 i40e 是配置为了模块,那看来应该是 initrd 中加载的。...
  • 注意事项: 本目录下驱动文件仅适用于RHEL6.7初始内核版本(2.6.32-573.el6.x86_64), 安装驱动程序之前请先使用以下命令确认内核版本: # uname -r
  • 82599ES # ethtool -i ens driver: ixgbe version: 5.1.0-k-rh7.7 firmware-version: 0x80000835, 1.1446.0 expansion-rom-version: bus-info: 0000:81:00.1 supports-statistics: yes supports-test: yes ...
  • 经过同事指点,发现了I40E网卡驱动(版本号2.0.30)一处BUG,在i40e_clean_rx_irq函数里,如下标红地方: 1 static int i40e_clean_rx_irq( struct i40e_ring *rx_ring, int budget) 2 { 3 ...
  • IntelX722网卡最新驱动下载,已经验证过,通过rpm -ivh XX.rpm安装即可,不需要依赖包
  • X710网卡链路状态控制

    2020-12-06 19:49:06
    驱动版本i40e-2.10.19.82,在ifconfig将网口down的时候,发现链路并没有断开,网卡的指示灯还是亮的。如下为控制网卡shutdown的函数: /** * i40e_down - Shutdown the connection processing * @vsi: the VSI ...
  • intel i40e firmware update tool。 用来升级intel X710 XL710 XVV722网卡。

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 640
精华内容 256
关键字:

i40e