From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 53B23CF68 for ; Tue, 11 Apr 2017 17:44:40 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id w204so14459418wmd.1 for ; Tue, 11 Apr 2017 08:44:40 -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=kisyVZWPIC794edaKHypAknEjemGSNbtztLxRe0wqek=; b=UDKMSDiaPCu2MHumV2SoF28OttB7gcaGT+1vDVX8Nhl6BK+DQR5jxM9gKMC/GOv6mL LWlgAfp/v8Ui6RBRvyuqi9iFTx2LyG39rJNnH1qBijh7EE9TCtkPL1Zw2X0+Lk4E5xQN 3pAgqQCiA44BZaQstu/aOSpsupL43P1pcvgOEe0mKwIjaoh/h5SlvB2YJnrOf6KzvGzJ 2jKM9WvsRSwjY+ILHgxnQSum7UbfYn4S/F+Ysxof+XJeHGyw97L4pJCnOWP5glxTnkrf +yNKwjFGX79OG4LvqZOiVQT7NLuof+XVViLrjNICk+95L+yYo7RAwPasBrVx7PHo9ukV Qd9Q== 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=kisyVZWPIC794edaKHypAknEjemGSNbtztLxRe0wqek=; b=hoGZLT0hoQRJBCQ7dFh29Evhhb25hrLw4ixfkqJDRxNA8iQaMiUos1i0q+ZXhoqbol pa4JsqmC2lCkMt1JSP2NBnrj3eDRfGM0O4O07bARtUgIJsnwIRIIJGWjxQXk+M7KaiBB BsOx7GLlg31KirkGwZ5376tfpBHajZyHL4/rGlPeEPhpC8rFEh0frdZ7OqhCmDnPH6Lo 3Zlg7ay4WxW6QPPzmBueMV7QVj1y7aUmW5nO91DMq17DicPwsvv/0G8cPjOnxnp9MbfL J1LxGpTqSyqvr3DFou7NVuKgkwlX0NdT16Y6mA5NSZTo71mUCFQNyqA4g6VXhDs36wb4 PuiQ== X-Gm-Message-State: AN3rC/654hl4ycxRTfBrzOTxrZM74DiQ7DxjPdYJwiaiRoZ5SxgX3wj1 xaNHyk9UwEDviFtD7KI= X-Received: by 10.28.150.145 with SMTP id y139mr15155891wmd.109.1491925479552; Tue, 11 Apr 2017 08:44:39 -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 v14sm2936830wmv.24.2017.04.11.08.44.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Apr 2017 08:44:38 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Jan Blunck Date: Tue, 11 Apr 2017 17:44:14 +0200 Message-Id: <7a993e44ace91034094bdb65c27b5a93baa72693.1491925092.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: <1488797809-12917-1-git-send-email-jblunck@infradead.org> In-Reply-To: References: Subject: [dpdk-dev] [PATCH v5 10/12] net/kni: use generic vdev for probe and remove 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: Tue, 11 Apr 2017 15:44:40 -0000 Signed-off-by: Gaetan Rivet --- drivers/net/kni/rte_eth_kni.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index 59205e7..e3ce572 100644 --- a/drivers/net/kni/rte_eth_kni.c +++ b/drivers/net/kni/rte_eth_kni.c @@ -393,7 +393,7 @@ eth_kni_create(const char *name, struct eth_kni_args *args, eth_dev->data = data; eth_dev->dev_ops = ð_kni_ops; - eth_dev->driver = NULL; + eth_dev->device->driver = NULL; data->dev_flags = RTE_ETH_DEV_DETACHABLE; data->kdrv = RTE_KDRV_NONE; @@ -442,12 +442,16 @@ eth_kni_kvargs_process(struct eth_kni_args *args, const char *params) } static int -eth_kni_probe(const char *name, const char *params) +eth_kni_probe(struct rte_vdev_device *vdev) { struct rte_eth_dev *eth_dev; struct eth_kni_args args; + const char *name; + const char *params; int ret; + name = rte_vdev_device_name(vdev); + params = rte_vdev_device_args(vdev); RTE_LOG(INFO, PMD, "Initializing eth_kni for %s\n", name); ret = eth_kni_kvargs_process(&args, params); @@ -475,11 +479,13 @@ eth_kni_probe(const char *name, const char *params) } static int -eth_kni_remove(const char *name) +eth_kni_remove(struct rte_vdev_device *vdev) { struct rte_eth_dev *eth_dev; struct pmd_internals *internals; + const char *name; + name = rte_vdev_device_name(vdev); RTE_LOG(INFO, PMD, "Un-Initializing eth_kni for %s\n", name); /* find the ethdev entry */ -- 2.1.4