From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH V21 2/4] eal: add device event monitor framework Date: Thu, 12 Apr 2018 10:36:22 +0200 Message-ID: <3416717.nsP6q0ReyN@xps> References: <1522944617-16601-5-git-send-email-jia.guo@intel.com> <1522986902-13059-1-git-send-email-jia.guo@intel.com> <1522986902-13059-3-git-send-email-jia.guo@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, stephen@networkplumber.org, bruce.richardson@intel.com, ferruh.yigit@intel.com, konstantin.ananyev@intel.com, gaetan.rivet@6wind.com, jingjing.wu@intel.com, motih@mellanox.com, harry.van.haaren@intel.com, jianfeng.tan@intel.com, shreyansh.jain@nxp.com, helin.zhang@intel.com To: Jeff Guo Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 15D621BABE for ; Thu, 12 Apr 2018 10:36:26 +0200 (CEST) In-Reply-To: <1522986902-13059-3-git-send-email-jia.guo@intel.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" 06/04/2018 05:55, Jeff Guo: > v21->v20: This is a very high number of revisions. I cannot see them in my mail client because they are too much nested and indented in the thread representation. Tip: when sending a new revision, it is better to thread it with the first revision, so we do not have an infinite nesting. > --- a/doc/guides/rel_notes/release_18_05.rst > +++ b/doc/guides/rel_notes/release_18_05.rst > +* **Added device event monitor framework.** > + > + Added a general device event monitor framework at EAL, for device dynamic management. > + Such as device hotplug awareness and actions adopted accordingly. The list of new APIs: > + > + * ``rte_dev_event_monitor_start`` and ``rte_dev_event_monitor_stop`` are for > + the event monitor enable and disable. > + * ``rte_dev_event_callback_register`` and ``rte_dev_event_callback_unregister`` > + are for the user's callbacks register and unregister. > > API Changes Please keep 2 blank lines before the title. > +/* The device event callback list for all registered callbacks. */ > +static struct dev_event_cb_list dev_event_cbs; > + > +/** @internal Structure to keep track of registered callbacks */ > +TAILQ_HEAD(dev_event_cb_list, dev_event_callback); There is a compilation error with clang: lib/librte_eal/common/eal_common_dev.c:37:33: fatal error: tentative definition of variable with internal linkage has incomplete non-array type 'struct dev_event_cb_list' [-Wtentative-definition-incomplete-type] static struct dev_event_cb_list dev_event_cbs; ^ > --- a/lib/librte_eal/rte_eal_version.map > +++ b/lib/librte_eal/rte_eal_version.map > @@ -258,5 +258,9 @@ EXPERIMENTAL { > rte_service_start_with_defaults; > rte_socket_count; > rte_socket_id_by_idx; > + rte_dev_event_monitor_start; > + rte_dev_event_monitor_stop; > + rte_dev_event_callback_register; > + rte_dev_event_callback_unregister; > > } DPDK_18.02; Please keep the alphabetical order.