From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 57EA59A8D for ; Tue, 24 Feb 2015 14:30:52 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 24 Feb 2015 05:26:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,638,1418112000"; d="scan'208";a="690000607" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 24 Feb 2015 05:30:49 -0800 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t1ODUmvU021026; Tue, 24 Feb 2015 13:30:48 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id t1ODUmfT019428; Tue, 24 Feb 2015 13:30:48 GMT Received: (from bricha3@localhost) by sivswdev01.ir.intel.com with id t1ODUmG1019424; Tue, 24 Feb 2015 13:30:48 GMT From: Bruce Richardson To: dev@dpdk.org Date: Tue, 24 Feb 2015 13:30:47 +0000 Message-Id: <1424784647-19367-4-git-send-email-bruce.richardson@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1424784647-19367-1-git-send-email-bruce.richardson@intel.com> References: <1424703444-30761-1-git-send-email-bruce.richardson@intel.com> <1424784647-19367-1-git-send-email-bruce.richardson@intel.com> Subject: [dpdk-dev] [PATCH v4 3/3] eal: remove unnecessary check for primary instance 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, 24 Feb 2015 13:30:52 -0000 In pci_uio_map_resource we check that we are in a primary process before calling pci_uio_set_bus_master. However, there is already an earlier check which means that we are always in a primary instance at this point in the code, so the check can be removed. Signed-off-by: Bruce Richardson Acked-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c index c12794e..0a95376 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c @@ -304,11 +304,9 @@ pci_uio_map_resource(struct rte_pci_device *dev) } /* set bus master that is not done by uio_pci_generic */ - if (rte_eal_process_type() == RTE_PROC_PRIMARY) { - if (pci_uio_set_bus_master(dev->intr_handle.uio_cfg_fd)) { - RTE_LOG(ERR, EAL, "Cannot set up bus mastering!\n"); - return -1; - } + if (pci_uio_set_bus_master(dev->intr_handle.uio_cfg_fd)) { + RTE_LOG(ERR, EAL, "Cannot set up bus mastering!\n"); + return -1; } /* allocate the mapping details for secondary processes*/ -- 2.1.0