From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 61F8295BF for ; Fri, 8 Jan 2016 09:13:11 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP; 08 Jan 2016 00:13:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,537,1444719600"; d="scan'208";a="888941189" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 08 Jan 2016 00:12:59 -0800 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u088CuIe019970; Fri, 8 Jan 2016 16:12:56 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u088Crgj029573; Fri, 8 Jan 2016 16:12:55 +0800 Received: (from jingguox@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u088CrWC029569; Fri, 8 Jan 2016 16:12:53 +0800 From: Jingguo Fu To: dts@dpdk.org Date: Fri, 8 Jan 2016 16:12:45 +0800 Message-Id: <1452240766-29525-3-git-send-email-jingguox.fu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1452240766-29525-1-git-send-email-jingguox.fu@intel.com> References: <1452240766-29525-1-git-send-email-jingguox.fu@intel.com> Cc: Jingguo Fu Subject: [dts] [DTS][PATCH V2 3/4] virt: qemu kvm init for two vms scenario X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2016 08:13:11 -0000 Signed-off-by: Jingguo Fu --- 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