From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 4148AA0A0E;
	Wed,  3 Feb 2021 10:37:39 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 245962404AA;
	Wed,  3 Feb 2021 10:37:39 +0100 (CET)
Received: from us-smtp-delivery-124.mimecast.com
 (us-smtp-delivery-124.mimecast.com [63.128.21.124])
 by mails.dpdk.org (Postfix) with ESMTP id 22B0B2404A0
 for <dev@dpdk.org>; Wed,  3 Feb 2021 10:37:37 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1612345057;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=qQXyHF9+Elntx5J07P8dNE9PJBzOvbAHczgUtUI2zek=;
 b=DdkL0ZVMMXCLqCH/WcR8NDti1Z2tcxyIDD/k5C3Z7l46jLwmtzwTuCzNEeLly6f+PVJN1w
 7akNNT1qXVnSBMal8JomsLbLxJ8QUFyMojl1J31ehs+CJuApvu37/mKtdrIMC0ykeHhIZl
 Ge98QRF4CEIlmPVFC4EorTJ/B0sGsmk=
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-178--eAHfeyMOvy5jOAGqk3hnA-1; Wed, 03 Feb 2021 04:37:34 -0500
X-MC-Unique: -eAHfeyMOvy5jOAGqk3hnA-1
Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com
 [10.5.11.11])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 723D5801B12;
 Wed,  3 Feb 2021 09:37:32 +0000 (UTC)
Received: from [10.36.110.4] (unknown [10.36.110.4])
 by smtp.corp.redhat.com (Postfix) with ESMTPS id 72267722D1;
 Wed,  3 Feb 2021 09:37:27 +0000 (UTC)
To: =?UTF-8?B?6LCi5Y2O5LyfKOatpOaXtuatpOWIu++8iQ==?=
 <huawei.xhw@alibaba-inc.com>, ferruh.yigit@intel.com
Cc: dev@dpdk.org, david.marchand@redhat.com, anatoly.burakov@intel.com,
 xuemingl@nvidia.com, grive@u256.net, chenbo.xia@intel.com
References: <1611890309-99135-1-git-send-email-huawei.xhw@alibaba-inc.com>
 <1611890309-99135-2-git-send-email-huawei.xhw@alibaba-inc.com>
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Message-ID: <f5aeaf87-bc24-61d4-aa72-b5aac7150b21@redhat.com>
Date: Wed, 3 Feb 2021 10:37:25 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.7.0
MIME-Version: 1.0
In-Reply-To: <1611890309-99135-2-git-send-email-huawei.xhw@alibaba-inc.com>
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11
Authentication-Results: relay.mimecast.com;
 auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Subject: Re: [dpdk-dev] [PATCH v6 1/2] bus/pci: use PCI standard sysfs entry
 to get PIO address
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>



On 1/29/21 4:18 AM, 谢华伟(此时此刻) wrote:
> From: "huawei.xhw" <huawei.xhw@alibaba-inc.com>
> 
> Currently virtio PMD asssumes legacy device uses PIO bar.
> There are three ways to get PIO(PortIO) address for virtio legacy device.
>     under igb_uio, get pio address from uio/uio# sysfs attribute
>     under uio_pci_generic:
>         for X86, get PIO address from /proc/ioport
>         for other ARCH, get PIO address from standard PCI sysfs attribute
> 
> Actually, igb_uio sysfs attribute exports exactly the same thing as standard PCI sysfs, i.e,
>     pci_dev->resource[]
> 
> This patch fixes these messy things, and uses standard PCI sysfs attribute.
> 
> Signed-off-by: huawei xie <huawei.xhw@alibaba-inc.com>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>  drivers/bus/pci/linux/pci.c     | 77 -----------------------------------------
>  drivers/bus/pci/linux/pci_uio.c | 64 ++++++++++++++++++++++++----------
>  2 files changed, 46 insertions(+), 95 deletions(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>