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 4C51BA0561; Thu, 4 Mar 2021 14:45:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B7BAE40684; Thu, 4 Mar 2021 14:45:33 +0100 (CET) Received: from out0-145.mail.aliyun.com (out0-145.mail.aliyun.com [140.205.0.145]) by mails.dpdk.org (Postfix) with ESMTP id 6CBAC40147 for ; Thu, 4 Mar 2021 14:45:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alibaba-inc.com; s=default; t=1614865529; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type; bh=sp16pdl/IFVSZZ7PN3G2k4SbBDUs64KJbjOZXQhgX7Y=; b=ZWNi+06it2ODLeNZtzUbWucCn8UWuGtNu33UbFaKgZp3SH+S1pWAdE4y8RdvxzH2UWLo5pkHx9eYD19H9VzGDqW1FDWgf/8Txz1vYPiTU+BViGiGSMYMdRgw7TF7P/worlBiS5w+6YWL1RMR770EaazK2ztwUfhKg6km/xnQDzo= X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R991e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=ay29a033018047203; MF=huawei.xhw@alibaba-inc.com; NM=1; PH=DS; RN=9; SR=0; TI=SMTPD_---.JgOwDmc_1614865527; Received: from 30.43.73.33(mailfrom:huawei.xhw@alibaba-inc.com fp:SMTPD_---.JgOwDmc_1614865527) by smtp.aliyun-inc.com(127.0.0.1); Thu, 04 Mar 2021 21:45:28 +0800 To: Stephen Hemminger Cc: ferruh.yigit@intel.com, maxime.coquelin@redhat.com, david.marchand@redhat.com, dev@dpdk.org, anatoly.burakov@intel.com, xuemingl@nvidia.com, grive@u256.net, chenbo.xia@intel.com References: <1614614483-75891-1-git-send-email-huawei.xhw@alibaba-inc.com> <1614793612-91528-1-git-send-email-huawei.xhw@alibaba-inc.com> <20210303102424.5df54e30@hermes.local> From: "=?UTF-8?B?6LCi5Y2O5LyfKOatpOaXtuatpOWIu++8iQ==?=" Message-ID: <8c084916-3de8-360a-eb32-5b4f1a58a209@alibaba-inc.com> Date: Thu, 04 Mar 2021 21:45:18 +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: <20210303102424.5df54e30@hermes.local> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v9 0/2] support both PIO and MMIO BAR for legacy device in virtio PMD 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/3/4 2:24, Stephen Hemminger wrote: > On Thu, 04 Mar 2021 01:46:50 +0800 > "谢华伟(此时此刻)" wrote: > >> virtio PMD assumes legacy device only supports PIO BAR resource. This is wrong. >> As we need to create lots of devices, as PIO resource on x86 is very limited, >> we expose MMIO(memory IO) BAR. >> >> Kernel supports both PIO and MMIO BAR for legacy virtio-pci device, and for all >> other pci devices. This patchset handles different type of BAR in the similar way. >> >> In previous implementation, under igb_uio driver we get PIO address from igb_uio >> sysfs entry; with uio_pci_generic, we get PIO address from /proc/ioports for x86, >> and for other ARCHs, we get PIO address from standard PCI sysfs entry. >> For PIO/MMIO RW, there is different path for different drivers and arch. > Just to add some background. At the time virtio for DPDK was developed, > the kernel only supported legacy mode, and it required I/O ports on x86. Hi Stephen: Do you mean QEMU?  I think QEMU exports PIO by default. For kernel, I checked 3.10 code at hand, virtio legacy driver doesn't assume I/O port. It uses generic API pci_iomap and ioread/write. > > One concern is that, you should make sure these patches still work on > the oldest releases of Linux kernel that DPDK supports. For upstream > kernel that should be 4.4 kernel (oldest currently maintained LTS). > The Linux system requirements doc file needs update! > > For distributions, the oldest version would be probably be RHEL 7. PIO is verified on Redhat 7.9 (3.10.0-1160.11.1.el7.x86_64). As this patch uses the generic kernel exported interface, which all other PMDs have been using, i think it doesn't break compatibility.