From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 55BD15591 for ; Tue, 15 Mar 2016 07:29:49 +0100 (CET) Received: by mail-wm0-f44.google.com with SMTP id p65so129630500wmp.1 for ; Mon, 14 Mar 2016 23:29:49 -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; bh=izRYWYW2WEuB9sYe22C6F/a8OcRaPw7d2iPwYnQ6I+o=; b=Z5gyWLIgOanq57JUfpDHm3UyoyfvAedhIpTbbukpuNrRNaBqYbVvGzBQ402PbYlgYc sz2xQe1xrocxVIvs0zvvqNk3oaU4ovMx738YSU5Nsl319+7E9eBaxLnvn9yrYN+/pTHg d7KhpUASamJt2YSMhSuRhFtSxcH8r7sYdyN4bpENszjS+eKAMoADwUyB8krdRsy3BBvC NpaNjBj77jbQFez51fAjH+QPT7xAf9sa9VaGM9AQKLlLKNyEhag5Mp53LHJnxgCF4Sc2 7vxI/p+FplxgyPWhL+YP4wAmDqMjoVGyzvShiq9GEqNCI8eDlB+2H5sCAO5eQVTJVqV3 l4aQ== 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; bh=izRYWYW2WEuB9sYe22C6F/a8OcRaPw7d2iPwYnQ6I+o=; b=lmfSGYeF2Ab43/isiT5B12tFLiRmbwT0Zc9EL8cGXqLjkB9yQ3ki2WBEgobHBEXY5D BgKtwppagiZTAHDmZvNOtGBB9xkrIW2nmbuXE/ZniLcjxl4e/CkAGTtBKIf/e67WGb/l 6iHWlaJpPfRHH8DiRHBj27c51dcFx9rbJP8TuGPpxeMx1XFaIGIrzyuV7X6iDkwUW0/P eG86Ki/6ktoMp/ASad087ooiZoqzn1NEAO3pNsdvyNapZS6XroPtnDsU3OkA+xsoVh0B twl9Xl71mP7dnfSVUiWuAN0bnQ2/vzYpTADDmEILwT475tBlUamABPLl0jKozOTPqKks wZkA== X-Gm-Message-State: AD7BkJJHxffwlMuB+BNh8bbczD2m989vok8XWBzbkir0DKA+1HhJIUmubP+10J+AK/EQOcOw X-Received: by 10.28.212.85 with SMTP id l82mr22131488wmg.82.1458023389254; Mon, 14 Mar 2016 23:29:49 -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.47 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Mar 2016 23:29:48 -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:12 +0100 Message-Id: <1458023353-22268-4-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> Subject: [dpdk-dev] [PATCH 3/4] pci: align ioport special case for x86 in read/write/unmap 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:49 -0000 Commit b8eb345378bd ("pci: ignore devices already managed in Linux when mapping x86 ioport") did not update other parts of the ioport api. The application is not supposed to call these read/write/unmap ioport functions if map call failed but I prefer aligning the code for the sake of consistency. Signed-off-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index 7707292..74c6919 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -653,12 +653,13 @@ rte_eal_pci_ioport_read(struct rte_pci_ioport *p, case RTE_KDRV_UIO_GENERIC: pci_uio_ioport_read(p, data, len, offset); break; - default: + case RTE_KDRV_NONE: #if defined(RTE_ARCH_X86) - /* special case for x86 ... */ pci_uio_ioport_read(p, data, len, offset); #endif break; + default: + break; } } @@ -678,12 +679,13 @@ rte_eal_pci_ioport_write(struct rte_pci_ioport *p, case RTE_KDRV_UIO_GENERIC: pci_uio_ioport_write(p, data, len, offset); break; - default: + case RTE_KDRV_NONE: #if defined(RTE_ARCH_X86) - /* special case for x86 ... */ pci_uio_ioport_write(p, data, len, offset); #endif break; + default: + break; } } @@ -705,12 +707,13 @@ rte_eal_pci_ioport_unmap(struct rte_pci_ioport *p) case RTE_KDRV_UIO_GENERIC: ret = pci_uio_ioport_unmap(p); break; - default: + case RTE_KDRV_NONE: #if defined(RTE_ARCH_X86) - /* special case for x86 ... nothing to do */ ret = 0; #endif break; + default: + break; } return ret; -- 1.9.1