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 C7995A0C4C for ; Mon, 12 Jul 2021 15:11:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BCD154069D; Mon, 12 Jul 2021 15:11:17 +0200 (CEST) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mails.dpdk.org (Postfix) with ESMTP id F391D4119C for ; Mon, 12 Jul 2021 15:11:15 +0200 (CEST) Received: by mail-wr1-f50.google.com with SMTP id m2so14520621wrq.2 for ; Mon, 12 Jul 2021 06:11:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MNgVxzZR85IMwxWsiySBOWffKqY4VVSxsVD54nUEW1I=; b=LTjWih760BKF3d4enpNAGizRAzlpUxhheFC1+cTRxI4xw6j5p4KPPQvr5J0aLrvf3O c10uwseJa5AuO9YntexP7SAOes5b0YwpHxaLOpYLy6emX3WjZKdoyn3z3BcBnZrDIoUN G6vaF8TaYIKafHc5mxBuaaAyu+tPhmE/F9rRmCFNyKQqJ1bISgsXm3NUpN5pP8hR1oCd ppitDfG5D/2AjxvsXBS7/S/1qeLcNJ3usnnC+aTDE5PmX8eOiv+qMCyFQCo92YYYDZcF PR6VaXKm2sS3L9FMZgE0ar+k+Bu7r6e0NZSq1vVsQZrRx8eXEZozWa9nEKurgDEP0r0H S6xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MNgVxzZR85IMwxWsiySBOWffKqY4VVSxsVD54nUEW1I=; b=oG01K+OTHETCVrcsF9a0ZGV/R7tK8Ia7pJM6bSmk+aVEh5625gYPm9n6MvczTfvXjH Z+OpGauTkD3sKncj3Tr5Q+dAkn1Ccc9H7UZyatt4H9sQWxyuxE5PKysx2fQ+OUJ39USu OZymZLyACaYxatCrPiDZRnRj2XTV4P6F3mPZ+Q6H8Ql6SztAb/6imi+mnE6aOrhnta5m /YmiznsR8oqwz8tZGXTBHPCv34XydRadqa+zy+BBFlDW7u9olrAfQ2aBhrx0ue2M+IDZ 16dj79CCZfcdrYRJYvhGOQApZ+b2GsYYDxQokVuv9OSPmF4VvXU3Bp7RdBuC+nboEs+s 075w== X-Gm-Message-State: AOAM532CJ7KtqNIyrTptajkeRNN4iwdRtNWjCWXVpip82Dwf9IPU4RjV etNPNj5F6pb8QawyTCN0C8g= X-Google-Smtp-Source: ABdhPJwlVAVglm97bpsqwTKsoEZFv3mS0rY0DsNIlH9LUpK8ZNcmAhubqQiHRgqdpHU6xRy6x9Qe0w== X-Received: by 2002:a5d:428d:: with SMTP id k13mr31588363wrq.269.1626095475744; Mon, 12 Jul 2021 06:11:15 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id o7sm16633179wrv.72.2021.07.12.06.11.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 06:11:14 -0700 (PDT) From: luca.boccassi@gmail.com To: Konstantin Ananyev Cc: Liang Ma , dpdk stable Date: Mon, 12 Jul 2021 14:04:20 +0100 Message-Id: <20210712130551.2462159-25-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712130551.2462159-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'acl: fix build with GCC 6.3' has been queued to stable release 20.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 stable release 20.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/004342dc908728ae6a303439959b803ecc4850d1 Thanks. Luca Boccassi --- >From 004342dc908728ae6a303439959b803ecc4850d1 Mon Sep 17 00:00:00 2001 From: Konstantin Ananyev Date: Fri, 21 May 2021 15:42:07 +0100 Subject: [PATCH] acl: fix build with GCC 6.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit b3b36f0fbf1fd68980afce10300f1b8831607324 ] --buildtype=debug with gcc 6.3 produces the following error: ../lib/librte_acl/acl_run_avx512_common.h: In function ‘resolve_match_idx_avx512x16’: ../lib/librte_acl/acl_run_avx512x16.h:33:18: error: the last argument must be an 8-bit immediate ^ ../lib/librte_acl/acl_run_avx512_common.h:373:9: note: in expansion of macro ‘_M_I_’ return _M_I_(slli_epi32)(mi, match_log); ^~~~~ Seems like gcc-6.3 complains about the following construct: static const uint32_t match_log = 5; ... _mm512_slli_epi32(mi, match_log); It can't substitute constant variable 'match_log' with its actual value. The fix replaces constant variable with its immediate value. Bugzilla ID: 717 Fixes: b64c2295f7fc ("acl: add 256-bit AVX512 classify method") Fixes: 45da22e42ec3 ("acl: add 512-bit AVX512 classify method") Reported-by: Liang Ma Signed-off-by: Konstantin Ananyev --- lib/librte_acl/acl_run_avx512.c | 8 ++++---- lib/librte_acl/acl_run_avx512_common.h | 4 ++-- lib/librte_acl/acl_run_avx512x16.h | 6 ++---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/librte_acl/acl_run_avx512.c b/lib/librte_acl/acl_run_avx512.c index 3fd1e33c3f..78fbe34f7c 100644 --- a/lib/librte_acl/acl_run_avx512.c +++ b/lib/librte_acl/acl_run_avx512.c @@ -4,8 +4,8 @@ #include "acl_run_sse.h" -/*sizeof(uint32_t) << match_log == sizeof(struct rte_acl_match_results)*/ -static const uint32_t match_log = 5; +/*sizeof(uint32_t) << ACL_MATCH_LOG == sizeof(struct rte_acl_match_results)*/ +#define ACL_MATCH_LOG 5 struct acl_flow_avx512 { uint32_t num_packets; /* number of packets processed */ @@ -82,7 +82,7 @@ resolve_mcle8_avx512x1(uint32_t result[], for (k = 0; k != nb_pkt; k++, result += nb_cat) { - mi = match[k] << match_log; + mi = match[k] << ACL_MATCH_LOG; for (j = 0; j != nb_cat; j += RTE_ACL_RESULTS_MULTIPLIER) { @@ -92,7 +92,7 @@ resolve_mcle8_avx512x1(uint32_t result[], for (i = 1, pm = match + nb_pkt; i != nb_trie; i++, pm += nb_pkt) { - mn = j + (pm[k] << match_log); + mn = j + (pm[k] << ACL_MATCH_LOG); nr = _mm_loadu_si128((const xmm_t *)(res + mn)); np = _mm_loadu_si128((const xmm_t *)(pri + mn)); diff --git a/lib/librte_acl/acl_run_avx512_common.h b/lib/librte_acl/acl_run_avx512_common.h index fbad74d459..578eaa1d0c 100644 --- a/lib/librte_acl/acl_run_avx512_common.h +++ b/lib/librte_acl/acl_run_avx512_common.h @@ -393,8 +393,8 @@ static inline _T_simd _F_(resolve_match_idx)(_T_simd mi) { RTE_BUILD_BUG_ON(sizeof(struct rte_acl_match_results) != - 1 << (match_log + 2)); - return _M_I_(slli_epi32)(mi, match_log); + 1 << (ACL_MATCH_LOG + 2)); + return _M_I_(slli_epi32)(mi, ACL_MATCH_LOG); } /* diff --git a/lib/librte_acl/acl_run_avx512x16.h b/lib/librte_acl/acl_run_avx512x16.h index da244bc257..48bb6fed85 100644 --- a/lib/librte_acl/acl_run_avx512x16.h +++ b/lib/librte_acl/acl_run_avx512x16.h @@ -252,8 +252,6 @@ resolve_mcgt8_avx512x1(uint32_t result[], __mmask16 cm, sm; __m512i cp, cr, np, nr; - const uint32_t match_log = 5; - res = pr->results; pri = pr->priority; @@ -261,7 +259,7 @@ resolve_mcgt8_avx512x1(uint32_t result[], for (k = 0; k != nb_pkt; k++, result += nb_cat) { - mi = match[k] << match_log; + mi = match[k] << ACL_MATCH_LOG; cr = _mm512_maskz_loadu_epi32(cm, res + mi); cp = _mm512_maskz_loadu_epi32(cm, pri + mi); @@ -269,7 +267,7 @@ resolve_mcgt8_avx512x1(uint32_t result[], for (i = 1, pm = match + nb_pkt; i != nb_trie; i++, pm += nb_pkt) { - mi = pm[k] << match_log; + mi = pm[k] << ACL_MATCH_LOG; nr = _mm512_maskz_loadu_epi32(cm, res + mi); np = _mm512_maskz_loadu_epi32(cm, pri + mi); -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-12 13:41:38.106887242 +0100 +++ 0025-acl-fix-build-with-GCC-6.3.patch 2021-07-12 13:41:36.282118277 +0100 @@ -1 +1 @@ -From b3b36f0fbf1fd68980afce10300f1b8831607324 Mon Sep 17 00:00:00 2001 +From 004342dc908728ae6a303439959b803ecc4850d1 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit b3b36f0fbf1fd68980afce10300f1b8831607324 ] + @@ -33 +34,0 @@ -Cc: stable@dpdk.org @@ -38,3 +39,3 @@ - lib/acl/acl_run_avx512.c | 8 ++++---- - lib/acl/acl_run_avx512_common.h | 4 ++-- - lib/acl/acl_run_avx512x16.h | 6 ++---- + lib/librte_acl/acl_run_avx512.c | 8 ++++---- + lib/librte_acl/acl_run_avx512_common.h | 4 ++-- + lib/librte_acl/acl_run_avx512x16.h | 6 ++---- @@ -43 +44 @@ -diff --git a/lib/acl/acl_run_avx512.c b/lib/acl/acl_run_avx512.c +diff --git a/lib/librte_acl/acl_run_avx512.c b/lib/librte_acl/acl_run_avx512.c @@ -45,2 +46,2 @@ ---- a/lib/acl/acl_run_avx512.c -+++ b/lib/acl/acl_run_avx512.c +--- a/lib/librte_acl/acl_run_avx512.c ++++ b/lib/librte_acl/acl_run_avx512.c @@ -76 +77 @@ -diff --git a/lib/acl/acl_run_avx512_common.h b/lib/acl/acl_run_avx512_common.h +diff --git a/lib/librte_acl/acl_run_avx512_common.h b/lib/librte_acl/acl_run_avx512_common.h @@ -78,2 +79,2 @@ ---- a/lib/acl/acl_run_avx512_common.h -+++ b/lib/acl/acl_run_avx512_common.h +--- a/lib/librte_acl/acl_run_avx512_common.h ++++ b/lib/librte_acl/acl_run_avx512_common.h @@ -91 +92 @@ -diff --git a/lib/acl/acl_run_avx512x16.h b/lib/acl/acl_run_avx512x16.h +diff --git a/lib/librte_acl/acl_run_avx512x16.h b/lib/librte_acl/acl_run_avx512x16.h @@ -93,2 +94,2 @@ ---- a/lib/acl/acl_run_avx512x16.h -+++ b/lib/acl/acl_run_avx512x16.h +--- a/lib/librte_acl/acl_run_avx512x16.h ++++ b/lib/librte_acl/acl_run_avx512x16.h