From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Marchand Subject: [PATCH 4/4] pci: fix ioport support for uio_pci_generic on x86 Date: Tue, 15 Mar 2016 07:29:13 +0100 Message-ID: <1458023353-22268-5-git-send-email-david.marchand@6wind.com> References: <1458023353-22268-1-git-send-email-david.marchand@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: mauricio.vasquezbernal@studenti.polito.it, yuanhan.liu@linux.intel.com, huawei.xie@intel.com To: dev@dpdk.org Return-path: Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id ED17B5597 for ; Tue, 15 Mar 2016 07:29:50 +0100 (CET) Received: by mail-wm0-f45.google.com with SMTP id l68so11356190wml.1 for ; Mon, 14 Mar 2016 23:29:50 -0700 (PDT) In-Reply-To: <1458023353-22268-1-git-send-email-david.marchand@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" uio_pci_generic does not offer the same sysfs helpers as igb_uio. In this case, ioport number can only be retrieved by parsing /proc/ioport= s. Fixes: 756ce64b1ecd ("eal: introduce PCI ioport API") Reported-by: Mauricio V=C3=A1squez Signed-off-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linux= app/eal/eal_pci.c index 74c6919..dbf12a8 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -620,7 +620,11 @@ rte_eal_pci_ioport_map(struct rte_pci_device *dev, i= nt bar, ret =3D pci_uio_ioport_map(dev, bar, p); break; case RTE_KDRV_UIO_GENERIC: +#if defined(RTE_ARCH_X86) + ret =3D pci_ioport_map(dev, bar, p); +#else ret =3D pci_uio_ioport_map(dev, bar, p); +#endif break; case RTE_KDRV_NONE: #if defined(RTE_ARCH_X86) @@ -705,7 +709,11 @@ rte_eal_pci_ioport_unmap(struct rte_pci_ioport *p) ret =3D pci_uio_ioport_unmap(p); break; case RTE_KDRV_UIO_GENERIC: +#if defined(RTE_ARCH_X86) + ret =3D 0; +#else ret =3D pci_uio_ioport_unmap(p); +#endif break; case RTE_KDRV_NONE: #if defined(RTE_ARCH_X86) --=20 1.9.1