From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-x22c.google.com (mail-we0-x22c.google.com [IPv6:2a00:1450:400c:c03::22c]) by dpdk.org (Postfix) with ESMTP id A3FC54BFE for ; Wed, 20 Mar 2013 17:08:43 +0100 (CET) Received: by mail-we0-f172.google.com with SMTP id u50so446510wey.31 for ; Wed, 20 Mar 2013 09:07:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:x-gm-message-state; bh=kQFW6dzZbtfpyXeEFe+P5o7hs4ZuRC5yxyv2DxVbgPw=; b=RSGFKRCLB0Nc5hLLEAekySK8+o9+ZMMfp+OjGuvFIt1vrBWA5JbyzsF0Fp+NGhU8/W 34LJxUlTJRiPPDjej8M7UC30XEwis2STfi6/ep8012eaROE2gAUAoqwPMJn+Ty3C9QkN uPD/e0WrxCW9wEaS4bdqRVUcYqGEsgYodi2AfaTta12O1HG/0Gtbm1cN3SH23hKsJ81i 144QoaU7VZSTsfbw3Z1kogkKclnlWmZhgPG6YxGLQpbwlSkD+P5ZqdYKLLrkjwNdhvH5 CzME5JPkV9tjGh0NTPg45S241HdrLt7+xl4gcoWmYOgtMFdLOoSr9lOFPkGIqyWLHG2f A6fQ== X-Received: by 10.194.176.165 with SMTP id cj5mr5721406wjc.37.1363795664760; Wed, 20 Mar 2013 09:07:44 -0700 (PDT) Received: from 6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPS id k5sm4067921wiy.5.2013.03.20.09.07.42 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 20 Mar 2013 09:07:43 -0700 (PDT) Received: by 6wind.com (sSMTP sendmail emulation); Wed, 20 Mar 2013 17:07:41 +0100 From: Thomas Monjalon To: dev@dpdk.org Date: Wed, 20 Mar 2013 17:05:09 +0100 Message-Id: X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQmsP8G+cm02jeoFBckPDN3PuKzYf1/Q+QAoLDIgjgaGhbo99q627qtdWU+Q2Gk9xdfz08ZK Subject: [dpdk-dev] [PATCH 21/22] igb_uio: fix driver dependency 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: Wed, 20 Mar 2013 16:08:43 -0000 From: Damien Millescamps Allow to run without igb_uio if probed devices don't require it. The condition for exiting with an error is: - Tested driver is needed by a probed device AND - Tested driver needs igb_uio Acked-by: Adrien Mazarguil Signed-off-by: Damien Millescamps --- lib/librte_eal/linuxapp/eal/eal_pci.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index 86002bd..882fd6f 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -701,15 +701,12 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d { struct rte_pci_id *id_table; const char *module_name = NULL; - int ret; + int uio_status = -1; if (dr->drv_flags & RTE_PCI_DRV_NEED_IGB_UIO) module_name = IGB_UIO_NAME; - ret = pci_uio_check_module(module_name); - if (ret != 0) - rte_exit(1, "The %s module is required by the %s driver\n", - module_name, dr->name); + uio_status = pci_uio_check_module(module_name); for (id_table = dr->id_table ; id_table->vendor_id != 0; id_table++) { @@ -730,6 +727,11 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d RTE_LOG(DEBUG, EAL, "probe driver: %x:%x %s\n", dev->id.vendor_id, dev->id.device_id, dr->name); + if ((!dev->blacklisted) && (uio_status != 0)) { + rte_exit(1, "The %s module is required by the %s driver\n", + module_name, dr->name); + } + /* Unbind PCI devices if needed */ if ((!dev->blacklisted) && (module_name != NULL)) { -- 1.7.2.5