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 88D54A0C4F for ; Mon, 12 Jul 2021 22:31:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8945D4069D; Mon, 12 Jul 2021 22:31:56 +0200 (CEST) Received: from sender11-of-o51.zoho.eu (sender11-of-o51.zoho.eu [31.186.226.237]) by mails.dpdk.org (Postfix) with ESMTP id 684B24069D for ; Mon, 12 Jul 2021 22:31:55 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; t=1626121913; cv=none; d=zohomail.eu; s=zohoarc; b=Ao05fW6RLCWIKovXz+1Ru19pbXTGDB+BkgkxEp7d4ra4xwot9X3En8JjI0VPyr5LO/A1y4b5qYFccFcsz+bt5rzvSdjmShOGGOlWwBow0tDNnZjan0Emtyk84Jc+O8S5MQ6OGL8+YEa3uoUi7XYV4OfX7ltfEwwixAVdQw5Wi5I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1626121913; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=3dMoZlDj/GU3Y6wD0a/oAXomOp4Lum4+R4lNbbYRIe4=; b=WISJt7ZqgAij/o/YjU3LEFoxJomK9vD5C0mB4kLRMC0pkVMXNuwClWUggH0mdwoXSk2XIKioy3p+dJC1rIyg8gM+Jo6iZH8g62Kr2mIuoddLISJCqjoWf3FwBh7ubg4CZNd7+ZhIjzVK+7878KSdDBSJqbVQttHv8pJ7y2DLuxs= ARC-Authentication-Results: i=1; mx.zohomail.eu; spf=pass smtp.mailfrom=liangma@liangbit.com; dmarc=pass header.from= Received: from C02F33EJML85 (153.185.242.35.bc.googleusercontent.com [35.242.185.153]) by mx.zoho.eu with SMTPS id 1626121912327102.9052666643255; Mon, 12 Jul 2021 22:31:52 +0200 (CEST) Date: Mon, 12 Jul 2021 21:31:50 +0100 From: Liang Ma To: luca.boccassi@gmail.com Cc: Konstantin Ananyev , dpdk stable Message-ID: References: <20210712130551.2462159-1-luca.boccassi@gmail.com> <20210712130551.2462159-25-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20210712130551.2462159-25-luca.boccassi@gmail.com> X-ZohoMailClient: External Subject: Re: [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" On Mon, Jul 12, 2021 at 02:04:20PM +0100, luca.boccassi@gmail.com wrote: > Hi, >=20 > FYI, your patch has been queued to stable release 20.11.3 >=20 > 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. >=20 > Also note that after the patch there's a diff of the upstream commit vs t= he > 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 reba= sing > (ie: not only metadata diffs), please double check that the rebase was > correctly done. >=20 > Queued patches are on a temporary branch at: > https://github.com/bluca/dpdk-stable >=20 > This queued commit can be viewed at: > https://github.com/bluca/dpdk-stable/commit/004342dc908728ae6a303439959b8= 03ecc4850d1 >=20 > Thanks. Hi Luca/Konstantin,=20 as far as I know, this patch will cause different failure back to the time. unless we have newer version fix.=20 Regards Liang >=20 > Luca Boccassi >=20 > --- > 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=3DUTF-8 > Content-Transfer-Encoding: 8bit >=20 > [ upstream commit b3b36f0fbf1fd68980afce10300f1b8831607324 ] >=20 > --buildtype=3Ddebug with gcc 6.3 produces the following error: >=20 > ../lib/librte_acl/acl_run_avx512_common.h: In function > =E2=80=98resolve_match_idx_avx512x16=E2=80=99: > ../lib/librte_acl/acl_run_avx512x16.h:33:18: error: > =09the last argument must be an 8-bit immediate > ^ > ../lib/librte_acl/acl_run_avx512_common.h:373:9: note: > =09in expansion of macro =E2=80=98_M_I_=E2=80=99 > return _M_I_(slli_epi32)(mi, match_log); > ^~~~~ >=20 > Seems like gcc-6.3 complains about the following construct: >=20 > static const uint32_t match_log =3D 5; > ... > _mm512_slli_epi32(mi, match_log); >=20 > It can't substitute constant variable 'match_log' with its actual value. > The fix replaces constant variable with its immediate value. >=20 > Bugzilla ID: 717 > Fixes: b64c2295f7fc ("acl: add 256-bit AVX512 classify method") > Fixes: 45da22e42ec3 ("acl: add 512-bit AVX512 classify method") >=20 > 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(-) >=20 > diff --git a/lib/librte_acl/acl_run_avx512.c b/lib/librte_acl/acl_run_avx= 512.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 @@ > =20 > #include "acl_run_sse.h" > =20 > -/*sizeof(uint32_t) << match_log =3D=3D sizeof(struct rte_acl_match_resul= ts)*/ > -static const uint32_t match_log =3D 5; > +/*sizeof(uint32_t) << ACL_MATCH_LOG =3D=3D sizeof(struct rte_acl_match_r= esults)*/ > +#define ACL_MATCH_LOG=095 > =20 > struct acl_flow_avx512 { > =09uint32_t num_packets; /* number of packets processed */ > @@ -82,7 +82,7 @@ resolve_mcle8_avx512x1(uint32_t result[], > =20 > =09for (k =3D 0; k !=3D nb_pkt; k++, result +=3D nb_cat) { > =20 > -=09=09mi =3D match[k] << match_log; > +=09=09mi =3D match[k] << ACL_MATCH_LOG; > =20 > =09=09for (j =3D 0; j !=3D nb_cat; j +=3D RTE_ACL_RESULTS_MULTIPLIER) { > =20 > @@ -92,7 +92,7 @@ resolve_mcle8_avx512x1(uint32_t result[], > =09=09=09for (i =3D 1, pm =3D match + nb_pkt; i !=3D nb_trie; > =09=09=09=09i++, pm +=3D nb_pkt) { > =20 > -=09=09=09=09mn =3D j + (pm[k] << match_log); > +=09=09=09=09mn =3D j + (pm[k] << ACL_MATCH_LOG); > =20 > =09=09=09=09nr =3D _mm_loadu_si128((const xmm_t *)(res + mn)); > =09=09=09=09np =3D _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) > { > =09RTE_BUILD_BUG_ON(sizeof(struct rte_acl_match_results) !=3D > -=09=091 << (match_log + 2)); > -=09return _M_I_(slli_epi32)(mi, match_log); > +=09=091 << (ACL_MATCH_LOG + 2)); > +=09return _M_I_(slli_epi32)(mi, ACL_MATCH_LOG); > } > =20 > /* > 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[], > =09__mmask16 cm, sm; > =09__m512i cp, cr, np, nr; > =20 > -=09const uint32_t match_log =3D 5; > - > =09res =3D pr->results; > =09pri =3D pr->priority; > =20 > @@ -261,7 +259,7 @@ resolve_mcgt8_avx512x1(uint32_t result[], > =20 > =09for (k =3D 0; k !=3D nb_pkt; k++, result +=3D nb_cat) { > =20 > -=09=09mi =3D match[k] << match_log; > +=09=09mi =3D match[k] << ACL_MATCH_LOG; > =20 > =09=09cr =3D _mm512_maskz_loadu_epi32(cm, res + mi); > =09=09cp =3D _mm512_maskz_loadu_epi32(cm, pri + mi); > @@ -269,7 +267,7 @@ resolve_mcgt8_avx512x1(uint32_t result[], > =09=09for (i =3D 1, pm =3D match + nb_pkt; i !=3D nb_trie; > =09=09=09=09i++, pm +=3D nb_pkt) { > =20 > -=09=09=09mi =3D pm[k] << match_log; > +=09=09=09mi =3D pm[k] << ACL_MATCH_LOG; > =20 > =09=09=09nr =3D _mm512_maskz_loadu_epi32(cm, res + mi); > =09=09=09np =3D _mm512_maskz_loadu_epi32(cm, pri + mi); > --=20 > 2.30.2 >=20 > --- > Diff of the applied patch vs upstream commit (please double-check if no= n-empty: > --- > --- -=092021-07-12 13:41:38.106887242 +0100 > +++ 0025-acl-fix-build-with-GCC-6.3.patch=092021-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_av= x512.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_co= mmon.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