From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id 3EBF03252 for ; Wed, 31 May 2017 15:18:19 +0200 (CEST) Received: by mail-wm0-f45.google.com with SMTP id e127so19926925wmg.1 for ; Wed, 31 May 2017 06:18:19 -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=S+ckmQ0hyqz9V3SdgLPTGupIEIyhm05fohqG2SGWgN4=; b=BWH/GhdMDfx1VgjUy5bRP1WZjAO1BSYpn1241sRQiPFi3SgbqmIiI/Aq9e4suW7z6L slGGS/UM/Plz2fLBrAuRNSeyZ6D0YmEfnMfI/euuhTEqCYVhp+q2o+kQc4QJab5CfWyk CFJknq8SxgjqHVnvM7zwE7xXYX/olwNVlcmbodvbw/PfFFagiZHn5IumPnXemtbncuGk jBEViNaaQh2kct1O+rKQ6ihM7nphrflGtad58f5HBG0Mb4+JFtLBkcKWrnbe7FvSsGy2 lDngWEZClgmQeP16PbPdSTYFRgAnYNk5BqRfQUL43KJpHKMxWvQWAQbsGckrGcjbHyKg 0WEg== 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=S+ckmQ0hyqz9V3SdgLPTGupIEIyhm05fohqG2SGWgN4=; b=NGjvE7VDQdaU1rfG/GpBnPss8xd5FG25lEqpGxwXZ/JQS5jrCdKRvpfq2/KdLSDWma MrVu/YJu07bz/Wj7EZZbeYO3JIgmBYe6W/PAO4FKDzsU3qTMAMTGu5TpUDO4y9R+bpGJ G1Y2U6OqFXvLyXOW/jAzd1sNyehNpIoeVnmFHsbk5JgGWeP/RCmnMPBjem7tRAkEQhHr 0PvpYoEagvWiCw7DLdPiupWdwhWaUrgz2EDflnfen7bQh1bh3krFWJDBXKV0LLVH2L6N fvydXHLo/zyAZFhcoZQ8xvtMvqvfmnp5ednxo9fUSW1ANXZDYu/3ddc5qUsn7LeHo3L7 FyOw== X-Gm-Message-State: AODbwcBoF7uxt2/epmwaBh2QpVOq57m5E83vXgEKNO1ck/warCfJgoOi PMlOcVD7Xm9N7T3xYXw= X-Received: by 10.28.59.212 with SMTP id i203mr5097947wma.14.1496236698654; Wed, 31 May 2017 06:18:18 -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 g77sm10045744wmd.19.2017.05.31.06.18.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 May 2017 06:18:17 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Jan Blunck , Gaetan Rivet Date: Wed, 31 May 2017 15:17:53 +0200 Message-Id: <7e199f587566661d631c07676651fa53ec6cfd20.1496235017.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 v2 08/11] vdev: implement unplug bus 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: Wed, 31 May 2017 13:18:19 -0000 From: Jan Blunck Signed-off-by: Jan Blunck Signed-off-by: Gaetan Rivet --- lib/librte_eal/common/eal_common_vdev.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c index 813955e..67c6fff 100644 --- a/lib/librte_eal/common/eal_common_vdev.c +++ b/lib/librte_eal/common/eal_common_vdev.c @@ -356,11 +356,18 @@ vdev_plug(struct rte_devargs *da) return rte_vdev_init(da->virt.drv_name, da->args); } +static int +vdev_unplug(struct rte_devargs *da) +{ + return rte_vdev_uninit(da->virt.drv_name); +} + static struct rte_bus rte_vdev_bus = { .scan = vdev_scan, .probe = vdev_probe, .find_device = vdev_find_device, .plug = vdev_plug, + .unplug = vdev_unplug, }; RTE_INIT(rte_vdev_bus_register); -- 2.1.4