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 DC6454C8F for ; Tue, 2 Apr 2019 18:05:55 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 69221221F7; Tue, 2 Apr 2019 12:05:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 02 Apr 2019 12:05:55 -0400 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=3PkBVkP/5N8pf+VYEcT+OGc9eRSmc5CKRDPZbvFfmr8=; b=Jp/ZBU2kgl9z cEYSHPuAKMP+HFOTsxKehvubovBtQtFBrxXmZ0tv0L5FApnYabgrHyjpMTYD5y+8 rUyNxTWRXGCteD3f7je+NM12uGTca5kalcQV9FFoExQ8PBlGfV5ur949iEtHTvIL JlBNIOkHQwzwPP1qKMx70K3SsCy+lR8= 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=3PkBVkP/5N8pf+VYEcT+OGc9eRSmc5CKRDPZbvFfm r8=; b=5A3ja2FI2csCkGDsyJn5tuyxruvAsLZYzPu1TRiN52qyqCRtWo+cBJGjW mEXUNeNwe+dfpaTlv29nW/RJXDN9RzgGIzClenf+DYESUIdklie4nsUm3wbiTPim iMOcGHWgb2LC8YXkYlbYhxCLEVmyvishowozrqRUInHPaLL2Wa7FIvscou4LLKbu 9Gb6Mffon7dR0inc7fuU4QREinO1BetOSqILu8+rJbFf3nPpwBfmfb92/2mzYx1D NTyFQcVD8Zt6DXQTmOhiaus749yv/kw9OolgGcChwlwZi1FAyEpIQTcPSisdXzqe QpBTf4wBoyEX9wl8t+T3WGGT6Uvww== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrtddtgdejieculddtuddrgedutddrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvden ucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrg hlohhnrdhnvghtqeenucfkphepjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhep mhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsth gvrhfuihiivgeptd 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 F2512E4176; Tue, 2 Apr 2019 12:05:53 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org, maxime.coquelin@redhat.com Date: Tue, 02 Apr 2019 18:05:52 +0200 Message-ID: <5398787.mRi1Xo3jJQ@xps> In-Reply-To: <20190402082619.4ea83500@shemminger-XPS-13-9360> References: <20190321195910.11140-1-stephen@networkplumber.org> <4147107.f6clCcuQYr@xps> <20190402082619.4ea83500@shemminger-XPS-13-9360> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const 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: Tue, 02 Apr 2019 16:05:56 -0000 02/04/2019 17:26, Stephen Hemminger: > On Wed, 27 Mar 2019 12:14:44 +0100 > Thomas Monjalon wrote: > > > 21/03/2019 20:59, Stephen Hemminger: > > > The divisor is not modified here. Doesn't really matter for optimizaton > > > since the function is inline already; but helps with expressing > > > intent. > > > > > > Signed-off-by: Stephen Hemminger > > > --- > > > static __rte_always_inline uint64_t > > > -rte_reciprocal_divide_u64(uint64_t a, struct rte_reciprocal_u64 *R) > > > +rte_reciprocal_divide_u64(uint64_t a, const struct rte_reciprocal_u64 *R) > > > > Why not doing the same change for rte_reciprocal_divide()? > It doesn't make sense for rte_reciprocal_divide since rte_reciprocal_divide > is call by value (ie doesn't take a pointer). Oh, you're right. > > Should we advertise such API change? > > No. Since constant is always less intrusive than previous version > all cases will work the same. Yes OK 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 77B63A0679 for ; Tue, 2 Apr 2019 18:05:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D3BBA4CA0; Tue, 2 Apr 2019 18:05:56 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id DC6454C8F for ; Tue, 2 Apr 2019 18:05:55 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 69221221F7; Tue, 2 Apr 2019 12:05:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 02 Apr 2019 12:05:55 -0400 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=3PkBVkP/5N8pf+VYEcT+OGc9eRSmc5CKRDPZbvFfmr8=; b=Jp/ZBU2kgl9z cEYSHPuAKMP+HFOTsxKehvubovBtQtFBrxXmZ0tv0L5FApnYabgrHyjpMTYD5y+8 rUyNxTWRXGCteD3f7je+NM12uGTca5kalcQV9FFoExQ8PBlGfV5ur949iEtHTvIL JlBNIOkHQwzwPP1qKMx70K3SsCy+lR8= 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=3PkBVkP/5N8pf+VYEcT+OGc9eRSmc5CKRDPZbvFfm r8=; b=5A3ja2FI2csCkGDsyJn5tuyxruvAsLZYzPu1TRiN52qyqCRtWo+cBJGjW mEXUNeNwe+dfpaTlv29nW/RJXDN9RzgGIzClenf+DYESUIdklie4nsUm3wbiTPim iMOcGHWgb2LC8YXkYlbYhxCLEVmyvishowozrqRUInHPaLL2Wa7FIvscou4LLKbu 9Gb6Mffon7dR0inc7fuU4QREinO1BetOSqILu8+rJbFf3nPpwBfmfb92/2mzYx1D NTyFQcVD8Zt6DXQTmOhiaus749yv/kw9OolgGcChwlwZi1FAyEpIQTcPSisdXzqe QpBTf4wBoyEX9wl8t+T3WGGT6Uvww== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrtddtgdejieculddtuddrgedutddrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvden ucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrg hlohhnrdhnvghtqeenucfkphepjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhep mhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsth gvrhfuihiivgeptd 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 F2512E4176; Tue, 2 Apr 2019 12:05:53 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org, maxime.coquelin@redhat.com Date: Tue, 02 Apr 2019 18:05:52 +0200 Message-ID: <5398787.mRi1Xo3jJQ@xps> In-Reply-To: <20190402082619.4ea83500@shemminger-XPS-13-9360> References: <20190321195910.11140-1-stephen@networkplumber.org> <4147107.f6clCcuQYr@xps> <20190402082619.4ea83500@shemminger-XPS-13-9360> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const 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: <20190402160552.j02I48OGbB19ZU2NyAS1n8eSuqdGuf4SzYmYz4RDWgI@z> 02/04/2019 17:26, Stephen Hemminger: > On Wed, 27 Mar 2019 12:14:44 +0100 > Thomas Monjalon wrote: > > > 21/03/2019 20:59, Stephen Hemminger: > > > The divisor is not modified here. Doesn't really matter for optimizaton > > > since the function is inline already; but helps with expressing > > > intent. > > > > > > Signed-off-by: Stephen Hemminger > > > --- > > > static __rte_always_inline uint64_t > > > -rte_reciprocal_divide_u64(uint64_t a, struct rte_reciprocal_u64 *R) > > > +rte_reciprocal_divide_u64(uint64_t a, const struct rte_reciprocal_u64 *R) > > > > Why not doing the same change for rte_reciprocal_divide()? > It doesn't make sense for rte_reciprocal_divide since rte_reciprocal_divide > is call by value (ie doesn't take a pointer). Oh, you're right. > > Should we advertise such API change? > > No. Since constant is always less intrusive than previous version > all cases will work the same. Yes OK