From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 9CEB2316B for ; Tue, 2 Apr 2019 17:26:22 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id p6so6732831pgh.9 for ; Tue, 02 Apr 2019 08:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mF/Q1zeMgUrIeqVeWQ8GXhNERSh2OY0tlGZCTGJo+74=; b=ApP2VrnJAG9fwlBnDnRSF+TLz+8qhkUqzaydZQi/9EwEp39gR/SpfFQx/riy9flH12 9o4aJGlJRwrvfgeSV3wQftJk3/Kd5fEf1meeK63iOcDLj9C90oJa8BNhtN+FZLhpaPm5 GMDip9Vm64Iv/wRtoQloMrXX/VHx+IPK8OCRQ14J0cAR1uyUQki6B9YJNcUpTO3+LQgg gSWHlovObl8BiB2J6uOvRePca4PMJSCYGZI7tIMZ8UNz2cMNGaMCfg1MKCVPEvtRgmGt Ou30GXLwQ6JQ71RCir6j3JKuRzLFswMHmE8NyhraasLxMAu02Ug2cBf2/Y8kF+Iv/vSt Pjkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mF/Q1zeMgUrIeqVeWQ8GXhNERSh2OY0tlGZCTGJo+74=; b=te5r84dljSC43BCRkmMtxSRAE+Jgy/2T0zGn97DCSCJ8BnBEM/QJmaKkcHCd0n2zl/ lZJfBMrByeGlRZEtshcZi8NChewSwK2VaxLUO2Japm657K/icL9BDg2lfeUMMEBQh9hW 1nWLRuzmCthWJEqcxT5yu2s8Yazpcys7GpMU8VW65CFJKQzT3/fMm1j8KHS4ReSzfq3D yO5sslQL+21Atv2MSOVwOkJSnE1GI1qkeH5jOjtHByllrljXnCxIvCDjNfYPPA9HECcd 3Zptrxi7eI124zIQ+bKrt/5HsrcxnLXx/FQALWDwjB8ehbg6vxbCwIpYB4Ns00My5zM1 S/+A== X-Gm-Message-State: APjAAAUowk3g8gQD4/CBhim/7o2nePtcP7V/WAy765fCRG422vY9lR9X 4+3Jmj1rl9aH98K0XV4BNx/w8Q== X-Google-Smtp-Source: APXvYqwm1FczAWHKZR/0oIUr0eWCiRszrMqUbM78I7anj+vjjBoJoJPm6F6I9sHTFy5EiacKD+FZhQ== X-Received: by 2002:a65:51c3:: with SMTP id i3mr66383224pgq.45.1554218781813; Tue, 02 Apr 2019 08:26:21 -0700 (PDT) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id g64sm31243134pfg.13.2019.04.02.08.26.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Apr 2019 08:26:21 -0700 (PDT) Date: Tue, 2 Apr 2019 08:26:19 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: dev@dpdk.org, maxime.coquelin@redhat.com Message-ID: <20190402082619.4ea83500@shemminger-XPS-13-9360> In-Reply-To: <4147107.f6clCcuQYr@xps> References: <20190321195910.11140-1-stephen@networkplumber.org> <4147107.f6clCcuQYr@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 15:26:23 -0000 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). > Should we advertise such API change? No. Since constant is always less intrusive than previous version all cases will work the same. 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 96137A0679 for ; Tue, 2 Apr 2019 17:26:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 61AB5343C; Tue, 2 Apr 2019 17:26:24 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 9CEB2316B for ; Tue, 2 Apr 2019 17:26:22 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id p6so6732831pgh.9 for ; Tue, 02 Apr 2019 08:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mF/Q1zeMgUrIeqVeWQ8GXhNERSh2OY0tlGZCTGJo+74=; b=ApP2VrnJAG9fwlBnDnRSF+TLz+8qhkUqzaydZQi/9EwEp39gR/SpfFQx/riy9flH12 9o4aJGlJRwrvfgeSV3wQftJk3/Kd5fEf1meeK63iOcDLj9C90oJa8BNhtN+FZLhpaPm5 GMDip9Vm64Iv/wRtoQloMrXX/VHx+IPK8OCRQ14J0cAR1uyUQki6B9YJNcUpTO3+LQgg gSWHlovObl8BiB2J6uOvRePca4PMJSCYGZI7tIMZ8UNz2cMNGaMCfg1MKCVPEvtRgmGt Ou30GXLwQ6JQ71RCir6j3JKuRzLFswMHmE8NyhraasLxMAu02Ug2cBf2/Y8kF+Iv/vSt Pjkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mF/Q1zeMgUrIeqVeWQ8GXhNERSh2OY0tlGZCTGJo+74=; b=te5r84dljSC43BCRkmMtxSRAE+Jgy/2T0zGn97DCSCJ8BnBEM/QJmaKkcHCd0n2zl/ lZJfBMrByeGlRZEtshcZi8NChewSwK2VaxLUO2Japm657K/icL9BDg2lfeUMMEBQh9hW 1nWLRuzmCthWJEqcxT5yu2s8Yazpcys7GpMU8VW65CFJKQzT3/fMm1j8KHS4ReSzfq3D yO5sslQL+21Atv2MSOVwOkJSnE1GI1qkeH5jOjtHByllrljXnCxIvCDjNfYPPA9HECcd 3Zptrxi7eI124zIQ+bKrt/5HsrcxnLXx/FQALWDwjB8ehbg6vxbCwIpYB4Ns00My5zM1 S/+A== X-Gm-Message-State: APjAAAUowk3g8gQD4/CBhim/7o2nePtcP7V/WAy765fCRG422vY9lR9X 4+3Jmj1rl9aH98K0XV4BNx/w8Q== X-Google-Smtp-Source: APXvYqwm1FczAWHKZR/0oIUr0eWCiRszrMqUbM78I7anj+vjjBoJoJPm6F6I9sHTFy5EiacKD+FZhQ== X-Received: by 2002:a65:51c3:: with SMTP id i3mr66383224pgq.45.1554218781813; Tue, 02 Apr 2019 08:26:21 -0700 (PDT) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id g64sm31243134pfg.13.2019.04.02.08.26.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Apr 2019 08:26:21 -0700 (PDT) Date: Tue, 2 Apr 2019 08:26:19 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: dev@dpdk.org, maxime.coquelin@redhat.com Message-ID: <20190402082619.4ea83500@shemminger-XPS-13-9360> In-Reply-To: <4147107.f6clCcuQYr@xps> References: <20190321195910.11140-1-stephen@networkplumber.org> <4147107.f6clCcuQYr@xps> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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: <20190402152619.72Zh2ZhKb7CiN-gPtufiq8VVE1CW5Mq-pCyiMtkaAXI@z> 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). > Should we advertise such API change? No. Since constant is always less intrusive than previous version all cases will work the same.