From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id B49652D13 for ; Mon, 15 Jan 2018 00:16:58 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2B3AD20D49; Sun, 14 Jan 2018 18:16:58 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 14 Jan 2018 18:16:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=C4H2xg1AhAa8zLcmGdUgWQUdL7 UfEhoZWtanRoYMG6o=; b=bengV8gIyCoIEhB/XI8/gVJ+h+wtXiDB4QwZlF1t+Q NqGZKNp3cdfc8cZlcjYjXq2+dZABtlmts/c+mgviX+W5ptk6KaKLQfdXsT2Zo2d6 DmPqPgHsFiRyUeZsRRkHzpzqg63Lvb3+SrbR+RZdXlKG0x7LeK7Af6ehMYInLNgU E= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=C4H2xg 1AhAa8zLcmGdUgWQUdL7UfEhoZWtanRoYMG6o=; b=NKc7lXgRtGVTPrLrDGBtJD vqvQ32qSFUA3luK7R3OGrv2ld7VUEat9PXD6EApRW01zOHD68BKfTotDYl98gCCd pVj7tcK85QGf4uFTb32Ma3zaU4oXGMvJpBqrr3chmwJjHtMAKewJwyChrmKVlKI+ sM4xK7eROaBoFzaPK1WwyoISIQUVMf98SJRmKvgvTCOXlg8y5nR1YEi12fbL0b9E bjoCZ76J9GMyhmdAdVQ1COcihXf7CCeKAGs43Q2hGptLeg26tN2tmErt/hkqBXan s88VFT8aQS5bmQC+sa9MfCA5MAI28CfEY+VFAZwai6Y72JMoHDnUxA+o2DmVf+xQ == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id CA91A24599; Sun, 14 Jan 2018 18:16:57 -0500 (EST) From: Thomas Monjalon To: Jeff Guo Cc: dev@dpdk.org, stephen@networkplumber.org, bruce.richardson@intel.com, ferruh.yigit@intel.com, gaetan.rivet@6wind.com, konstantin.ananyev@intel.com, jblunck@infradead.org, shreyansh.jain@nxp.com, jingjing.wu@intel.com, helin.zhang@intel.com, motih@mellanox.com Date: Mon, 15 Jan 2018 00:16:26 +0100 Message-ID: <6774704.u5U2Uf1Nb3@xps> In-Reply-To: <1515679534-22473-1-git-send-email-jia.guo@intel.com> References: <1515575544-2141-3-git-send-email-jia.guo@intel.com> <1515679534-22473-1-git-send-email-jia.guo@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH V10 1/2] eal: add uevent monitor api and callback func 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: Sun, 14 Jan 2018 23:16:59 -0000 Hi, 11/01/2018 15:05, Jeff Guo: > +/* A genaral callback for all registerd devices */ Typos: genaral, registerd So the callback is only for registered devices? What about hotplugged devices? > +/** > + * It registers the callback for the specific event. Multiple > + * callbacks cal be registered at the same time. > + * @param event > + * The device event type. > + * @param cb_fn > + * callback address. > + * @param cb_arg > + * address of parameter for callback. > + * > + * @return > + * - On success, zero. > + * - On failure, a negative value. > + */ > +int rte_dev_callback_register(char *dev_name, > + rte_dev_event_cb_fn cb_fn, void *cb_arg); > + > +/** > + * It unregisters the callback according to the specified event. > + * > + * @param event > + * The event type which corresponding to the callback. > + * @param cb_fn > + * callback address. > + * address of parameter for callback, (void *)-1 means to remove all > + * registered which has the same callback address. > + * > + * @return > + * - On success, return the number of callback entities removed. > + * - On failure, a negative value. > + */ > +int rte_dev_callback_unregister(char *dev_name, > + rte_dev_event_cb_fn cb_fn, void *cb_arg); These new functions should be tagged as experimental. > +/** > + * Start the device event monitoring. > + * > + * @param none > + * @return > + * - On success, zero. > + * - On failure, a negative value. > + */ > +int > +rte_dev_evt_mntr_start(void); Should be experimental too, as every new public functions. Please avoid shortening function name too much. rte_dev_event_monitor_start is more pleasant to read.