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 45CE1A0561; Wed, 3 Mar 2021 19:24:36 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 049AB16071D; Wed, 3 Mar 2021 19:24:36 +0100 (CET) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mails.dpdk.org (Postfix) with ESMTP id DFBAA40683 for ; Wed, 3 Mar 2021 19:24:33 +0100 (CET) Received: by mail-pj1-f50.google.com with SMTP id e9so4685331pjs.2 for ; Wed, 03 Mar 2021 10:24:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YMLNZqQxhz/4kjf1oSO0524X3n/OesQtxw3GL6WZyOM=; b=GO/IkYq+aFXvMzTxrEJs0uEJ99c8ymB07wCuh6DCQdmXWEnv7lbTYPqSsgfy2cornl APmyR3KaTk7i76tA0RF0kpCMW9+UaXuViErF6k0eHUfjSPfQrpYJ6gPMus4u+WdvemUb Iw7gZwe202ze5IZafExpDFbpG+PkoQAYz7F1Za8N0UMbt7OeZfmSnawY4k40m9Stqr4w tJAdumLYPh0csn8aDZnucqWTlJImjjLkf1Ol6w/hg1Wi1nrVITPIFHahuDP3tGhKEf9g S50bsk25VgdOp7dlPmRb8JDN4jKA1/GpsmOinTPBUBiM8oW4WR6ELKugk3pbe9lRp/aD Dghw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YMLNZqQxhz/4kjf1oSO0524X3n/OesQtxw3GL6WZyOM=; b=afQnYf6Vl9TUExbJ9q6j4ODAKCYaXJJBgti/9MSUqkYDhqM+WGDmLdYlR+ymDRAvpP q6h6QCMU/jKgQW8GLuh8rs3sUGbgMNGstG374rMey+6R64I7mQ5yUQK0wOh/iv7qzEDQ 896ZRxBw6WcDgHF00xOP/fsgc0C0BAA/nWPYXFeZcyN1IwGaKIFWO7ymb6VAHipXkEJn N2lEfI/gnYZusCV6lf9NcHwRpgBKx9BacvOOUAix+BwojCUntUI2IvBmBmn2yd0TI/4N 7r5v9+Dy4ir4bXo1wvnr3IHwIBaqoH7Ina2T5lmg0bATm77vkYvUNl/UVO/67m0kZ8t1 8Z6A== X-Gm-Message-State: AOAM533bk6Zk5S1fJ2qn/BgC0sgSz994T/cZDmnG9CKp80B8NYjx4DhG /30djBcfrtUsd4YtqbsHbRLZ7g== X-Google-Smtp-Source: ABdhPJylvxwfq3kiR5fRRXV2U+CuHGqFy5lFnGTh+aIvTD/ld3joieO7fBUAG+NcVURPdhAzEAUFWw== X-Received: by 2002:a17:902:6b43:b029:df:fb48:aece with SMTP id g3-20020a1709026b43b02900dffb48aecemr338761plt.59.1614795873049; Wed, 03 Mar 2021 10:24:33 -0800 (PST) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id y8sm27478253pfe.36.2021.03.03.10.24.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Mar 2021 10:24:32 -0800 (PST) Date: Wed, 3 Mar 2021 10:24:24 -0800 From: Stephen Hemminger To: "=?UTF-8?B?6LCi5Y2O5Lyf?=(=?UTF-8?B?5q2k5pe25q2k5Yi777yJ?=" Cc: ferruh.yigit@intel.com, maxime.coquelin@redhat.com, david.marchand@redhat.com, , , , , Message-ID: <20210303102424.5df54e30@hermes.local> In-Reply-To: <1614793612-91528-1-git-send-email-huawei.xhw@alibaba-inc.com> References: <1614614483-75891-1-git-send-email-huawei.xhw@alibaba-inc.com> <1614793612-91528-1-git-send-email-huawei.xhw@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 Thu, 04 Mar 2021 01:46:50 +0800 "=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: > 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 limi= ted,=20 > we expose MMIO(memory IO) BAR. >=20 > Kernel supports both PIO and MMIO BAR for legacy virtio-pci device, and f= or all > other pci devices. This patchset handles different type of BAR in the sim= ilar way. >=20 > 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. 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.