From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 81127A0096 for ; Fri, 7 Jun 2019 08:22:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 64E022E8F; Fri, 7 Jun 2019 08:22:31 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id D2FBF2AB; Fri, 7 Jun 2019 08:22:29 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x576GdMj030580; Thu, 6 Jun 2019 23:22:26 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=TSO2l3tSUeabIYugr7Yr6FDbvcYi0ECm/QYIvmd1SqE=; b=yOshbNeENMN7gBhlw0hw58qZQc4abtL2lIFFIRXsMRKphM8yS7Vj/MGEJRIjBHx0HdAF XCKSKhdqV9IAo6QKZ+mnEawWurisVX30uS14dxB5PaQjtTiyDj4Zvo1ekbQMv4//hCV/ 2bgpyZhO43PAHViJpTKXrCO42/u2JMuQ60qNipYLyUKoVNlLTMnExl6HF5gp3FOpdWD+ fezTb/7tMvDxR34i4OQp1d85bmBQtWVZyGAkPTjhjcJW7n7GIXafFS+ySX1qaOuTvTHN +WbWxDYjsGZLet1tzzv+wHKIHl9rpgCAS8FT2ya2C4sNgyNuGeNwh9BOW0bvE3nUFIPk BA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2sydhfryyq-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 06 Jun 2019 23:22:25 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 6 Jun 2019 23:21:27 -0700 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (104.47.33.58) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 6 Jun 2019 23:21:27 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TSO2l3tSUeabIYugr7Yr6FDbvcYi0ECm/QYIvmd1SqE=; b=Qafaxm+o+vr6daWBpvYU3jJ3ps3ZLUdFkN9cvDDDJdfDBntUZkw0Qbfh3gx4MLXLE7gSVY+q99/BhQBN++WOuxb0V7oP20R8GyrHlQdkxIzHXg/Ul1CiyHehu3zXAO7fEWo9MCROMiz6pFSx9Ee9bnCB/tLFdEjK8qqkaCUQqzw= Received: from BYAPR18MB2424.namprd18.prod.outlook.com (20.179.91.149) by BYAPR18MB3064.namprd18.prod.outlook.com (20.179.58.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.14; Fri, 7 Jun 2019 06:21:25 +0000 Received: from BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::1ce4:557d:eeb8:843c]) by BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::1ce4:557d:eeb8:843c%7]) with mapi id 15.20.1965.011; Fri, 7 Jun 2019 06:21:25 +0000 From: Jerin Jacob Kollanukkaran To: Honnappa Nagarahalli , "dev@dpdk.org" CC: "thomas@monjalon.net" , "Gavin Hu (Arm Technology China)" , "msantana@redhat.com" , "aconole@redhat.com" , "stable@dpdk.org" , nd Thread-Topic: [dpdk-dev] [PATCH] acl: fix build issue with some arm64 compiler Thread-Index: AQHVHHdB3HeKdCaZ2UOmWQXk7P2C/aaPrK6AgAAH7TA= Date: Fri, 7 Jun 2019 06:21:25 +0000 Message-ID: References: <20190606145054.39995-1-jerinj@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [14.140.231.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4a990b8c-38ee-45a6-a173-08d6eb105e57 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BYAPR18MB3064; x-ms-traffictypediagnostic: BYAPR18MB3064: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3276; x-forefront-prvs: 0061C35778 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(346002)(39860400002)(376002)(136003)(13464003)(189003)(199004)(6246003)(53936002)(316002)(4326008)(76176011)(55236004)(102836004)(7696005)(33656002)(53546011)(6506007)(25786009)(54906003)(74316002)(110136005)(99286004)(256004)(6306002)(8676002)(55016002)(9686003)(2501003)(8936002)(81156014)(81166006)(2906002)(6436002)(229853002)(6116002)(7736002)(86362001)(3846002)(305945005)(73956011)(66446008)(66556008)(66476007)(66066001)(66946007)(64756008)(446003)(68736007)(486006)(476003)(11346002)(71200400001)(71190400001)(76116006)(52536014)(478600001)(26005)(14454004)(966005)(186003)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR18MB3064; H:BYAPR18MB2424.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: SBTf9xBqIBTdkGvxrFS8JY+7fbC3Gl5celWD2Wn01g77P0g++CM4eyaQpTViiG3k0don//aMhWpIMVeCibInwZp1adMg8w1286KIjie+aUgtTYhC+wQYngnQV+hYmYTVNjlHYX/bKyK7ynI5Pc6n1d7MjHoSMgkHsDl4dr2IXzl58JOnDPwOZSCoTddxhUndo7G0hoIwPwSVDxykhLV6FlwM4sszUfRxy4ZkI/lcFni47lz6Kz5f2caIebGL6p00fVX6BF/9ZdvizNyY8T8uZvraIOtqymfZ2ghLeFumLT9rKb+xtefcHwq4Fg3YodtUkhabAtAUNALeIB1yPGXYCqDwoPhuKBZMe5WfbFN+I2t6gRXUqbGTZx9HfiNzia25qhHw2On42om2rYIQG1q2jWf7pFOrTezMH3XeVQsg12A= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4a990b8c-38ee-45a6-a173-08d6eb105e57 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jun 2019 06:21:25.2550 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jerinj@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB3064 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-07_03:, , signatures=0 Subject: Re: [dpdk-dev] [PATCH] acl: fix build issue with some arm64 compiler X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" =09 > -----Original Message----- > From: Honnappa Nagarahalli > Sent: Friday, June 7, 2019 11:05 AM > To: Jerin Jacob Kollanukkaran ; dev@dpdk.org > Cc: thomas@monjalon.net; Gavin Hu (Arm Technology China) > ; msantana@redhat.com; aconole@redhat.com; Jerin > Jacob Kollanukkaran ; Honnappa Nagarahalli > ; stable@dpdk.org; nd > Subject: [EXT] RE: [dpdk-dev] [PATCH] acl: fix build issue with some arm6= 4 > compiler >=20 > ---------------------------------------------------------------------- > > Subject: [dpdk-dev] [PATCH] acl: fix build issue with some arm64 > > compiler > > > > From: Jerin Jacob > > > > Some compilers reporting the following error, though the existing code > > doesn't have any uninitialized variable case. > > Just to make compiler happy, initialize the int32x4_t variable one > > shot in C language. > > > > ../lib/librte_acl/acl_run_neon.h: In function 'search_neon_4' > > ../lib/librte_acl/acl_run_neon.h:230:12: error: 'input' may be used > > uninitialized in this function [-Werror=3Dmaybe-uninitialized] > > int32x4_t input; > > > > Fixes: 34fa6c27c156 ("acl: add NEON optimization for ARMv8") > > Cc: stable@dpdk.org > > > > Signed-off-by: Jerin Jacob > > --- > > lib/librte_acl/acl_run_neon.h | 29 ++++++++++++----------------- > > 1 file changed, 12 insertions(+), 17 deletions(-) > > > > diff --git a/lib/librte_acl/acl_run_neon.h > > b/lib/librte_acl/acl_run_neon.h index 01b9766d8..dc9e9efe9 100644 > > --- a/lib/librte_acl/acl_run_neon.h > > +++ b/lib/librte_acl/acl_run_neon.h > > @@ -165,7 +165,6 @@ search_neon_8(const struct rte_acl_ctx *ctx, const > > uint8_t **data, > > uint64_t index_array[8]; > > struct completion cmplt[8]; > > struct parms parms[8]; > > - int32x4_t input0, input1; > > > > acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results, > > total_packets, categories, ctx->trans_table); @@ -181,17 > > +180,14 @@ search_neon_8(const struct rte_acl_ctx *ctx, const uint8_t > > **data, > > > > while (flows.started > 0) { > > /* Gather 4 bytes of input data for each stream. */ > > - input0 =3D vsetq_lane_s32(GET_NEXT_4BYTES(parms, 0), > > input0, 0); > > - input1 =3D vsetq_lane_s32(GET_NEXT_4BYTES(parms, 4), > > input1, 0); > > - > > - input0 =3D vsetq_lane_s32(GET_NEXT_4BYTES(parms, 1), > > input0, 1); > > - input1 =3D vsetq_lane_s32(GET_NEXT_4BYTES(parms, 5), > > input1, 1); > > - > > - input0 =3D vsetq_lane_s32(GET_NEXT_4BYTES(parms, 2), > > input0, 2); > > - input1 =3D vsetq_lane_s32(GET_NEXT_4BYTES(parms, 6), > > input1, 2); > > - > > - input0 =3D vsetq_lane_s32(GET_NEXT_4BYTES(parms, 3), > > input0, 3); > > - input1 =3D vsetq_lane_s32(GET_NEXT_4BYTES(parms, 7), > > input1, 3); > > + int32x4_t input0 =3D {GET_NEXT_4BYTES(parms, 0), > > + GET_NEXT_4BYTES(parms, 1), > > + GET_NEXT_4BYTES(parms, 2), > > + GET_NEXT_4BYTES(parms, 3)}; > > + int32x4_t input1 =3D {GET_NEXT_4BYTES(parms, 4), > > + GET_NEXT_4BYTES(parms, 5), > > + GET_NEXT_4BYTES(parms, 6), > > + GET_NEXT_4BYTES(parms, 7)}; > > > This mixes the use of NEON intrinsics with GCC vector extensions. ACLE (A= rm C > Language Extensions) specifically recommends not to mix the two methods i= n > section 12.2.6. IMO, Aaron's suggestion of using a temp vector should be = good. We are using this pattern across DPDK and SSE for x86 as well. https://git.dpdk.org/dpdk/tree/drivers/net/i40e/i40e_rxtx_vec_neon.c#n91 Since it used in fastpath, a temp variable would be additional cost for no = reason. If GCC supports it then I think it is fine, I think, above usage matters wi= th C++ portability. >=20 > > /* Process the 4 bytes of input on each stream. */ > > > > @@ -227,7 +223,6 @@ search_neon_4(const struct rte_acl_ctx *ctx, const > > uint8_t **data, > > uint64_t index_array[4]; > > struct completion cmplt[4]; > > struct parms parms[4]; > > - int32x4_t input; > > > > acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results, > > total_packets, categories, ctx->trans_table); @@ -242,10 > > +237,10 @@ search_neon_4(const struct rte_acl_ctx *ctx, const uint8_t > > **data, > > > > while (flows.started > 0) { > > /* Gather 4 bytes of input data for each stream. */ > > - input =3D vsetq_lane_s32(GET_NEXT_4BYTES(parms, 0), input, > > 0); > > - input =3D vsetq_lane_s32(GET_NEXT_4BYTES(parms, 1), input, > > 1); > > - input =3D vsetq_lane_s32(GET_NEXT_4BYTES(parms, 2), input, > > 2); > > - input =3D vsetq_lane_s32(GET_NEXT_4BYTES(parms, 3), input, > > 3); > > + int32x4_t input =3D {GET_NEXT_4BYTES(parms, 0), > > + GET_NEXT_4BYTES(parms, 1), > > + GET_NEXT_4BYTES(parms, 2), > > + GET_NEXT_4BYTES(parms, 3)}; > > > > /* Process the 4 bytes of input on each stream. */ > > input =3D transition4(input, flows.trans, index_array); > > -- > > 2.21.0