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 F33E1A0547; Fri, 12 Mar 2021 09:07:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7AD6A1607E6; Fri, 12 Mar 2021 09:07:37 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 39F584067E for ; Fri, 12 Mar 2021 09:07:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615536455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=meQuTX6+bczrqbVsX+EHUbOUWX2RhrCTpvvbK4lYAsg=; b=Yo0mIuGkG3/q35y7+BSXv2TD38G5hB3J80qQ0UxLSKAp53X1+6/z5r5MKqe27+FlVg7qn0 Bynevr+N7hzwdfcQjfX0Gqdt/W6sfuWwKRaxUL9coJ2/v4JmGvnfqerM8Tb6pTIWnps6B4 pUO3v/eMdu/uKkffLqi6llIk1Hf4Pgo= Received: from mail-vk1-f197.google.com (mail-vk1-f197.google.com [209.85.221.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-51-pH87152EPRadC5jHbKTEwA-1; Fri, 12 Mar 2021 03:07:34 -0500 X-MC-Unique: pH87152EPRadC5jHbKTEwA-1 Received: by mail-vk1-f197.google.com with SMTP id q16so6945430vkq.10 for ; Fri, 12 Mar 2021 00:07:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=meQuTX6+bczrqbVsX+EHUbOUWX2RhrCTpvvbK4lYAsg=; b=hWwy+TwsLGcZOBZXMX1uPCofmxBiTUSP5CZZibZnl3555h+JL6on36Q6hVTPGxa7rr Hdq29/HWrqw0xFQY3rMdieRB83Ksfhq+TURpclRtqwINIxTUKcolUTrSR3rRLJsw34Ur ycArEMLXPD01vyGuiviSJ0zzaQR48xVDAO0iioTQFIZ4dLxc9y8c83JnTqHzGHvBqDWj LxOTDNad4L+8e/P/JqqOFKLA3mo3vkBHmHfrcmDxdJYtE/KxL8h26ZZnn4uyLHetd8tb eQqTDih2+SdmfmL8UUEGf8MmCUyDH3kZXqyrrplJXdnVLiV+6c9r5y9R+bxrXwJZQqU0 Vb+A== X-Gm-Message-State: AOAM532s7+s+f4ku4SKv1yFMOoDYk1eLzbOdUnrTSGuYzEal2WsB5+pE sJ6xhs4di6xZplY+o9OKxOglfABjxAtS+yBJyzNVZT+JveoGxilCECzQG2f1Pw2Rk+/tjY7DvDD HgGj2RPsOwzcA5hDP8Ig= X-Received: by 2002:a05:6102:ace:: with SMTP id m14mr8109370vsh.5.1615536453494; Fri, 12 Mar 2021 00:07:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8BARdruonPAWPk0lnozjWaLGsEMfLwZgqT4Vo/3mJ31wXdiUVitswlwCLUlHxp2KSiQleMSCaTHko7exCbgs= X-Received: by 2002:a05:6102:ace:: with SMTP id m14mr8109363vsh.5.1615536453297; Fri, 12 Mar 2021 00:07:33 -0800 (PST) MIME-Version: 1.0 References: <1615496911-7050-1-git-send-email-roretzla@linux.microsoft.com> In-Reply-To: <1615496911-7050-1-git-send-email-roretzla@linux.microsoft.com> From: David Marchand Date: Fri, 12 Mar 2021 09:07:22 +0100 Message-ID: To: Tyler Retzlaff Cc: dev , Thomas Monjalon , Aaron Conole Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 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? 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