From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com [209.85.128.180]) by dpdk.org (Postfix) with ESMTP id 64D6737B4 for ; Fri, 7 Jul 2017 02:10:05 +0200 (CEST) Received: by mail-wr0-f180.google.com with SMTP id r103so24422438wrb.0 for ; Thu, 06 Jul 2017 17:10:05 -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 :in-reply-to:references; bh=AblY2JondnmFsUasWiQ8n4+JlSPQf5ihDTj4yEwjwGY=; b=DTcRpZyOTqz/QxBmxfizhyQP92ZoJ64TNS3TEpSVdte9g3+VtEhhFoo/dclMsKQtSc lxqa4SFYAp9yVU6EXJjkR9qgpwRokLcLxrRyKoIatC7TiH8164SwCDXh/Ka1vGhbz/gn G/QtUg8LW8JsQO/GAPy6VAwzTIT8esf2UE8o1zv9xnD/sdjkmnN5+cURurb76xZ2lRGx nT2UOUyGRbvtPhEYsVPL8OQQqmRVbt+2HEd3pPG5ESGrA4jHhVwHZuq2jS/KU4rVRcw6 71ZBDAHvlymZbXz6Z6tevB+edi4b2DRn5RDP2CmxSJi8VDu1mwwr/NxA5NUG9VSRQVT9 ujdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=AblY2JondnmFsUasWiQ8n4+JlSPQf5ihDTj4yEwjwGY=; b=lXsKBaqjUSjmaC3chJmU9Zdzo1zKp2YH+X7QkzdmVNF8IDCbFZDFvVVTDd9cRC5qjr kKmZy6i7vgNRdn9LaqG4yf018Z6mOD5CBwSBWLUfMt6yCmsgmZV73tY0qNXx5rDaP7Pz qJMCVQS8ZaXqdJMa/NULrRU7WN//k/KlaMePPjjYD5pQamQM7R3fUckp3OrOaYlWX1yj qPr90hFOzNccWWmrr3oYsLH4FOREk5LMVc+uqwTBYx9wzo3nMtB60TyNJDPFK19LWzNM NGfFJrYWumJFlws9rYcUSdLEEovZi34wN190utJ1Z+sKIeXrkVeqg/eFrinYmMf7Miwb Xlzw== X-Gm-Message-State: AIVw110ho44Fksd8uGVU0kXn+eBDZmCtCRjSgnw4ht8X1wYogI77IVSU JppB0r0ghJeJ76rQHOE= X-Received: by 10.28.4.141 with SMTP id 135mr298796wme.21.1499386204881; Thu, 06 Jul 2017 17:10:04 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id f45sm2391166wrf.2.2017.07.06.17.10.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Jul 2017 17:10:04 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Fri, 7 Jul 2017 02:09:16 +0200 Message-Id: <420cab3f6d135850235f36872bc8a972cbe9bf20.1499385282.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v6 09/22] vdev: implement plug operation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 00:10:05 -0000 Signed-off-by: Gaetan Rivet --- lib/librte_eal/common/eal_common_vdev.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c index 517a9f3..5f1c224 100644 --- a/lib/librte_eal/common/eal_common_vdev.c +++ b/lib/librte_eal/common/eal_common_vdev.c @@ -356,12 +356,14 @@ vdev_find_device(const struct rte_device *start, rte_dev_cmp_t cmp, } static int +vdev_plug(struct rte_device *dev, const char *args __rte_unused) +{ + return vdev_probe_all_drivers(RTE_DEV_TO_VDEV(dev)); +} + +static int vdev_unplug(struct rte_device *dev) { - /* - * The virtual bus doesn't support 'unattached' devices so this is - * actually equal to hotplugging removal of it. - */ return rte_vdev_uninit(dev->name); } @@ -369,7 +371,7 @@ static struct rte_bus rte_vdev_bus = { .scan = vdev_scan, .probe = vdev_probe, .find_device = vdev_find_device, - /* .plug = NULL, see comment on vdev_unplug */ + .plug = vdev_plug, .unplug = vdev_unplug, .parse = vdev_parse, }; -- 2.1.4