From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DbS+edwdpfWcPLtr5BzVaQ8X4b14JTT5Z8VVArgALug=; b=sXU3XnYn0FsqNsaMkoYD6fusqkgjwCBDmLyllftqUQlJscMS/+sGKCrIS+QJ3RDk73 Giqe9hi8BFfCVgTkKu43ypzHIrDlWPkCQKD1MGSpAr7mfKaKwvwLrxb5jyYMlDnOZVLm hAkTdSka24Hxl2ePMglPXjS4zh1vDhW1TJTS6F8wo2dVLdLaWgXqckOJAyJBdQLe1QA2 kI7aEfxxuqZ3S+Id4k0mrod8gx2kL/sQ/BK5zVDmS2ISg85alvs3Fgqz1OVXGjUs4olc buqnDa2MgtnLqIAVeO/mHRYiwb6URU3i9qKjgPY2RMwj5qLhI89eMsphZMkHK7rfYC+P IiRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DbS+edwdpfWcPLtr5BzVaQ8X4b14JTT5Z8VVArgALug=; b=D0eUyJ03QtxlJPHFnaKmJJ4i5RMl7v8QNu4YhZgvAXaF0KcEUe6Jn1wEmnK/4qQN3x eAjgbqb62IVJaR/hNOLhQX9BbOz4XU5hMTvUFZ6hk89yF94/MAexuKvuwSQ2rCc+p7AX mx7nV2NGFIze46MiEDWU6xitrQlYW/wmYGBpA16pdW2pBfBbBzxMKk4CzIYa76nV2F15 VS7YrOk4LfFZ+otw3ruYY1h8Scnb3m6wZ+v9947bLIc1CtMgCfDskSrEaY9axhb0NoMi ADal7ixHfMcqYwCOZM+ueV70PB28JFM+8l6S0fKKVMhOaL+Vq7VrfeuCIbJQRk4JY+ui V2dg== X-Gm-Message-State: AD7BkJIGtD0KEyl2+L4zJvVVXj5qf6uKpVF018HEWVUt04CDqYxuqE32E+KvC0nydgZ2wJ0V X-Received: by 10.194.23.7 with SMTP id i7mr28262762wjf.9.1458023390781; Mon, 14 Mar 2016 23:29:50 -0700 (PDT) Received: from gloops.dev.6wind.com ([37.163.72.253]) by smtp.gmail.com with ESMTPSA id up6sm25417399wjc.6.2016.03.14.23.29.49 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Mar 2016 23:29:50 -0700 (PDT) From: David Marchand To: dev@dpdk.org Cc: mauricio.vasquezbernal@studenti.polito.it, yuanhan.liu@linux.intel.com, huawei.xie@intel.com Date: Tue, 15 Mar 2016 07:29:13 +0100 Message-Id: <1458023353-22268-5-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1458023353-22268-1-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: 8bit Subject: [dpdk-dev] [PATCH 4/4] pci: fix ioport support for uio_pci_generic on x86 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2016 06:29:51 -0000 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/ioports. Fixes: 756ce64b1ecd ("eal: introduce PCI ioport API") Reported-by: Mauricio Vásquez 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/linuxapp/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, int bar, ret = pci_uio_ioport_map(dev, bar, p); break; case RTE_KDRV_UIO_GENERIC: +#if defined(RTE_ARCH_X86) + ret = pci_ioport_map(dev, bar, p); +#else ret = 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 = pci_uio_ioport_unmap(p); break; case RTE_KDRV_UIO_GENERIC: +#if defined(RTE_ARCH_X86) + ret = 0; +#else ret = pci_uio_ioport_unmap(p); +#endif break; case RTE_KDRV_NONE: #if defined(RTE_ARCH_X86) -- 1.9.1