DPDK usage discussions
 help / color / mirror / Atom feed
From: madhukar mythri <madhukar.mythri@gmail.com>
To: Derek <jwsu1986@gmail.com>
Cc: users@dpdk.org
Subject: Re: [dpdk-users] Usage of example vhost (vhost-switch)
Date: Wed, 18 Sep 2019 22:23:09 +0530	[thread overview]
Message-ID: <CAAUNki10qsoOxB0MzFUAtT1W61PcJXABpeRBmT=RU6jzmej99w@mail.gmail.com> (raw)
In-Reply-To: <CAFKS8hUtAv66JwivT0Ahu2t=vXGWqT5yTRay6o0DaJfFUpk=Kg@mail.gmail.com>

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 <jwsu1986@gmail.com> 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 <madhukar.mythri@gmail.com> 於 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 <jwsu1986@gmail.com> 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.
>>>
>>

      reply	other threads:[~2019-09-18 16:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18  4:09 Derek
2019-09-18  9:00 ` madhukar mythri
2019-09-18 13:55   ` Derek
2019-09-18 16:53     ` madhukar mythri [this message]

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='CAAUNki10qsoOxB0MzFUAtT1W61PcJXABpeRBmT=RU6jzmej99w@mail.gmail.com' \
    --to=madhukar.mythri@gmail.com \
    --cc=jwsu1986@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).