From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by dpdk.org (Postfix, from userid 33) id B60B3AAC5; Fri, 27 Apr 2018 22:03:47 +0200 (CEST) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Fri, 27 Apr 2018 20:03:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: ethdev X-Bugzilla-Version: 18.02 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gregory.shimansky@intel.com X-Bugzilla-Status: CONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://dpdk.org/tracker/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 29] pktgen hangs when it tries to send packets through libvirt driver, works for all other drivers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2018 20:03:47 -0000 https://dpdk.org/tracker/show_bug.cgi?id=3D29 Bug ID: 29 Summary: pktgen hangs when it tries to send packets through libvirt driver, works for all other drivers Product: DPDK Version: 18.02 Hardware: x86 OS: Linux Status: CONFIRMED Severity: normal Priority: Normal Component: ethdev Assignee: dev@dpdk.org Reporter: gregory.shimansky@intel.com Target Milestone: --- Created attachment 6 --> https://dpdk.org/tracker/attachment.cgi?id=3D6&action=3Dedit Vagrantfile and scripts to create test VMs This is a bug we encounter in NFF-Go project when we try to use pktgen in t= wo VMs connected directly through internal network. On Qemu/KVM we use UDP tun= nel for internal networks connection, on VirtualBox we use VB internal network. I attached Vagrantfile and scripts.sh which we use in our project to setup = VMs. You need vagrant version 2.0.x to use this Vagrantfile and a reload plugin = for it. Install it with command "vagrant plugin install vagrant-reload". If you connect to internet through a proxy, also install a vagrant-proxyconf plugin with "vagrant plugin install vagrant-proxyconf". To use libvirt provisioner it is also important to install vagrant-libvirt plugin ("vagrant plugin install vagrant-libvirt") because otherwise Virtual= Box is used to create VMs. For libvirt we also use "images" storage pool because default location is often too small to hold all of the VM images. If you do= n't need it, comment line 37 in Vagrantfile. Otherwise it is necessary to creat= e it with the following commands virsh pool-define-as images dir --target /localdisk/libvirt virsh pool-start images After setting up you can created VMs with command "vagrant up --provider=3Dlibvirt". It creates and provisions two VMs, downloads and bui= lds NFF-Go project which also includes DPDK 18.02 and pktgen 3.4.9. If you used VirtualBox it is necessary to manually change type of NICs 2 and 3 from Int= el to virtio. When VMs are created, use "vagrant ssh" to access both of them. There is a predefined bash function "bindports" which binds two ports which are connec= ted to each other on these VMs to DPDK igb_uio driver. There is also a function "runpktgen" bash function to start pktgen for ports 0 and 1. When pktgen is started, try to use command "start 0" and "start 1". It star= ts sending packets but only for a very brief period of time. Quickly it stops sending packets and only restarting the program allows it to send some more packets and hang again. This behavior happens only for virtio driver and pk= tgen author claims that the cause of the problem is in it https://github.com/pktgen/Pktgen-DPDK/issues/148#issuecomment-380972000 If you don't want to deal with vagrant, here are two Qemu command lines that vagrant starts for these two VMs: libvirt+ 28402 1 4 12:44 ? 00:06:03 /usr/bin/qemu-system-x86_64 -name guest=3Dtests_fedora-1,debug-threads=3Don -S -object secret,id=3DmasterKey0,format=3Draw,file=3D/var/lib/libvirt/qemu/domain-61-= tests_fedora-1/master-key.aes -machine pc-i440fx-bionic,accel=3Dkvm,usb=3Doff,dump-guest-core=3Doff -cpu Haswell-noTSX,vme=3Don,ss=3Don,vmx=3Don,f16c=3Don,rdrand=3Don,hypervisor=3D= on,arat=3Don,tsc_adjust=3Don,xsaveopt=3Don,pdpe1gb=3Don,abm=3Don -m 4096 -realtime mlock=3Doff -smp 8,sockets=3D8,cores=3D1,threads=3D1 -uuid 9cb78faf-9894-4fef-8833-8416689163cb -no-user-config -nodefaults -chardev socket,id=3Dcharmonitor,path=3D/var/lib/libvirt/qemu/domain-61-tests_fedora= -1/monitor.sock,server,nowait -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol -rtc base=3Dutc -no-= shutdown -boot strict=3Don -device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x= 2 -drive file=3D/localdisk/libvirt/tests_fedora-1.img,format=3Dqcow2,if=3Dnone,id=3D= drive-virtio-disk0 -device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x3,drive=3Ddrive-virtio-disk0= ,id=3Dvirtio-disk0,bootindex=3D1 -netdev tap,fd=3D33,id=3Dhostnet0,vhost=3Don,vhostfd=3D35 -device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:b8:95:7f,bus=3Dpc= i.0,addr=3D0x5 -netdev socket,udp=3D127.0.0.1:44403,localaddr=3D127.0.0.1:44409,id=3Dhostn= et1 -device virtio-net-pci,netdev=3Dhostnet1,id=3Dnet1,mac=3D3c:fd:fe:a4:dd:f0,bus=3Dpc= i.0,addr=3D0x6 -netdev socket,udp=3D127.0.0.1:44404,localaddr=3D127.0.0.1:44410,id=3Dhostn= et2 -device virtio-net-pci,netdev=3Dhostnet2,id=3Dnet2,mac=3D52:54:00:3b:d5:7d,bus=3Dpc= i.0,addr=3D0x7 -chardev pty,id=3Dcharserial0 -device isa-serial,chardev=3Dcharserial0,id= =3Dserial0 -vnc 127.0.0.1:7 -k en-us -device cirrus-vga,id=3Dvideo0,bus=3Dpci.0,addr= =3D0x2 -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x4 -msg timest= amp=3Don libvirt+ 36753 1 4 12:47 ? 00:05:39 /usr/bin/qemu-system-x86_64 -name guest=3Dtests_fedora-0,debug-threads=3Don -S -object secret,id=3DmasterKey0,format=3Draw,file=3D/var/lib/libvirt/qemu/domain-62-= tests_fedora-0/master-key.aes -machine pc-i440fx-bionic,accel=3Dkvm,usb=3Doff,dump-guest-core=3Doff -cpu Haswell-noTSX,vme=3Don,ss=3Don,vmx=3Don,f16c=3Don,rdrand=3Don,hypervisor=3D= on,arat=3Don,tsc_adjust=3Don,xsaveopt=3Don,pdpe1gb=3Don,abm=3Don -m 4096 -realtime mlock=3Doff -smp 8,sockets=3D8,cores=3D1,threads=3D1 -uuid 1e2c2002-d1e3-4985-a403-254762fbf30d -no-user-config -nodefaults -chardev socket,id=3Dcharmonitor,path=3D/var/lib/libvirt/qemu/domain-62-tests_fedora= -0/monitor.sock,server,nowait -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol -rtc base=3Dutc -no-= shutdown -boot strict=3Don -device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x= 2 -drive file=3D/localdisk/libvirt/tests_fedora-0.img,format=3Dqcow2,if=3Dnone,id=3D= drive-virtio-disk0 -device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x3,drive=3Ddrive-virtio-disk0= ,id=3Dvirtio-disk0,bootindex=3D1 -netdev tap,fd=3D30,id=3Dhostnet0,vhost=3Don,vhostfd=3D35 -device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:26:6a:fb,bus=3Dpc= i.0,addr=3D0x5 -netdev socket,udp=3D127.0.0.1:44409,localaddr=3D127.0.0.1:44403,id=3Dhostn= et1 -device virtio-net-pci,netdev=3Dhostnet1,id=3Dnet1,mac=3D52:54:00:d5:31:ca,bus=3Dpc= i.0,addr=3D0x6 -netdev socket,udp=3D127.0.0.1:44410,localaddr=3D127.0.0.1:44404,id=3Dhostn= et2 -device virtio-net-pci,netdev=3Dhostnet2,id=3Dnet2,mac=3D52:54:00:f7:b9:48,bus=3Dpc= i.0,addr=3D0x7 -chardev pty,id=3Dcharserial0 -device isa-serial,chardev=3Dcharserial0,id= =3Dserial0 -vnc 127.0.0.1:6 -k en-us -device cirrus-vga,id=3Dvideo0,bus=3Dpci.0,addr= =3D0x2 -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x4 -msg timest= amp=3Don --=20 You are receiving this mail because: You are the assignee for the bug.=