From patchwork Thu Apr 26 14:54:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 39042 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 937678D97; Thu, 26 Apr 2018 16:54:46 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 690F87CFF for ; Thu, 26 Apr 2018 16:54:45 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id B1F9C20FEF; Thu, 26 Apr 2018 10:54:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 26 Apr 2018 10:54:44 -0400 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=hRyKt+gjx6SSTlzUK7FHSXP2hH 5NI9gZYqc80vEWU98=; b=o8WL4ObmBpH0BomW7hBAnR1gmv8wRBahqfqF681Jr7 Gttxl9HPFSVX3UmwIEq2LuwX8b30Kq/s9Xfbg7Jpykfnm/0yltSCrX/G9zkxRSva vZ6AbfG4me/I3itMxpZKmalIV8Qq+adVPgwL7/v+GuCCwgCxvy4e6egkk34x1HDq M= 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=fm2; bh=hRyKt+ gjx6SSTlzUK7FHSXP2hH5NI9gZYqc80vEWU98=; b=FDMoArNFPq0EClcIKSQCdv Z5UPvRQQiTWm6GgEED7qKALynHppyRYbK7oh9/uB82X6HBdnAnrnc8aC8r+VZCZv PvgtkqvuhDk6qJBFjH1kLq3kHsewae/vWdThY36kpcGY8ELxitu0VD4Xqo3VDnI9 IFg/o1YOtIGube2jAuRfFCU5gp6m1GhXq+tlz1+qhqvzqkxPRyavDLDFgguV+7/e 1rJ80xBd0XEb6fKWKGDVO7ZmzWOK7FXlFIKPXI71xSEP3jHA2pIjBqqIWcktEJOw T9RdtI613q1dI/yXjPsdIdQB9xGTkEsVHYhcZwygheHHAfW671eOoWA/ccd05/zg == 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 7217AE47A0; Thu, 26 Apr 2018 10:54:43 -0400 (EDT) From: Thomas Monjalon To: "Carrillo, Erik G" Cc: "Burakov, Anatoly" , "dev@dpdk.org" , Neil Horman , "Mcnamara, John" , "Kovacevic, Marko" , Robert Sanford , "olivier.matz@6wind.com" , "shreyansh.jain@nxp.com" Date: Thu, 26 Apr 2018 16:54:42 +0200 Message-ID: <5414097.qiRGovPonW@xps> In-Reply-To: References: <2584582.pWCQVUZt55@xps> MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] lcore: make semantics of lcore role function more intuitive 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 26/04/2018 16:44, Carrillo, Erik G: > Thanks, Anatoly and Thomas. I had also considered the following chunk for the release notes: > > diff --git a/doc/guides/rel_notes/release_18_05.rst b/doc/guides/rel_notes/release_18_05.rst > index 04ff4fe..127a7e2 100644 > --- a/doc/guides/rel_notes/release_18_05.rst > +++ b/doc/guides/rel_notes/release_18_05.rst > @@ -72,6 +72,11 @@ API Changes > Also, make sure to start the actual text at the margin. > ========================================================= > > +* **rte_lcore_has_role() return values changed** > + > + This function now returns 1 or 0 for true or false, respectively, rather > + than 0 or <0 for success or failure to make use of the function more > + intuitive. > > ABI Changes > ----------- > > Do we want this note? Also, it looks like the Doxygen documentation of the function in the header file didn't get updated. Oh, you are right, this patch is not complete. I've fixed it: --- a/doc/guides/rel_notes/release_18_05.rst +++ b/doc/guides/rel_notes/release_18_05.rst @@ -161,6 +161,12 @@ API Changes announced at least one release before the ABI change is made. There are no ABI breaking changes planned. +* eal: ``rte_lcore_has_role()`` return value changed. + + This function now returns true or false, respectively, rather + than 0 or <0 for success or failure. + It makes use of the function more intuitive. + * mempool: capability flags and related functions have been removed. Flags ``MEMPOOL_F_CAPA_PHYS_CONTIG`` and diff --git a/lib/librte_eal/common/include/rte_lcore.h b/lib/librte_eal/common/include/rte_lcore.h index 334a0629e..1a2f37eaa 100644 --- a/lib/librte_eal/common/include/rte_lcore.h +++ b/lib/librte_eal/common/include/rte_lcore.h @@ -311,7 +311,7 @@ rte_ctrl_thread_create(pthread_t *thread, const char *name, * @param role * The role to be checked against. * @return - * On success, return 0; otherwise return a negative value. + * Boolean value: positive if test is true; otherwise returns 0. */ Thanks Erik!