IP addresses are not required to set. Did you cross check the log-file of OVS, whether started successfully on the PF.
On Wed, Sep 18, 2019, 7:25 PM Derek <[email protected]> wrote: > Hi, Madhukar > > The io forwarding mode is set. > One question is > when using pktgen generates packets to the host, in addition to the vlan > id and mac, does it need to set the IP of source NIC and dst NIC? > > Thanks, > Derek > > madhukar mythri <[email protected]> 於 2019年9月18日 週三 下午5:00寫道: > >> Did you configured the testpmd with "io" forwarding mode? >> you can cross-check with this command: "show config rxtx". >> For more information, you can go-through this testpmd documentation under >> "4.4.7" section: >> https://doc.dpdk.org/guides/testpmd_app_ug/testpmd_funcs.html >> >> ~~ Madhukar. >> >> On Wed, Sep 18, 2019 at 9:39 AM Derek <[email protected]> wrote: >> >>> Hi, >>> >>> I try to run the vhost example in DPDK. >>> >>> The steps I did are: >>> >>> (1) The guest vm created by QEMU using the shell script >>> #!/bin/bash >>> >>> USER_SOCK="/tmp/sock0" >>> MPATH="/dev/hugepages" >>> MEMSZ=2048 >>> IMG=/home/derek/ubuntu-guest.img >>> >>> qemu-system-x86_64 \ >>> -boot c \ >>> -machine accel=kvm -cpu host \ >>> -m ${MEMSZ} -object >>> >>> memory-backend-file,id=hugemem,size=${MEMSZ}M,mem-path=/dev/hugepages,share=on >>> \ >>> -mem-prealloc -smp 2 -numa node,memdev=hugemem \ >>> -chardev socket,id=char1,path=/tmp/sock0,server \ >>> -netdev type=vhost-user,id=hostnet1,chardev=char1 \ >>> -device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:00:00:14 \ >>> -drive format=raw,file=${IMG} -vnc :4,password -monitor stdio >>> >>> (2) run the vhost-switch on the host >>> #> ./build/vhost-switch -l 0-3 -n 4--2 uge-dir /dev/hugepages >>> --socket-mem >>> 1024 --log-level 8 -w 00000:73:00.1 -- --socket-file /tmp/sock0 --client >>> -p >>> 0x1 --stats 20 >>> >>> (3) The guest vm is started successfully. Then, in the guest vm i did >>> #> ./x86_64-native-gcc/app/testpmd -l 0-1 -- -i >>> > start tx_first >>> >>> I can see the TX packets on the host's vhost-switch stats and got the >>> message >>> VHOST_DATA: (0) mac 52:54:00:00:00:14 and vlan 1000 registered >>> >>> Device statistics ================================= >>> Statistics for device 0 >>> ----------------------- >>> TX total: 32 >>> TX dropped: 0 >>> TX successful: 32 >>> RX total: 0 >>> RX dropped: 0 >>> RX successful: 0 >>> =================================================== >>> >>> >>> My question is that how can I inject packets to the MAC address and VLAN >>> ID >>> 1000. >>> I've tried to setup a pktgen on another host whose physical NIC is >>> directly >>> connected to the physical NIC port of the host. Then, set pktgen's dst >>> mac >>> to 52:54:00:00:00:14 and vlan id to 1000. But the "Device statistics" is >>> not changed. >>> >>> Any idea for this problem? Very thanks. >>> >>
