From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEFB3C433DB for ; Wed, 24 Feb 2021 15:29:23 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id BDBDB64E83 for ; Wed, 24 Feb 2021 15:29:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDBDB64E83 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alibaba-inc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 992671607D7; Wed, 24 Feb 2021 16:29:19 +0100 (CET) Received: from out0-137.mail.aliyun.com (out0-137.mail.aliyun.com [140.205.0.137]) by mails.dpdk.org (Postfix) with ESMTP id 164F94069B for ; Wed, 24 Feb 2021 16:29:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alibaba-inc.com; s=default; t=1614180554; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type; bh=8o1+N5A3DbucU8TZRqPet58hA03ix5UB3hlynWXnsRU=; b=qiodf9KbGdVJSML7khqaAhqHa3jtHm7OdUX9TIG9I7KJ4Pfgg5lTbfIIaBPWIiQMqdbdN2vogmGuErotmD58hK769+KlDJ4PjQso5/c7qRZVKU8j6cha28JPghXNBtVH+8iZERgtodKmhreGXicYFW3Hyl47H2bCkSs1cwlF26Q= X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R421e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=ay29a033018047199; MF=huawei.xhw@alibaba-inc.com; NM=1; PH=DS; RN=8; SR=0; TI=SMTPD_---.JchKEGx_1614180552; Received: from 30.0.187.6(mailfrom:huawei.xhw@alibaba-inc.com fp:SMTPD_---.JchKEGx_1614180552) by smtp.aliyun-inc.com(127.0.0.1); Wed, 24 Feb 2021 23:29:12 +0800 To: David Marchand Cc: "Yigit, Ferruh" , Maxime Coquelin , dev , "Burakov, Anatoly" , xuemingl@nvidia.com, Gaetan Rivet , "Xia, Chenbo" References: <1611890309-99135-1-git-send-email-huawei.xhw@alibaba-inc.com> <1611890309-99135-2-git-send-email-huawei.xhw@alibaba-inc.com> <63a70249-df55-806b-7ee8-6f3910881dd6@alibaba-inc.com> From: "=?UTF-8?B?6LCi5Y2O5LyfKOatpOaXtuatpOWIu++8iQ==?=" Message-ID: Date: Wed, 24 Feb 2021 23:29:12 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 2021/2/24 20:49, David Marchand wrote: > On Sun, Feb 21, 2021 at 4:58 PM 谢华伟(此时此刻) wrote: >> >> On 2021/2/18 17:33, David Marchand wrote: >>> On Fri, Jan 29, 2021 at 4:19 AM 谢华伟(此时此刻) wrote: >>>> From: "huawei.xhw" >>>> >>>> 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. >>> I can not find what is being fixed. >>> Could you elaborate? >> Maybe i wrongly use the word fix? With this patch, different drivers >> use the same way to get IO address for virtio device. >> Previously different driver get IO address with different method. > The commitlog is confusing, mentioning pci_dev->resource[] (I guess > from the kernel sources?) and talking about a fix while it works fine Yes. > so far. > So this is a refactoring. Ok, will change the word fix. > > Did you check that virtio devices bound to uio_pci_generic still works > with legacy mode + PIO? I had verified PIO, might under igb_uio driver. Theoretically it works with uio_pci_generic driver. I could do the test if needed. Give me some time.  Have to create a legacy VM. Now bars in virtio device in the cloud are basically mmio. > >