From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id BC2307E7C for ; Thu, 11 Dec 2014 14:50:38 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 11 Dec 2014 05:48:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,557,1413270000"; d="scan'208";a="622184870" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 11 Dec 2014 05:50:36 -0800 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id sBBDoZ4e008181 for ; Thu, 11 Dec 2014 13:50:35 GMT Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id sBBDoZLn010067 for ; Thu, 11 Dec 2014 13:50:35 GMT Received: (from pdelarax@localhost) by sivswdev02.ir.intel.com with id sBBDoZB9010063 for dev@dpdk.org; Thu, 11 Dec 2014 13:50:35 GMT From: Pablo de Lara To: dev@dpdk.org Date: Thu, 11 Dec 2014 13:50:35 +0000 Message-Id: <1418305835-10031-1-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] app/test: fix multiprocess unit test when device is bound to uio 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: Thu, 11 Dec 2014 13:50:39 -0000 Since commit a155d4301 "support link bonding device initialization", EAL probes drivers to the PCI devices in rte_eal_init, then PCI resources are mapped if a device is bound to igb_uio driver, for instance. Therefore, test app probes all the devices and multiprocess unit test tries to map resources twice in the secondary processes, and test fails, caused by RTE_PCI_DRV_NEEDED_MAPPING flag in dummy pci driver my_driver2. Test is fixed by setting the driver flags to 0. Signed-off-by: Pablo de Lara --- app/test/test_pci.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/app/test/test_pci.c b/app/test/test_pci.c index 4f0169a..747d8b7 100644 --- a/app/test/test_pci.c +++ b/app/test/test_pci.c @@ -64,11 +64,6 @@ static unsigned pci_dev_count; static int my_driver_init(struct rte_pci_driver *dr, struct rte_pci_device *dev); -/* - * To test cases where RTE_PCI_DRV_NEED_MAPPING is set, and isn't set, two - * drivers are created (one with IGB devices, the other with IXGBE devices). - */ - /* IXGBE NICS */ struct rte_pci_id my_driver_id[] = { @@ -92,7 +87,7 @@ struct rte_pci_driver my_driver = { .name = "test_driver", .devinit = my_driver_init, .id_table = my_driver_id, - .drv_flags = RTE_PCI_DRV_NEED_MAPPING, + .drv_flags = 0, }; struct rte_pci_driver my_driver2 = { -- 1.7.4.1