From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C9B72A0A02; Wed, 5 May 2021 18:30:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F74B40143; Wed, 5 May 2021 18:30:36 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id DA53040040 for ; Wed, 5 May 2021 18:30:34 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 2634020B7178; Wed, 5 May 2021 09:30:34 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2634020B7178 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1620232234; bh=lfopjwFeF8CMhCQsbrpBfKnvEtN23JyPk8IPpH1EKRA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tN6I72OpJuBhpDqNo2/cQPzWJrYmF1CkEuYZqPoJlJla3aLAuatTLglIIu/jhjNoR 2fkP68f6ZTmgaA0pz5eLRlPuX82XxIacYhOz0qNT+TSq31O09zhgkzAe+kkJHVzEqy AwWRDbF1USmzTbETq9C6S5yOqZtCrxFQvwOQBwho= Date: Wed, 5 May 2021 09:30:34 -0700 From: Tyler Retzlaff To: David Marchand Cc: dev , Thomas Monjalon , Aaron Conole Message-ID: <20210505163034.GA27627@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1615496911-7050-1-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [dpdk-dev] [PATCH] eal: avoid side effects in RTE_ALIGN_MUL_NEAR(v, mul) for v and mul X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" On Fri, Mar 12, 2021 at 09:07:22AM +0100, David Marchand wrote: > On Thu, Mar 11, 2021 at 10:08 PM Tyler Retzlaff > wrote: > > > > Avoid expanding v and mul parameters multiple times in the macro. based > > on usage of the macro it seems like side effects were not intended. > > > > For example: > > ``return RTE_ALIGN_MUL_NEAR(rte_rdtsc() - start, CYC_PER_10MHZ);'' > > That's the beauty of macros. > How about updating the unit tests so that this kind of issue is not > reintroduced? i'm afraid i don't have the schedule budget to do this. i get very little dpdk time. do you want me to withdraw the fix? > > > Are other RTE_ALIGN_* macro affected with similar issues? > Like mul expression passed to RTE_ALIGN_MUL_FLOOR and RTE_ALIGN_MUL_CEIL. > > > -- > David Marchand