From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id B44F35934 for ; Mon, 13 Jul 2015 03:28:00 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 12 Jul 2015 18:27:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,459,1432623600"; d="scan'208";a="763138679" Received: from pgsmsx105.gar.corp.intel.com ([10.221.44.96]) by orsmga002.jf.intel.com with ESMTP; 12 Jul 2015 18:27:59 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX105.gar.corp.intel.com (10.221.44.96) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 13 Jul 2015 09:26:38 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.46]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.146]) with mapi id 14.03.0224.002; Mon, 13 Jul 2015 09:26:36 +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//96V4CAAIhY0A== Date: Mon, 13 Jul 2015 01:26:35 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10E5FE4C@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> <86228AFD5BCD8E4EBFD2B90117B5E81E10E5FD87@SHSMSX103.ccr.corp.intel.com> <82F45D86ADE5454A95A89742C8D1410E01D7B3DF@shsmsx102.ccr.corp.intel.com> In-Reply-To: <82F45D86ADE5454A95A89742C8D1410E01D7B3DF@shsmsx102.ccr.corp.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:28:01 -0000 No more comments on this patch. Just need use pep8 to check the format. > -----Original Message----- > From: Xu, Qian Q > Sent: Monday, July 13, 2015 9:18 AM > To: Liu, Yong; dts@dpdk.org > Subject: RE: [dts] [PATCH 1/5] add vhost-cuse implementations for virtio > pci device >=20 > OK, I can comment them, any other changes needed? >=20 > Thanks > Qian >=20 >=20 > -----Original Message----- > From: Liu, Yong > Sent: Monday, July 13, 2015 9:17 AM > To: Xu, Qian Q; dts@dpdk.org > Subject: RE: [dts] [PATCH 1/5] add vhost-cuse implementations for virtio > pci device >=20 > Qian, please remove debug function in your patch. >=20 > > -----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 > > > > Signed-off-by: Qian Xu > > > > 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) > > > > def __add_vm_pci_assign(self, **options): > > """ > > @@ -620,6 +622,25 @@ class QEMUKvm(VirtBase): > > > > self.__add_vm_virtio_net_pci(**opts) > > > > + 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