test suite reviews and discussions
 help / color / mirror / Atom feed
From: Jingguo Fu <jingguox.fu@intel.com>
To: dts@dpdk.org
Cc: Jingguo Fu <jingguox.fu@intel.com>
Subject: [dts] [DTS][PATCH 3/4] virt: qemu kvm init for two vms scenario
Date: Wed, 23 Dec 2015 18:04:21 +0800	[thread overview]
Message-ID: <1450865062-4730-3-git-send-email-jingguox.fu@intel.com> (raw)
In-Reply-To: <1450865062-4730-1-git-send-email-jingguox.fu@intel.com>

Signed-off-by: Jingguo Fu <jingguox.fu@intel.com>
---
 framework/qemu_kvm.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py
index fd4be20..70730e2 100644
--- a/framework/qemu_kvm.py
+++ b/framework/qemu_kvm.py
@@ -602,8 +602,7 @@ class QEMUKvm(VirtBase):
         """
         separator = ','
         # chardev parameter
-        if 'opt_path' in options.keys() and \
-                options['opt_path']:
+        if 'opt_path' in options.keys() and options['opt_path']:
             dev_boot_line = '-chardev socket'
             char_id = 'char%d' % self.char_idx
             dev_boot_line += separator + 'id=%s' % char_id + separator + 'path=%s' % options['opt_path']
@@ -629,9 +628,12 @@ class QEMUKvm(VirtBase):
         """
         separator = ','
         dev_boot_line = '-netdev tap'
-        cuse_id = 'vhost%d' % self.cuse_id
+        if 'opt_tap' in options.keys():
+            cuse_id = options['opt_tap']
+        else:
+            cuse_id = 'vhost%d' % self.cuse_id
+            self.cuse_id += 1
         dev_boot_line += separator + 'id=%s' % cuse_id + separator + 'ifname=tap_%s' % cuse_id + separator + "vhost=on" + separator + "script=no"
-        self.cuse_id += 1
         self.__add_boot_line(dev_boot_line)
         # device parameter
         opts = {'opt_netdev': '%s' % cuse_id,
-- 
2.1.0

  parent reply	other threads:[~2015-12-23 10:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-23 10:04 [dts] [DTS][PATCH 1/4] virt: dpdk vhost plus virtio iperf config Jingguo Fu
2015-12-23 10:04 ` [dts] [DTS][PATCH 2/4] virt: add copy file from virt guest Jingguo Fu
2015-12-23 10:04 ` Jingguo Fu [this message]
2015-12-23 10:04 ` [dts] [DTS][PATCH 4/4] virt: add dpdk vhost virtio iperf test cases Jingguo Fu
2016-01-07  2:59   ` Xu, Qian Q
2016-01-14  2:45     ` Fu, JingguoX
2016-01-14  2:49       ` Xu, Qian Q

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=1450865062-4730-3-git-send-email-jingguox.fu@intel.com \
    --to=jingguox.fu@intel.com \
    --cc=dts@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).