From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 01215F94 for ; Sat, 9 Mar 2019 01:40:38 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 02B5C21AA2; Fri, 8 Mar 2019 19:40:38 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 08 Mar 2019 19:40:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=dpHuqsdbJPQX6tCRZeKWjppu9pZKTm7LYPGv6OoZTLA=; b=fWs8CeyhrGoy 2mFbnWgKmUkCdP/8sf3ZWkBLiGXBMT7hsFNar69609Sr6sWQrzZw3lzaBE7wYvN/ g48JVte0NCyx3xNrJPu/eCIdZtJcjQwnlpbYnWAS2bPe1hCzOuhOffvyFevQFhrY 1Ndd64a+KzxJL2pX6/UOxbIGIHrRUQY= 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=dpHuqsdbJPQX6tCRZeKWjppu9pZKTm7LYPGv6OoZT LA=; b=hFihBt1qJ90WSPFlgt/a+OY3YMRO8/74IsJ2brM0azd+xNoBW0Puc0IIS HqgUfmJWBgcPsKgp4n27gTHy6mnqg3RZBx4dp8ZFicOWZot+HH9FnLFKAi0KMmMu r12hvcXTjRxNDXMXcywO781GuA3Nqr4XcT1ZPkP/z47y2J7Adf5p1f1spGqIWcPN C7u9Mw/y42LARgvXCfVCY6d1tIZ8frR5ChH//W0CntpuoYZDJyugt8OMhRUXVli0 gsSKD3NKp0Qs1BhKcW38H5jGsZLsorx6o/LePtfzpsmlC+Wx3Vu1sdDZr10sA9nq Z8j0SNCOoa5vLuCaAON0kyneWidYQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrgedugddvgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id C70AAE469F; Fri, 8 Mar 2019 19:40:36 -0500 (EST) From: Thomas Monjalon To: Jakub Grajciar Cc: dev@dpdk.org Date: Sat, 09 Mar 2019 01:40:35 +0100 Message-ID: <2246346.ABkemhhLro@xps> In-Reply-To: <20181217123009.23501-1-jgrajcia@cisco.com> References: <20181217123009.23501-1-jgrajcia@cisco.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v8] eal_interrupts: add option for pending callback unregister 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: Sat, 09 Mar 2019 00:40:39 -0000 Sorry for the delay in review. I hoped someone else would review this patch. Let's get this patch in DPDK 19.05, after doing some small changes (see below). 17/12/2018 13:30, Jakub Grajciar: > use case: if callback is used to receive message form socket, > and the message received is disconnect/error, this callback needs > to be unregistered, but cannot because it is still active. > > With this patch it is possible to mark the callback to be > unregistered once the interrupt process is done with this > interrupt source. > > Signed-off-by: Jakub Grajciar > --- > .../common/include/rte_interrupts.h | 32 +++++++ > lib/librte_eal/linuxapp/eal/eal_interrupts.c | 85 ++++++++++++++++++- > lib/librte_eal/rte_eal_version.map | 1 + > 3 files changed, 116 insertions(+), 2 deletions(-) We are missing the BSD implementation. Please add at least a function returning -ENOTSUP. > +/** > + * It unregisters the callback according to the specified interrupt handle, > + * after it's no longer acive. Failes if source is not active. Suggested reword: Unregister the callback according to the specified interrupt handle, after it's no longer active. Fail if source is not active. > + * > + * @param intr_handle > + * pointer to the interrupt handle. > + * @param cb The parameter is cb_fn. Please check doxygen with "make doc-api-html" > + * callback address. > + * @param cb_arg > + * address of parameter for callback, (void *)-1 means to remove all > + * registered which has the same callback address. > + * @param ucb_fn > + * callback to call before cb is unregistered (optional). > + * can be used to close fd and free cb_arg. > + * > + * @return > + * - On success, return the number of callback entities marked for remove. > + * - On failure, a negative value. > + */ > +int __rte_experimental > +rte_intr_callback_unregister_pending(const struct rte_intr_handle *intr_handle, > + rte_intr_callback_fn cb_fn, void *cb_arg, > + rte_intr_unregister_callback_fn ucb_fn);