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 A2462568F for ; Fri, 13 May 2016 06:40:12 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 12 May 2016 21:40:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,612,1455004800"; d="scan'208";a="702066999" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by FMSMGA003.fm.intel.com with ESMTP; 12 May 2016 21:40:09 -0700 Date: Thu, 12 May 2016 21:45:18 -0700 From: Yuanhan Liu To: "Tan, Jianfeng" Cc: dev@dpdk.org, Huawei Xie , 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 Message-ID: <20160513044518.GB5641@yliu-dev.sh.intel.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) 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: Fri, 13 May 2016 04:40:13 -0000 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: 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. > 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 that. > > > 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 vring_hdr_desc_init is common. > (3) vq->offset > > Just (2) and (3) so far. And the question is quite clear: where to put these > two special handling. Apparently, you can't put it into the queue_setup(). And I still think my proposal works great here. --yliu