From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id 660B1C6C8 for ; Fri, 29 Jan 2016 15:08:48 +0100 (CET) Received: by mail-wm0-f53.google.com with SMTP id r129so70129447wmr.0 for ; Fri, 29 Jan 2016 06:08:48 -0800 (PST) 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=ehgMIAW9U5d7VGb9HtADsJpm3qW+enMUde8U5xWq498=; b=iDZYgirT2R4bZhLP73lgFKchExT6kF5dDau2lxVRvBukMWqGbUqAmnis22xqpxCwDo kVEHiI4tgujAfdmov2BoWVpV866Ve6P1dugJ1pap9x0LemP3zW17hD/rA0p6CXTAyNwK Xw+AOTwXCqfSubFBHNzKCkRvMA3KtJjg38Xi1vjn714eTXgv1qxqMP6zDZAJSXF/RQpY Fmvs8UNP43vpXPpayYwtvevap4vCXr63R/5zYoH9EIWcwKKaCpe5xhwzPZZNklZbvAal C8TY1aNf+qJdsuC+pIPJ9rcVnRdNuCooWDjekAvPnh4ivKa7dYMrRC+z/WOYy7MayApG jYSQ== 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=ehgMIAW9U5d7VGb9HtADsJpm3qW+enMUde8U5xWq498=; b=CipDrk3q9QTKzUhUVPTh4kw1TheE8xPNuvvRn6Wb2UiP0Wt9Fsp9Va/ZmZDT2UK778 MiWNjnyQiDo3fp3pSJB6zaXwd9hoJYFB6OAPEQQ2Hs0zkmDUors5Q7glRjc9NVWjofuv jB4q7zQ+Jpi9dZaBqxCtESO4WXUHi5ovb9pu42eVh98A+1hVn8ESKEGlDdyGteFSpdvA GgBSZCCFqztGPg82Vdh2Bfl6SDVVVAJ1TY6V434tj1hKUWKUeeOMAlLeDVoLA9+eaiL8 xzr/z1ZRikHXtUDIA4DC3u9KsejkXDMB76PIziI7AwoC08YZDQmi2rd78HGb+lKIi+/p FIVQ== X-Gm-Message-State: AG10YOThP+meXAxyZcgddRDMFvOsSZSX9GiNbOF1bKw72gMt/p0nAZUc7Z78zwH4vhRHpbSH X-Received: by 10.28.95.6 with SMTP id t6mr8626631wmb.59.1454076528292; Fri, 29 Jan 2016 06:08:48 -0800 (PST) Received: from gloops.dev.6wind.com (144.77.126.78.rev.sfr.net. [78.126.77.144]) by smtp.gmail.com with ESMTPSA id 67sm7669944wmp.20.2016.01.29.06.08.47 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 29 Jan 2016 06:08:47 -0800 (PST) From: David Marchand To: dev@dpdk.org Date: Fri, 29 Jan 2016 15:08:33 +0100 Message-Id: <1454076516-21591-7-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454076516-21591-1-git-send-email-david.marchand@6wind.com> References: <1454076516-21591-1-git-send-email-david.marchand@6wind.com> Cc: viktorin@rehivetech.com Subject: [dpdk-dev] [PATCH 6/9] eal: initialize vdevs right next to pci devices 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: Fri, 29 Jan 2016 14:08:48 -0000 This way, the resources probing happens in a common place. Signed-off-by: David Marchand --- lib/librte_eal/bsdapp/eal/eal.c | 7 +++++++ lib/librte_eal/common/include/rte_dev.h | 2 +- lib/librte_eal/linuxapp/eal/eal.c | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index a34e61d..b557a9f 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -582,8 +582,10 @@ rte_eal_init(int argc, char **argv) rte_config.master_lcore, thread_id, cpuset, ret == 0 ? "" : "..."); +#ifndef RTE_NEXT_ABI if (rte_eal_dev_init() < 0) rte_panic("Cannot init pmd devices\n"); +#endif RTE_LCORE_FOREACH_SLAVE(i) { @@ -617,6 +619,11 @@ rte_eal_init(int argc, char **argv) rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER); rte_eal_mp_wait_lcore(); +#ifdef RTE_NEXT_ABI + if (rte_eal_dev_init() < 0) + rte_panic("Cannot probe vdev devices\n"); +#endif + /* Probe & Initialize PCI devices */ if (rte_eal_pci_probe()) rte_panic("Cannot probe PCI\n"); diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h index 88c1a19..df69e28 100644 --- a/lib/librte_eal/common/include/rte_dev.h +++ b/lib/librte_eal/common/include/rte_dev.h @@ -156,7 +156,7 @@ void rte_eal_driver_register(struct rte_driver *driver); void rte_eal_driver_unregister(struct rte_driver *driver); /** - * Initalize all the registered drivers in this process + * Scan all devargs and attach to drivers if available */ int rte_eal_dev_init(void); diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 62241ee..95313af 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -834,8 +834,10 @@ rte_eal_init(int argc, char **argv) rte_config.master_lcore, (int)thread_id, cpuset, ret == 0 ? "" : "..."); +#ifndef RTE_NEXT_ABI if (rte_eal_dev_init() < 0) rte_panic("Cannot init pmd devices\n"); +#endif RTE_LCORE_FOREACH_SLAVE(i) { @@ -873,6 +875,11 @@ rte_eal_init(int argc, char **argv) rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER); rte_eal_mp_wait_lcore(); +#ifdef RTE_NEXT_ABI + if (rte_eal_dev_init() < 0) + rte_panic("Cannot probe vdev devices\n"); +#endif + /* Probe & Initialize PCI devices */ if (rte_eal_pci_probe()) rte_panic("Cannot probe PCI\n"); -- 1.9.1