From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f170.google.com (mail-pf0-f170.google.com [209.85.192.170]) by dpdk.org (Postfix) with ESMTP id 897B295CE for ; Tue, 2 Feb 2016 04:55:35 +0100 (CET) Received: by mail-pf0-f170.google.com with SMTP id o185so90519278pfb.1 for ; Mon, 01 Feb 2016 19:55:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel-co-jp.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=04H0r/LKFoSW44WnVb3Q8dd/TmT9C/shIWeHGOyqL7I=; b=u4lvIwrhpQaAQpewCmeBYyAcnwrdKQdz/4uB3LiJQ+BkAE7qFRMd3yqKfPvR3O6Ftv 7GVep/Nn0Gk45yB171S5qjRtLenTbZMDSdI6AU/ThhtY7GEucZF0akdXG1C/DJfsCm89 AEZbpH1C1fXsaCooMgeMOwWq5t+eEDMFmnnjMuCxRCCptmsFzzS7KyWX30POwu4zweno hQZAkFo+Lp0BFxdAwFmUcnMlMWYcu7IeapyChMW4UNmiIcZMUVE29GP4maW2GEz3r9BV a/hBMLYukDzTU6klZSQuRtkdzLw/I+d756yeIZUECdaARqkWg7pR/r2lfNnT04NLQqMv da6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=04H0r/LKFoSW44WnVb3Q8dd/TmT9C/shIWeHGOyqL7I=; b=IqBjYe+NxYPTbzuJd7zf93/ca6qnHssGmeZMbxjUHAUQSb77HO/rfskkJ3rw8qfsj0 6Bet/sV6rkjmDY3igEYHH5LQJGtTp3s1fzL52i59AVSecFxr8ZsMvMRzgWDTPYVmdzew Ef2CMwfWrwFi6tD2XYs3txRQgdievC0s++pn1oY7FwMB/ibU1OsJCXteYjhoFZ1/Zdt4 1X7RKp8DsiNxSmqu9FYOUYhtp5rzwaBdX0iO/i1ICz0ZD+BY9RNBxylxRKYbTpTMeDqn 2eQM+WCqfgXVpwnxkVQMhuubShWsG/0Kft77Z4YtGLl784Vi6ApjjhnB40yUBzGF7kXk O3MA== X-Gm-Message-State: AG10YOSFWD9Ldtj10UgzFm/5mfJs2Tswe+LV07I9+BT+N6P1hjzsAX1YXtB9tiQMiDjbIA== X-Received: by 10.98.43.88 with SMTP id r85mr43341700pfr.7.1454385334954; Mon, 01 Feb 2016 19:55:34 -0800 (PST) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by smtp.googlemail.com with ESMTPSA id u84sm548582pfa.57.2016.02.01.19.55.33 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 01 Feb 2016 19:55:34 -0800 (PST) To: Yuanhan Liu References: <1453108389-21006-2-git-send-email-mukawa@igel.co.jp> <1453973612-8599-4-git-send-email-mukawa@igel.co.jp> <20160129091701.GY4257@yliu-dev.sh.intel.com> <56AEB9C8.9060703@igel.co.jp> <20160201131513.GD4257@yliu-dev.sh.intel.com> <56B01246.4010705@igel.co.jp> <20160202024518.GG4257@yliu-dev.sh.intel.com> From: Tetsuya Mukawa X-Enigmail-Draft-Status: N1110 Message-ID: <56B028B4.3050905@igel.co.jp> Date: Tue, 2 Feb 2016 12:55:32 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160202024518.GG4257@yliu-dev.sh.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 3/3] virtio: Add a new layer to abstract pci access method 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: Tue, 02 Feb 2016 03:55:35 -0000 On 2016/02/02 11:45, Yuanhan Liu wrote: > On Tue, Feb 02, 2016 at 11:19:50AM +0900, Tetsuya Mukawa wrote: >> On 2016/02/01 22:15, Yuanhan Liu wrote: >>> On Mon, Feb 01, 2016 at 10:50:00AM +0900, Tetsuya Mukawa wrote: >>>> On 2016/01/29 18:17, Yuanhan Liu wrote: >>>>> On Thu, Jan 28, 2016 at 06:33:32PM +0900, Tetsuya Mukawa wrote: >>>>>> This patch addss function pointers to abstract pci access method. >>>>>> This abstraction layer will be used when virtio-net PMD supports >>>>>> container extension. >>>>>> >>>>>> The below functions abstract how to access to pci configuration space. >>>>>> >>>>>> struct virtio_pci_cfg_ops { >>>>>> int (*map)(...); >>>>>> void (*unmap)(...); >>>>>> void *(*get_mapped_addr)(...); >>>>>> int (*read)(...); >>>>>> }; >>>>>> >>>>>> The pci configuration space has information how to access to virtio >>>>>> device registers. Basically, there are 2 ways to acccess to the >>>>>> registers. One is using portio and the other is using mapped memory. >>>>>> The below functions abstract this access method. >>>>> One question: is there a way to map PCI memory with Qtest? I'm thinking >>>>> if we can keep the io_read/write() for Qtest as well, if so, code could >>>>> be simplified, a lot, IMO. >>>>> >>>> Yes, I agree with you. >>>> But AFAIK, we don't have a way to mmap it from DPDK application. >>>> >>>> We may be able to map PCI configuration space to a memory address space >>>> that guest CPU can handle. >>>> But even in this case, I guess we cannot access the memory without qtest >>>> messaging. >>> Acutally, I have a concern about this access abstraction, which makes >>> those simple funciton not inline. It won't be an issue for most of them, >>> as most of them are invoked during init stage, where has no impact on >>> performance. >>> >>> notify_queue(), however, is a bit different. I was thinking the "inline >>> to callback (not inline)" convertion might has some impacts on the >>> performance. Would you do a test for me? >> Sure, I will be able to. > Thanks. > >> But if we concern about it, I guess it's also nice to implement the PMD >> on your vtpci abstraction. >> (It means we don't use the access abstraction) >> Probably this lets our merging process faster. >> What do you think? > Another standalone PMD driver? (sorry that I didn't follow the > discussion). Yes, Jianfeng will submit one more virtual virtio-net PMD. > If so, won't it introduce too much duplicate code? Quick look, I guess we won't have not so much duplicated code. Tetsuya