From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v5 05/12] eal: add probe and remove support for rte_driver Date: Tue, 03 Jan 2017 23:05:50 +0100 Message-ID: <5088350.GnaeIEgOPh@xps13> 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: david.marchand@6wind.com, dev@dpdk.org To: Shreyansh Jain Return-path: 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 ; Tue, 3 Jan 2017 23:05:52 +0100 (CET) Received: by mail-wj0-f172.google.com with SMTP id v7so455694874wjy.2 for ; Tue, 03 Jan 2017 14:05:52 -0800 (PST) In-Reply-To: <1482758645-23057-6-git-send-email-shreyansh.jain@nxp.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.