zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    嵌入式驱动开发之sensor---sensor 图形传感器调试
    时下世界上最先进的液晶面板技术---ips
    多媒体开发之rtp 打包发流---udp 丢包问题
    多媒体开发之rtp 打包发流---同网段其他机子sdp 播放不了
    AutoCAD LoadLibrary Failed with error 126 Message
    OpenCV获取与设置像素点的值的几个方法
    四元数与旋转
    圆点博士小四轴主程序状态机结构
    四元数(Quaternion)和旋转 +欧拉角
    PID控制算法
  • 原文地址:https://www.cnblogs.com/qq952693358/p/7586165.html
Copyright © 2011-2022 走看看