参考:
DPDK 网卡绑定和解绑
注意: 建议不要使用本文的eth0网卡绑定dpdk驱动.
1.进入DPDK目录:
$ cd dpdk/tools/
2.查看网卡信息:
$ ./dpdk-devbind.py --status
Network devices using DPDK-compatible driver============================================Network devices using kernel driver===================================0000:00:1f.6 'Ethernet Connection (2) I219-LM' if=eth0 drv=e1000e unused=igb_uio Other network devices===================== Crypto devices using DPDK-compatible driver=========================================== Crypto devices using kernel driver================================== Other crypto devices====================
3.绑定eth0网卡到dpdk到驱动:
$ ./dpdk-devbind.py --bind=igb_uio 00:1f.6
4.再次查看网卡状态, 发现该网卡已经绑定到dpdk驱动:
Network devices using DPDK-compatible driver============================================0000:00:1f.6 'Ethernet Connection (2) I219-LM' drv=igb_uio unused=Network devices using kernel driver===================================Other network devices===================== Crypto devices using DPDK-compatible driver=========================================== Crypto devices using kernel driver================================== Other crypto devices====================
5.解绑eth0:
$ ./dpdk-devbind.py -u 00:1f.6
查看驱动信息, 此时网卡已经与dpdk驱动解绑:
Network devices using DPDK-compatible driver============================================Network devices using kernel driver=================================== Other network devices=====================0000:00:1f.6 'Ethernet Connection (2) I219-LM' unused=igb_uioCrypto devices using DPDK-compatible driver=========================================== Crypto devices using kernel driver================================== Other crypto devices====================
如果需要重新将eth0绑定回kernel driver, 执行reboot即可:
$ reboot
2017.9