DPDK usage discussions
 help / color / mirror / Atom feed
From: lgy <lgy.bupt@gmail.com>
To: users@dpdk.org
Subject: [dpdk-users] Using ivshmem
Date: Fri, 1 Jul 2016 16:18:32 -0700	[thread overview]
Message-ID: <CA+BCu2-YeN1xFnvWaZxj4rTbeWB+5XjMEhk+3onpiSzNOvLSFQ@mail.gmail.com> (raw)

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!

                 reply	other threads:[~2016-07-01 23:18 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=CA+BCu2-YeN1xFnvWaZxj4rTbeWB+5XjMEhk+3onpiSzNOvLSFQ@mail.gmail.com \
    --to=lgy.bupt@gmail.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).