From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 21CC7A04AF for ; Thu, 20 Aug 2020 17:34:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 194D11E2B; Thu, 20 Aug 2020 17:34:44 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id B85AD1BEC4 for ; Thu, 20 Aug 2020 17:34:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597937682; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=11dX6Mw1mOS4sTSBbhszdn+tNKexAMApy2VmpGHiwG4=; b=Fcnox0dixfbfoOxXWkieyJbnNkWiYy2xr5DwkOGvoDcvwLJSmAuULK1/1Oq5EPEqw6a39/ fvHIdCFOxZ8e3jcy/owV1oWsXYqIWWF8LsLPzvVwbp+q9qAPfG5Z9N+VxFCq3mCwNvwSu8 TPfRp0+FhnkG0zsEdcigXVEZtARA8zU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-546-KoBg4oWoNI6JCWv9vNsa4w-1; Thu, 20 Aug 2020 11:34:33 -0400 X-MC-Unique: KoBg4oWoNI6JCWv9vNsa4w-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F0EB4807334; Thu, 20 Aug 2020 15:34:32 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 32742101E697; Thu, 20 Aug 2020 15:34:32 +0000 (UTC) From: Kevin Traynor To: Harman Kalra Cc: dpdk stable Date: Thu, 20 Aug 2020 16:33:26 +0100 Message-Id: <20200820153341.171927-21-ktraynor@redhat.com> In-Reply-To: <20200820153341.171927-1-ktraynor@redhat.com> References: <20200820153341.171927-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'eal: fix parentheses in alignment macros' has been queued to LTS release 18.11.10 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/25/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/53d8ebacc1392439d183de6dd65ca8bee7ce16c5 Thanks. Kevin. --- >From 53d8ebacc1392439d183de6dd65ca8bee7ce16c5 Mon Sep 17 00:00:00 2001 From: Harman Kalra Date: Wed, 24 Jun 2020 15:50:47 +0530 Subject: [PATCH] eal: fix parentheses in alignment macros [ upstream commit 3596a037ab44a1ad588fb388d5d4ee8f3d2a1ca7 ] Found an issue while using RTE_ALIGN_MUL_NEAR with an expression, like as passed in estimate_tsc_freq(). RTE_ALIGN_MUL_FLOOR resulted in unexpected value as parathesis are required to evaluate an expression. Fixes: 5120203d753f ("eal: add macros to align value to multiple") Signed-off-by: Harman Kalra --- lib/librte_eal/common/include/rte_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h index 5006ba8cad..a9d617482a 100644 --- a/lib/librte_eal/common/include/rte_common.h +++ b/lib/librte_eal/common/include/rte_common.h @@ -239,5 +239,5 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) */ #define RTE_ALIGN_MUL_CEIL(v, mul) \ - (((v + (typeof(v))(mul) - 1) / ((typeof(v))(mul))) * (typeof(v))(mul)) + ((((v) + (typeof(v))(mul) - 1) / ((typeof(v))(mul))) * (typeof(v))(mul)) /** @@ -247,5 +247,5 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) */ #define RTE_ALIGN_MUL_FLOOR(v, mul) \ - ((v / ((typeof(v))(mul))) * (typeof(v))(mul)) + (((v) / ((typeof(v))(mul))) * (typeof(v))(mul)) /** -- 2.26.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-08-20 16:26:16.615867793 +0100 +++ 0021-eal-fix-parentheses-in-alignment-macros.patch 2020-08-20 16:26:15.806324161 +0100 @@ -1 +1 @@ -From 3596a037ab44a1ad588fb388d5d4ee8f3d2a1ca7 Mon Sep 17 00:00:00 2001 +From 53d8ebacc1392439d183de6dd65ca8bee7ce16c5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3596a037ab44a1ad588fb388d5d4ee8f3d2a1ca7 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -16,2 +17,2 @@ - lib/librte_eal/include/rte_common.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + lib/librte_eal/common/include/rte_common.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) @@ -19,5 +20,5 @@ -diff --git a/lib/librte_eal/include/rte_common.h b/lib/librte_eal/include/rte_common.h -index 586f815c54..8f487a563d 100644 ---- a/lib/librte_eal/include/rte_common.h -+++ b/lib/librte_eal/include/rte_common.h -@@ -305,5 +305,5 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) +diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h +index 5006ba8cad..a9d617482a 100644 +--- a/lib/librte_eal/common/include/rte_common.h ++++ b/lib/librte_eal/common/include/rte_common.h +@@ -239,5 +239,5 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) @@ -30 +31 @@ -@@ -313,5 +313,5 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) +@@ -247,5 +247,5 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) @@ -37,7 +37,0 @@ -@@ -324,5 +324,5 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) - typeof(v) ceil = RTE_ALIGN_MUL_CEIL(v, mul); \ - typeof(v) floor = RTE_ALIGN_MUL_FLOOR(v, mul); \ -- (ceil - v) > (v - floor) ? floor : ceil; \ -+ (ceil - (v)) > ((v) - floor) ? floor : ceil; \ - }) -