确认驱动名称
#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