From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id AF649A0096 for ; Fri, 10 May 2019 11:33:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C199E4CA6; Fri, 10 May 2019 11:33:41 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 3FFC84C8F for ; Fri, 10 May 2019 11:33:40 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 May 2019 02:33:39 -0700 X-ExtLoop1: 1 Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.96]) by fmsmga004.fm.intel.com with SMTP; 10 May 2019 02:33:37 -0700 Received: by (sSMTP sendmail emulation); Fri, 10 May 2019 10:33:36 +0100 Date: Fri, 10 May 2019 10:33:36 +0100 From: Bruce Richardson To: Thomas Monjalon Cc: dev@dpdk.org, "Hunt, David" , Hajkowski , john.mcnamara@intel.com, marko.kovacevic@intel.com Message-ID: <20190510093335.GB76@bricha3-MOBL.ger.corp.intel.com> References: <20190313192107.696-1-marcinx.hajkowski@intel.com> <2474197.K3lgESSsOM@xps> <20190510092814.GA76@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline In-Reply-To: <20190510092814.GA76@bricha3-MOBL.ger.corp.intel.com> User-Agent: Mutt/1.11.4 (2019-03-13) Subject: Re: [dpdk-dev] [PATCH 1/1] doc: announce change in power API 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" Message-ID: <20190510093336.Asvb6AbD1IhEtialn3xcIFNmsnG40NBAgxqf31YFogU@z> On Fri, May 10, 2019 at 10:28:14AM +0100, Bruce Richardson wrote: > On Fri, May 10, 2019 at 01:28:09AM +0200, Thomas Monjalon wrote: > > > > From: Marcin Hajkowski > > > > > > > > Function rte_power_set_env will no longer return > > > > success on attempt to set env in initialized state. > > > > > > > > Signed-off-by: Marcin Hajkowski > > > > > > Acked-by: David Hunt > > > > Any other comment about this deprecation notice? > > > Seems ok to me, though the actual text is maybe a little unclear. It > implies that the function will always return -1 unless the variable is > unset when the function terminates (which seems to imply a failure case). > What I presume is meant is that we have three possibilities: > > * The variable is set by the function -> return 0 > * The varaible is already set, so no action needed -> return -1 (and set > rte_errno to EEXIST or EALREADY??) > * Setting the variable failed -> return -1 (and set rte_errno to ??) > > Is my understanding correct? Can the deprecation notice be improved to make > it clear that only the middle case is the one being changed, e.g. by adding > "in this case" to the second sentence. It might also be worthwhile calling > out what the errno value will be to identify this failure vs regular > failures. > > /Bruce > > PS: For this case, is there a reason to make it an error? Would a +1 value > not also do, so anything non-zero implies no work done, and anything >=0 > means that the value is set? Call set on something already set doesn't > really seem like an error case to me. Sorry, forgot to put: For changing the ABI itself, no issues, so with the small rewording asked for, please add my ack. Acked-by: Bruce Richardson