[dpdk-users] Using ivshmem

lgy lgy.bupt at gmail.com
Sat Jul 2 01:18:32 CEST 2016


Hi,

I'm trying to use IVSHEMEM library to forward packets between two VMs and
I'm using pci-passthrough to avoid involving host.

I run l2fwd-ivshmem host.c example code to generate ivshmem metadata on the
host, then I pass the metadata and hugepages into VM using patched qemu.

In the VM, I modify l2fwd-ivshmem guest.c code to lookup shared mbuf pool
and receive packets from NIC port directly. However, I dump mbuf and the
pktlen is right but all packets data are 0. I am not sure why NIC can't
write into packet data.

Below is the command I use:
sudo ./qemu-mem -enable-kvm -cpu host -smp 12,sockets=2,cores=6,threads=1
-m 4096 -mem-path /dev/hugepages -mem-prealloc -hda test-vm/vm.qcow2
-device e1000,netdev=tap0,mac=0a:0b:0c:11:12:13 -netdev tap,id=tap0 -device
vfio-pci,host=0000:03:00.0 -device
ivshmem,size=32M,shm=fd:/dev/hugepages/rtemap_3:0x2c00000:0x1600000:/dev/hugepages/rtemap_6:0x0:0x200000:/dev/zero:0x0:0x7fc000:/var/run/.dpdk_ivshmem_metadata_l2fwd_ivshmem:0x0:0x4000

Thanks!


More information about the users mailing list