From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 2F9165934 for ; Mon, 13 Jul 2015 03:23:07 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 12 Jul 2015 18:23:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,459,1432623600"; d="scan'208";a="727619208" Received: from kmsmsx152.gar.corp.intel.com ([172.21.73.87]) by orsmga001.jf.intel.com with ESMTP; 12 Jul 2015 18:23:03 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.110.15) by KMSMSX152.gar.corp.intel.com (172.21.73.87) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 13 Jul 2015 09:18:38 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.165]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.129]) with mapi id 14.03.0224.002; Mon, 13 Jul 2015 09:18:09 +0800 From: "Xu, Qian Q" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH 1/5] add vhost-cuse implementations for virtio pci device Thread-Index: AQHQvQmfLzBM9qsXeE+9mrWiv+GBbJ3YmWzA Date: Mon, 13 Jul 2015 01:18:09 +0000 Message-ID: <82F45D86ADE5454A95A89742C8D1410E01D7B3DF@shsmsx102.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> In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E10E5FD87@SHSMSX103.ccr.corp.intel.com> Accept-Language: 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:23:07 -0000 OK, I can comment them, any other changes needed?=20 Thanks Qian -----Original Message----- From: Liu, Yong=20 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 pc= i device 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=20 > pci device >=20 > Signed-off-by: Qian Xu >=20 > diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py index=20 > 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=20 > +'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