From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 00FBE36E for ; Fri, 16 Dec 2016 08:53:58 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP; 15 Dec 2016 23:53:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,356,1477983600"; d="scan'208";a="1072716017" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by orsmga001.jf.intel.com with ESMTP; 15 Dec 2016 23:53:56 -0800 From: Yao Lei To: dts@dpdk.org Cc: lei yao Date: Fri, 16 Dec 2016 15:54:59 +0800 Message-Id: <1481874899-4510-1-git-send-email-lei.a.yao@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] framework qemu_kvm.py: Add "server" and "multi_queue" parameter for more qemu launch option and adjust some timeout setting to improve the test stability 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, 16 Dec 2016 07:53:59 -0000 From: lei yao Signed-off-by: lei yao --- framework/qemu_kvm.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py index 6ced54a..e9d29cc 100644 --- a/framework/qemu_kvm.py +++ b/framework/qemu_kvm.py @@ -606,21 +606,31 @@ class QEMUKvm(VirtBase): 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'] - self.char_idx += 1 - self.__add_boot_line(dev_boot_line) + if 'opt_server' in options.keys() and options['opt_server']: + dev_boot_line += separator + 'id=%s' % char_id + separator + 'path=%s' %options['opt_path'] + separator + '%s' % options['opt_server'] + self.char_idx += 1 + self.__add_boot_line(dev_boot_line) + else: + dev_boot_line += separator + 'id=%s' % char_id + separator + 'path=%s' %options['opt_path'] + self.char_idx += 1 + self.__add_boot_line(dev_boot_line) # netdev parameter netdev_id = 'netdev%d' % self.netdev_idx self.netdev_idx += 1 - dev_boot_line = '-netdev type=vhost-user,id=%s,chardev=%s,vhostforce' % (netdev_id, char_id) + if 'opt_queue' in options.keys() and options['opt_queue']: + queue_num=options['opt_queue'] + dev_boot_line = '-netdev type=vhost-user,id=%s,chardev=%s,vhostforce,queues=%s' % (netdev_id, char_id,queue_num) + else: + dev_boot_line = '-netdev type=vhost-user,id=%s,chardev=%s,vhostforce' % (netdev_id, char_id) self.__add_boot_line(dev_boot_line) # device parameter opts = {'opt_netdev': '%s' % netdev_id} if 'opt_mac' in options.keys() and \ options['opt_mac']: opts['opt_mac'] = options['opt_mac'] - - self.__add_vm_virtio_net_pci(**opts) + if 'opt_settings' in options.keys() and options['opt_settings']: + opts['opt_settings'] = options['opt_settings'] + self.__add_vm_virtio_net_pci(**opts) def __add_vm_virtio_cuse_pci(self, **options): """ @@ -939,7 +949,7 @@ class QEMUKvm(VirtBase): wait for 120 seconds for vm net ready 10.0.2.* is the default ip address allocated by qemu """ - count = 20 + count = 40 while count: out = self.__control_session('ifconfig') if "10.0.2" in out: -- 2.7.4