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 5C74795C8 for ; Mon, 16 May 2016 03:48:05 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 15 May 2016 18:48:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,625,1455004800"; d="scan'208";a="955111266" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga001.jf.intel.com with ESMTP; 15 May 2016 18:48:03 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 15 May 2016 18:48:03 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 15 May 2016 18:48:02 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.58]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0248.002; Mon, 16 May 2016 09:48:01 +0800 From: "Tan, Jianfeng" To: Yuanhan Liu CC: "dev@dpdk.org" , "Xie, Huawei" , "rich.lane@bigswitch.com" , "mst@redhat.com" , "nakajima.yoshihiro@lab.ntt.co.jp" , "p.fedin@samsung.com" , "ann.zhuangyanying@huawei.com" , "mukawa@igel.co.jp" , "nhorman@tuxdriver.com" Thread-Topic: [PATCH v4 6/8] virtio-user: add new virtual pci driver for virtio Thread-Index: AQHRobUZ0laCvFtZLE62CSXGzH5FS5+0HdgAgADYzICAABnBgIABIPqA//+pmQCABQnTcA== Date: Mon, 16 May 2016 01:48:01 +0000 Message-ID: References: <1461892716-19122-1-git-send-email-jianfeng.tan@intel.com> <1461892716-19122-7-git-send-email-jianfeng.tan@intel.com> <20160512021208.GA17474@yliu-dev.sh.intel.com> <20160512164015.GA5641@yliu-dev.sh.intel.com> <20160513044518.GB5641@yliu-dev.sh.intel.com> In-Reply-To: <20160513044518.GB5641@yliu-dev.sh.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: [dpdk-dev] [PATCH v4 6/8] virtio-user: add new virtual pci driver for virtio X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2016 01:48:05 -0000 Hi Yuanhan, > -----Original Message----- > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com] > Sent: Friday, May 13, 2016 12:45 PM > To: Tan, Jianfeng > Cc: dev@dpdk.org; Xie, Huawei; rich.lane@bigswitch.com; mst@redhat.com; > nakajima.yoshihiro@lab.ntt.co.jp; p.fedin@samsung.com; > ann.zhuangyanying@huawei.com; mukawa@igel.co.jp; > nhorman@tuxdriver.com > Subject: Re: [PATCH v4 6/8] virtio-user: add new virtual pci driver for v= irtio >=20 > On Fri, May 13, 2016 at 09:54:33AM +0800, Tan, Jianfeng wrote: > > > > So, I'd suggest something like following: > > > > if (is_vdev(..)) { > > > > > > The blocker issue of your suggestion is that we have no such condition. > > > > Previously, I use dev_type, but as David's comment said: >=20 > That's not the only option. There should be others, for example, > checking the existence of virtio_user_device. Or even, you could > add a new flag inside virtio hw while initiating your vdev. >=20 > > May I ask how many more such handling are needed, excluding the tx > queue > > header desc setup? And as stated, in generic, yes, we should try th= at. > > > > > > Those which need special handling: > > (1) vq->vq_ring_mem: it is set but never used, so it's out of question. > > (2) vq->virtio_net_hdr_mem and vring_hdr_desc_init >=20 > vring_hdr_desc_init is common. >=20 > > (3) vq->offset > > > > Just (2) and (3) so far. And the question is quite clear: where to put = these > > two special handling. >=20 > Apparently, you can't put it into the queue_setup(). And I still think > my proposal works great here. OK, since it's indeed inappropriate to put these special handlings inside q= ueue_setup() from semantic perspective, I'll add them according to if hw->v= dev_private =3D=3D NULL in the driver. Thanks for suggestion. Thanks, Jianfeng >=20 > --yliu