From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
Received: from mail-wj0-f172.google.com (mail-wj0-f172.google.com
 [209.85.210.172]) by dpdk.org (Postfix) with ESMTP id 3F0E53777
 for <dev@dpdk.org>; Tue,  3 Jan 2017 23:05:52 +0100 (CET)
Received: by mail-wj0-f172.google.com with SMTP id v7so455694874wjy.2
 for <dev@dpdk.org>; Tue, 03 Jan 2017 14:05:52 -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:user-agent:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=xEos7QQXOUQynvUUa9vYWl20+ubuc6RsTTFwiRiz0DM=;
 b=dI6hfcq5Biy90Wa+yj4Z5FBqGd/a+SJxGE27X/7n4cJ4AjE5+kgLAnBjHIIrxlrW76
 q10JKuYU/330jxJoJ4UKZZuT/en33yp+FDW43owhBKBKIJ39H1EjWnkYhQXFSs5GNPVK
 Nkxprh+SA4xau4RdR3r/1ROJ+4+GCUBfCz7NZa8UFBSgNerRdq7+Ktopg49M8WCSUkGs
 DLE90lZVMob3y5MH9M07zx/koCYr23/hNDholdtswRscn+itwYw5uxzTlonrmRyfl71t
 wXEY0T9Vld1Qy/EqeqQKBEUFFFuwW5W69LobI+Hp/scVIVfqzNlXyVuQgi1gLctSShVt
 ncOg==
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:user-agent
 :in-reply-to:references:mime-version:content-transfer-encoding;
 bh=xEos7QQXOUQynvUUa9vYWl20+ubuc6RsTTFwiRiz0DM=;
 b=qxDMiwmvmqXzfvNR3D7MkS3LsLX+KRXb5mEgKXF9UpbFLO/2xejbp5ufQ8bGvumDNW
 PPysuzjgCHv00ywFpgWJtig4LS+zIeSub1cqSb+yLx+EolRF2ukoo7UqiVLXVLvPLKHa
 vlVguir+5QsKnj0svKmr0zqYyJyuKff9z6FZpuKYoTLAYyF1aI6vzYk0/rJXGxF5ce+J
 f1sJa5iYIFj05S6HTq6MxM2ie43+RkU/S65PoJatHKBjpJegIVIlFnMFF4qplnBZyWPY
 m6AsZNnC16+DDGv5auuUXESVzNsQ/9mL/jrjZFkzpPkygUKU1OQG7nxkAIAUUuE7bV8S
 lHDw==
X-Gm-Message-State: AIkVDXJPjPIE3WDWTmRCmtA2bafDSwy/C78v36ZZ5zIry66gIDBYa9jmyOVVNrg2745nkbSL
X-Received: by 10.194.248.233 with SMTP id yp9mr54546321wjc.228.1483481151937; 
 Tue, 03 Jan 2017 14:05:51 -0800 (PST)
Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184])
 by smtp.gmail.com with ESMTPSA id a13sm92254406wma.18.2017.01.03.14.05.51
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 03 Jan 2017 14:05:51 -0800 (PST)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Shreyansh Jain <shreyansh.jain@nxp.com>
Cc: david.marchand@6wind.com, dev@dpdk.org
Date: Tue, 03 Jan 2017 23:05:50 +0100
Message-ID: <5088350.GnaeIEgOPh@xps13>
User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; )
In-Reply-To: <1482758645-23057-6-git-send-email-shreyansh.jain@nxp.com>
References: <1482756644-13726-1-git-send-email-shreyansh.jain@nxp.com>
 <1482758645-23057-1-git-send-email-shreyansh.jain@nxp.com>
 <1482758645-23057-6-git-send-email-shreyansh.jain@nxp.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [PATCH v5 05/12] eal: add probe and remove support
	for rte_driver
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Jan 2017 22:05:52 -0000

2016-12-26 18:53, Shreyansh Jain:
> --- a/lib/librte_eal/common/include/rte_dev.h
> +++ b/lib/librte_eal/common/include/rte_dev.h
> @@ -152,6 +162,8 @@ struct rte_driver {
>  	struct rte_bus *bus;           /**< Bus serviced by this driver */
>  	const char *name;                   /**< Driver name. */
>  	const char *alias;              /**< Driver alias. */
> +	driver_probe_t *probe;         /**< Probe the device */
> +	driver_remove_t *remove;       /**< Remove/hotplugging the device */
>  };

If I understand well, this probe function does neither scan nor match.
So it could be named init.

I think the probe (init) and remove ops must be specific to the bus.
We can have them in rte_bus, and as an example, the pci implementation
would call the pci probe and remove ops of rte_pci_driver.

Please use rte_ prefix in public headers.