From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id AA5D5374C for ; Mon, 13 Jul 2015 03:17:05 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 12 Jul 2015 18:17:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,459,1432623600"; d="scan'208";a="763133177" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by orsmga002.jf.intel.com with ESMTP; 12 Jul 2015 18:17:04 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by KMSMSX153.gar.corp.intel.com (172.21.73.88) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 13 Jul 2015 09:17:02 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.46]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.157]) with mapi id 14.03.0224.002; Mon, 13 Jul 2015 09:17:01 +0800 From: "Liu, Yong" To: "Xu, Qian Q" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH 1/5] add vhost-cuse implementations for virtio pci device Thread-Index: AQHQvQlce4aXT4zJUEqKNFRkG30wAp3YmQgg Date: Mon, 13 Jul 2015 01:17:01 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10E5FD87@SHSMSX103.ccr.corp.intel.com> References: <1436750050-2479-1-git-send-email-qian.q.xu@intel.com> <1436750050-2479-2-git-send-email-qian.q.xu@intel.com> In-Reply-To: <1436750050-2479-2-git-send-email-qian.q.xu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH 1/5] add vhost-cuse implementations for virtio pci device 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: Mon, 13 Jul 2015 01:17:06 -0000 Qian, please remove debug function in your patch. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Qian Xu > Sent: Monday, July 13, 2015 9:14 AM > To: dts@dpdk.org > Subject: [dts] [PATCH 1/5] add vhost-cuse implementations for virtio pci > device >=20 > Signed-off-by: Qian Xu >=20 > diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py > index 4ccce81..44db411 100644 > --- a/framework/qemu_kvm.py > +++ b/framework/qemu_kvm.py > @@ -85,7 +85,7 @@ class QEMUKvm(VirtBase): > self.char_idx =3D 0 > self.netdev_idx =3D 0 > self.pt_idx =3D 0 > - > + self.cuse_id =3D 0 > # devices pass-through into vm > self.pt_devices =3D [] > self.pci_maps =3D [] > @@ -569,6 +569,8 @@ class QEMUKvm(VirtBase): > self.__add_vm_virtio_net_pci(**options) > elif options['driver'] =3D=3D 'vhost-user': > self.__add_vm_virtio_user_pci(**options) > + elif options['driver'] =3D=3D 'vhost-cuse': > + self.__add_vm_virtio_cuse_pci(**options) >=20 > def __add_vm_pci_assign(self, **options): > """ > @@ -620,6 +622,25 @@ class QEMUKvm(VirtBase): >=20 > self.__add_vm_virtio_net_pci(**opts) >=20 > + def __add_vm_virtio_cuse_pci(self, **options): > + """ > + driver virtio-net-pci > + opt_mac: 52:54:00:00:00:01 > + """ > + separator =3D ',' > + dev_boot_line =3D '-netdev tap' > + cuse_id =3D 'vhost%d' %self.cuse_id > + dev_boot_line +=3D separator + 'id=3D%s' %cuse_id + separator > +'ifname=3Dtap_%s' %cuse_id + separator +"vhost=3Don" +separator +"script= =3Dno" > + self.cuse_id +=3D 1 > + self.__add_boot_line(dev_boot_line) > + # device parameter > + opts =3D {'opt_netdev': '%s' % cuse_id , > + 'opt_id': '%s_net' % cuse_id} > + if 'opt_mac' in options.keys() and options['opt_mac']: > + opts['opt_mac'] =3D options['opt_mac'] > + print "debug info: add cuse info:", dev_boot_line > + self.__add_vm_virtio_net_pci(**opts) > + > def __add_vm_virtio_net_pci(self, **options): > """ > driver: virtio-net-pci > -- > 2.1.0