DPDK 網卡綁定和解綁


參考:

DPDK 網卡綁定和解綁

注意: 建議不要使用本文的eth0網卡綁定dpdk驅動.

1.進入DPDK目錄:

$ cd dpdk/tools/

2.查看網卡信息:

$ ./dpdk-devbind.py --status
Network devices using DPDK-compatible driver
============================================
<none>

Network devices using kernel driver
===================================
0000:00:1f.6 'Ethernet Connection (2) I219-LM' if=eth0 drv=e1000e unused=igb_uio 

Other network devices
=====================
<none>

Crypto devices using DPDK-compatible driver
===========================================
<none>

Crypto devices using kernel driver
==================================
<none>

Other crypto devices
====================
<none>

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
===================================
<none>

Other network devices
=====================
<none>

Crypto devices using DPDK-compatible driver
===========================================
<none>

Crypto devices using kernel driver
==================================
<none>

Other crypto devices
====================
<none>

5.解綁eth0:

$ ./dpdk-devbind.py -u 00:1f.6

查看驅動信息, 此時網卡已經與dpdk驅動解綁:

Network devices using DPDK-compatible driver
============================================
<none>

Network devices using kernel driver
===================================
<none>

Other network devices
=====================
0000:00:1f.6 'Ethernet Connection (2) I219-LM' unused=igb_uio

Crypto devices using DPDK-compatible driver
===========================================
<none>

Crypto devices using kernel driver
==================================
<none>

Other crypto devices
====================
<none>

如果需要重新將eth0綁定回kernel driver, 執行reboot即可:

$ reboot

2017.9


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM