From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 22F75A034F; Wed, 24 Feb 2021 13:49:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ABF5B160878; Wed, 24 Feb 2021 13:49:16 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 2696F4069B for ; Wed, 24 Feb 2021 13:49:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614170954; 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=YMC2dOnzDj+9JMuk5BEBiXCX+gWZoz7YC417FVQ+uzo=; b=FniJ90q3ownQt0EI1UKu8R1xpfy1gnUeDw6bSfe09rEe2ZGBdHj2hSUBfnQbdIGR4viM85 rNXdwUz0SA6dpuRVCMZAt20D+IscQxQr202bXJCe+cYoxdenBH/4mtnnracqOTb3I9kiYf PBgL0oG9FBsBu9napn+esxpWijInG6A= Received: from mail-vk1-f197.google.com (mail-vk1-f197.google.com [209.85.221.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-213-gpywU-tgP662_BWqDTETuA-1; Wed, 24 Feb 2021 07:49:13 -0500 X-MC-Unique: gpywU-tgP662_BWqDTETuA-1 Received: by mail-vk1-f197.google.com with SMTP id f205so120396vka.7 for ; Wed, 24 Feb 2021 04:49:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=YMC2dOnzDj+9JMuk5BEBiXCX+gWZoz7YC417FVQ+uzo=; b=es2DUhyjkm6DOdGMEK/9M0D6PVulWryp6D5RJ9yF4iOhUjrU9n+f956GNCHtZ/htIG fV54Yj7pNu2m5PGz+hd1QIobLpUDnL1p1neEUKOVapDLR84Oe4zQXqO/yApat9Npvwik SEjDXp3ht1vKa1piX9OIGrzoldMW68G+wwUoDw9Fb9UV488dQe+K3ka+l74wxEuroWnM dB1/2i5r3TyRsfYp8EMifjXwi1HZOUBOF1kgHfc+towR0aAd7yvKWrSKgJBk0DVxxsor iKL9SbE/GNxwuBc1cQp0BVwFSBlylQoFh3zUTJN4FqHQRdPi3wn20uYDhoebjEc5JKTv 3bGQ== X-Gm-Message-State: AOAM532CpXEI0AaiaMmkeBB5/aNJaUWRVOM3wloguIitxI4Zfv3QZIsy 4Unn4xGGatGDUMNI4FV9Ts/d6NqExVQ0amtF3FJRO2jHJ/Pt7QkJeL3+c6okEM0Lij8PA7yQEzH npqIheGJNVImI/mHPCDQ= X-Received: by 2002:a1f:9692:: with SMTP id y140mr3798705vkd.20.1614170951747; Wed, 24 Feb 2021 04:49:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzR1iaky99wwJAZTd8CNhZgYJbk0R+g92SlrFoZRyQ2eeqmtjr0ker4hGbsapAt9VskR5N9fHPd+mZmRqyGgwA= X-Received: by 2002:a1f:9692:: with SMTP id y140mr3798694vkd.20.1614170951528; Wed, 24 Feb 2021 04:49:11 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: <63a70249-df55-806b-7ee8-6f3910881dd6@alibaba-inc.com> From: David Marchand Date: Wed, 24 Feb 2021 13:49:00 +0100 Message-ID: To: =?UTF-8?B?6LCi5Y2O5LyfKOatpOaXtuatpOWIu++8iQ==?= Cc: "Yigit, Ferruh" , Maxime Coquelin , dev , "Burakov, Anatoly" , xuemingl@nvidia.com, Gaetan Rivet , "Xia, Chenbo" Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Sun, Feb 21, 2021 at 4:58 PM =E8=B0=A2=E5=8D=8E=E4=BC=9F(=E6=AD=A4=E6=97= =B6=E6=AD=A4=E5=88=BB=EF=BC=89 wrote: > > > On 2021/2/18 17:33, David Marchand wrote: > > On Fri, Jan 29, 2021 at 4:19 AM =E8=B0=A2=E5=8D=8E=E4=BC=9F(=E6=AD=A4= =E6=97=B6=E6=AD=A4=E5=88=BB=EF=BC=89 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 devi= ce. > >> 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 attri= bute > >> > >> Actually, igb_uio sysfs attribute exports exactly the same thing as st= andard PCI sysfs, i.e, > >> pci_dev->resource[] > >> > >> This patch fixes these messy things, and uses standard PCI sysfs attri= bute. > > 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 so far. So this is a refactoring. Did you check that virtio devices bound to uio_pci_generic still works with legacy mode + PIO? --=20 David Marchand