DPDK usage discussions
 help / color / mirror / Atom feed
From: David Christensen <drc@linux.vnet.ibm.com>
To: users@dpdk.org
Subject: [dpdk-users] Incorrect Link State with DPDK 18.11.1 and vhost PMD
Date: Tue, 7 May 2019 13:13:53 -0700	[thread overview]
Message-ID: <00cb7a91-d02c-b6f2-6897-a3ff0f5fc693@linux.vnet.ibm.com> (raw)

I'm attempting to send traffic between host and guest using testpmd. 
Using the vhost PMD on the host side and the virtio PMD with vhost 
backend on the guest side.

I can successfully send traffic from the host to the guest (i.e. host 
has --forward-mode=txonly and guest has --forward-mode=rxonly)but I'm 
unable to send traffic in the opposite direction.

After further investigation I discovered that the host ports show link 
UP while the guest ports show link DOWN.  So the behavior makes sense, 
only the ports where link is UP are able to send traffic, but I don't 
understand why that might be the case.  I've also discovered that the 
testpmd commands for changing link state don't work (i.e. the command 
"set link-up port 0" fails in the guest and the command "set link-down 
port 0" fails in the host).

Has anyone encountered this situation or have experience in running this 
particular configuration?  My testpmd command line parameters for both 
are shown below, along with the qemu parameters used by the guest.

Dave

Host:
$ sudo 
/home/dave/src/p9-dpdk-perf/dpdk/ppc_64-power8-linuxapp-gcc/app/testpmd 
--vdev 'net_vhost1,queues=4,iface=/tmp/vhost-sock1' --vdev 
'net_vhost2,queues=4,iface=/tmp/vhost-sock2' -b 0000:01:00.0 -b 
0000:01:00.1 -l 8,16-23 -n 4 -- --portmask=0x3 --rxq=4 --rxd=1024 
--txq=4 --txd=4096 --nb-cores=8 -i --numa --forward-mode=rxonly

Guest:
/home/dave/src/p9-dpdk-perf/dpdk/ppc_64-power8-linuxapp-gcc/app/testpmd 
-w 00:08.0 -w 00:09.0 -l 4,8-15 -n 4 -- --rxq=4 --rxd=1024 --txq=4 
--txd=4096 --nb-cores=8 -i --forward-mode=txonly

Qemu:
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin 
QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -name 
guest=rhel7.6-alt,debug-threads=on -S -object 
secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-22-rhel7.6-alt/master-key.aes 
-machine pseries-rhel7.6.0,accel=kvm,usb=off,dump-guest-core=off -cpu 
host -m 32768 -realtime mlock=off -smp 24,sockets=1,cores=24,threads=1 
-object 
memory-backend-file,id=ram-node0,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu/22-rhel7.6-alt,share=yes,size=34359738368 
-numa node,nodeid=0,cpus=0-23,memdev=ram-node0 -uuid 
081f2381-716d-40b9-8b48-2c05626c9f54 -no-user-config -nodefaults 
-chardev socket,id=charmonitor,fd=24,server,nowait -mon 
chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown 
-boot menu=on,strict=on -device qemu-xhci,id=usb,bus=pci.0,addr=0x3 
-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x2 -device 
virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 -drive 
file=/home/davec/images/rhel7.6.qcow2,format=qcow2,if=none,id=drive-virtio-disk0,cache=writeback 
-device 
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=2,write-cache=on 
-drive if=none,id=drive-scsi0-0-0-0,readonly=on -device 
scsi-cd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 
-netdev tap,fd=26,id=hostnet0,vhost=on,vhostfd=27 -device 
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:8f:e8:8b,bus=pci.0,addr=0x1 
-chardev socket,id=charnet1,path=/tmp/vhost-sock1 -netdev 
vhost-user,chardev=charnet1,queues=4,id=hostnet1 -device 
virtio-net-pci,mq=on,vectors=10,rx_queue_size=256,netdev=hostnet1,id=net1,mac=52:54:00:2a:9f:eb,bus=pci.0,addr=0x8 
-chardev socket,id=charnet2,path=/tmp/vhost-sock2 -netdev 
vhost-user,chardev=charnet2,queues=4,id=hostnet2 -device 
virtio-net-pci,mq=on,vectors=10,rx_queue_size=256,netdev=hostnet2,id=net2,mac=52:54:00:4c:83:a2,bus=pci.0,addr=0x9 
-chardev pty,id=charserial0 -device 
spapr-vty,chardev=charserial0,id=serial0,reg=0x30000000 -chardev 
socket,id=charchannel0,fd=28,server,nowait -device 
virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 
-device usb-kbd,id=input0,bus=usb.0,port=1 -device 
usb-mouse,id=input1,bus=usb.0,port=2 -vnc 127.0.0.1:0 -device 
VGA,id=video0,vgamem_mb=16,bus=pci.0,addr=0x7 -device 
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -sandbox 
on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny 
-msg timestamp=on


                 reply	other threads:[~2019-05-07 20:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00cb7a91-d02c-b6f2-6897-a3ff0f5fc693@linux.vnet.ibm.com \
    --to=drc@linux.vnet.ibm.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).