设为首页 收藏本站
查看: 1459|回复: 0

[经验分享] [dpdk] 熟悉SDK与初步使用 (一)(qemu搭建实验环境)

[复制链接]

尚未签到

发表于 2017-6-25 06:43:11 | 显示全部楼层 |阅读模式
  搭建实验环境:
  troubleshoot
  第一步加载驱动
  第二步切换驱动
  使用了所有qemu支持的卡



[tong@T7:~/VM/dpdk]
% cat start.sh
sudo qemu-system-x86_64 -nographic -vnc 127.0.0.1:1 -enable-kvm \
-m 2G -cpu Nehalem -smp cores=2,threads=2,sockets=2 \
-numa node,mem=1G,cpus=0-3,nodeid=0 \
-numa node,mem=1G,cpus=4-7,nodeid=1 \
-drive file=disk.img,if=virtio \
-net nic,vlan=0,model=virtio,macaddr='00:00:00:01:00:00' \
-net nic,vlan=1,model=ne2k_pci,macaddr='00:00:00:01:00:01' \
-net nic,vlan=2,model=i82551,macaddr='00:00:00:01:00:02' \
-net nic,vlan=2,model=i82557b,macaddr='00:00:00:01:00:03' \
-net nic,vlan=2,model=i82559er,macaddr='00:00:00:01:00:04' \
-net nic,vlan=2,model=rtl8139,macaddr='00:00:00:01:00:05' \
-net nic,vlan=2,model=e1000,macaddr='00:00:00:01:00:06' \
-net nic,vlan=2,model=pcnet,macaddr='00:00:00:01:00:07' \
-net tap,vlan=0,ifname=tap-dpdk-control \
-net tap,vlan=1,ifname=tap-dpdk-1,script=no,downscript=no \
-net tap,vlan=2,ifname=tap-dpdk-2,script=no,downscript=no &
#       -device vfio-pci,host='0000:00:19.0' \
#ne2k_pci,i82551,i82557b,i82559er,rtl8139,e1000,pcnet,virtio
[tong@T7:~/VM/dpdk]
  只有virtio是对队列的



[iyunv@dpdk ~]# lspci -vv |grep -E '^00|MSI'
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] (prog-if 80 [Master])
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 VGA compatible controller: Device 1234:1111 (rev 02) (prog-if 00 [VGA controller])
00:03.0 Ethernet controller: Red Hat, Inc Virtio network device
Capabilities: [98] MSI-X: Enable+ Count=3 Masked-
00:04.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8029(AS)
00:05.0 Ethernet controller: Intel Corporation 8255xER/82551IT Fast Ethernet Controller (rev 0f)
00:06.0 Ethernet controller: Intel Corporation 82557/8/9/0/1 Ethernet Pro 100 (rev 02)
00:07.0 Ethernet controller: Intel Corporation 8255xER/82551IT Fast Ethernet Controller (rev 09)
00:08.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8100/8101L/8139 PCI Fast Ethernet Adapter (rev 20)
00:09.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 03)
00:0a.0 Ethernet controller: Advanced Micro Devices, Inc. [AMD] 79c970 [PCnet32 LANCE] (rev 10)
00:0b.0 SCSI storage controller: Red Hat, Inc Virtio block device
Capabilities: [98] MSI-X: Enable+ Count=2 Masked-
[iyunv@dpdk ~]#
  xxx



[iyunv@dpdk tools]# ./dpdk-devbind.py -b igb_uio eth1
[iyunv@dpdk tools]# ./dpdk-devbind.py -b igb_uio eth2
[iyunv@dpdk tools]# ./dpdk-devbind.py -s
Network devices using DPDK-compatible driver
============================================
0000:00:04.0 'Virtio network device' drv=igb_uio unused=
0000:00:05.0 'Virtio network device' drv=igb_uio unused=
Network devices using kernel driver
===================================
0000:00:03.0 'Virtio network device' if=eth0 drv=virtio-pci unused=igb_uio *Active*
Other network devices
=====================
<none>
[iyunv@dpdk tools]#
  qemu的所有nic都可以使用uio



[iyunv@dpdk tools]# ./dpdk-devbind.py -s
Network devices using DPDK-compatible driver
============================================
<none>
Network devices using kernel driver
===================================
0000:00:03.0 'Virtio network device' if=eth0 drv=virtio-pci unused=igb_uio *Active*
0000:00:08.0 'RTL-8100/8101L/8139 PCI Fast Ethernet Adapter' if=ens8 drv=8139cp unused=igb_uio
0000:00:09.0 '82540EM Gigabit Ethernet Controller' if=ens9 drv=e1000 unused=igb_uio
Other network devices
=====================
0000:00:04.0 'RTL-8029(AS)' unused=igb_uio
0000:00:05.0 '8255xER/82551IT Fast Ethernet Controller' unused=igb_uio
0000:00:06.0 '82557/8/9/0/1 Ethernet Pro 100' unused=igb_uio
0000:00:07.0 '8255xER/82551IT Fast Ethernet Controller' unused=igb_uio
0000:00:0a.0 '79c970 [PCnet32 LANCE]' unused=igb_uio
[iyunv@dpdk tools]#

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-387792-1-1.html 上篇帖子: linux系统下对网站实施负载均衡+高可用集群需要考虑的几点 下篇帖子: 《CDN技术详解》
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表