From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by dpdk.org (Postfix) with ESMTP id F072495CE for ; Tue, 2 Feb 2016 03:19:53 +0100 (CET) Received: by mail-pa0-f49.google.com with SMTP id ho8so92172111pac.2 for ; Mon, 01 Feb 2016 18:19:53 -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=qaqhk5Jo0fcFq0iN1uaQSdstbaYAfeI3cfpL4cfF5O8=; b=Si0LKwqyFrS6GA5JRnoxG+o2ysYXZTmm4W8zOH15jzWZf2R3svtx71qEX1dqA1fOWr lHQXDDFzmRZsFa7xtdenbRmqL/HDdNcFyJB1+RpbDVfGOHyn/C9bP5WzxIhAaKp7MEtX keqrx27nxsTK38vEvIAD24BbvuUvn3SydJuzKgwXwcrmXf2votGfbo7Qp34LpVGL7uio gzaybFbLFEGIGKMK7FU5krHOcxBFAiCXsNbW3V1SoJaMI2udVBE+HXCLYS0fR9xWUPtv nPNlxQngNhAIvUSi48j7w12X3MpORLhsnTVpRlt2Q7hEn6gP9wfU/SCBI91P87N4KMXT jVaA== 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=qaqhk5Jo0fcFq0iN1uaQSdstbaYAfeI3cfpL4cfF5O8=; b=GRCsDXi/VCpAYjeRk2ItP1DfzAVk0Ti/Aiw/VvALbFsdY3qQ7/00Wve6/5N/u2IWtg +1AVdi8JQo+TP+kyTb4uohD/4Tu7giz4bQyw4wkLvmoqE8mmlU7y72txBzZhBxI2d3Q3 vSvVkWPs13fW1+745mrK3AmeXr6/+BWiE7L1DIb1xJT5rsFETjEG4shJP6t4S1tuYHIa KV5JRF4iXKeRDXNvw6KMEj7tR1z33mbsgjrYUBrR79sx3Q072I4vsltAqkIX/qy1QHnk LbSG0ZjUlnEDZSMH/OpxbD0RVA8nRd/Etq4qUwDHkSJLeDENoJZyFewVL3FMgAty1U/v 81eg== X-Gm-Message-State: AG10YOTrbyXTiaBaW3JhFM4mMw5pRKpSGLMvNfCvCQPhYBCMHo6C2g7jOkVzIHXWpWSSgA== X-Received: by 10.66.132.81 with SMTP id os17mr42786268pab.98.1454379593328; Mon, 01 Feb 2016 18:19:53 -0800 (PST) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by smtp.googlemail.com with ESMTPSA id ty5sm46262009pac.48.2016.02.01.18.19.51 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 01 Feb 2016 18:19:52 -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> From: Tetsuya Mukawa X-Enigmail-Draft-Status: N1110 Message-ID: <56B01246.4010705@igel.co.jp> Date: Tue, 2 Feb 2016 11:19:50 +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: <20160201131513.GD4257@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 02:19:54 -0000 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. 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? Also I guess Jianfeng will implement his PMD on your abstraction. If so, I will also follow him. > > Another off-topic remind is that I guess you might need to send a new > version of your vhost-pmd patchset, the sooner the better. Chinese new > year is coming; I'm having vacation since the end of this week (And, > Huawei has been on vacation sine the end of last week). I hope we could > make it in v2.3. Thanks for notification. Sure I will submit it soon. Tetsuya