All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: wang.yong19@zte.com.cn
Cc: dev@dpdk.org
Subject: Re: examples/vhost: how to use vhost-switch between VMs? Anybody who can help?
Date: Tue, 27 Dec 2016 14:00:37 +0800	[thread overview]
Message-ID: <20161227060037.GA21789@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <OFD1256FEB.A164AEF1-ON48258096.001DA07F-48258096.001E7E6E@zte.com.cn>

On Tue, Dec 27, 2016 at 01:33:14PM +0800, wang.yong19@zte.com.cn wrote:
>   There are some descriptions in 
> dpdk-16.11\doc\guides\sample_app_ug\vhost.rst,
> "The sample application performs simple packet switching between virtual 
> machines based on Media Access Control (MAC) address or Virtual Local Area 
> 
> Network (VLAN) tag." So, we want to use vhost-switch between two VMs, one 
> work as server and another as client.
>   We runned the vhost-switch sample in a VM with three virtio ports. 
> First, we 
> binded one virtio port to igb_uio. Then we runned the command
> "./vhost-switch -c f -n 4 --socket-mem 1024 -- --socket-file /tmp/sock0 
> ?C-vm2vm 1 ?C-dequeue-zero-copy"
> And then error occured. We found that the 'dev_info.max_vmdq_pools' of the 
> virtio
> port was 0, and division by zero error occured at the statement 
> 'queues_per_pool = dev_info.vmdq_queue_num / dev_info.max_vmdq_pools;'
> We fixed this by assigning 'queues_per_pool' to 0 if 
> 'dev_info.max_vmdq_pools'
> was 0, but there were still other errors when running vhost-switch. 
>   After we fixed all the errors while running vhost-switch as server, we 
> didn't
> know how to run the vhost-switch as client in another VM, how could the 

vhost-switch runs on the host but not guest, and there is no such thing
like "vhost-switch as client". Just think it's (pretty simple) switch,
that could link VMs together.

If you are interested in DPDK virtio PMD, we normally run testpmd inside
the guest. If not, you could just use the virtio-net driver from the
linux kernel, whereas you normally should set the IP address manually.

	--yliu

> client 
> get the socket, the netdev and the virtio port that the server 
> vhost-switch 
> created?
>   So, we doubted whether we use the vhost-switch in a wrong way. Could you
> please give us some advice that how to use the vhost-switch between two or 
> more
>  VMs?
>   Anybody who can help us with this?
> 

      reply	other threads:[~2016-12-27  5:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-27  5:33 examples/vhost: how to use vhost-switch between VMs? Anybody who can help? wang.yong19
2016-12-27  6:00 ` Yuanhan Liu [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=20161227060037.GA21789@yliu-dev.sh.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=dev@dpdk.org \
    --cc=wang.yong19@zte.com.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.