From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id 4CA3DA0096
	for <public@inbox.dpdk.org>; Fri,  7 Jun 2019 07:35:29 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 54EBE3798;
	Fri,  7 Jun 2019 07:35:28 +0200 (CEST)
Received: from EUR01-DB5-obe.outbound.protection.outlook.com
 (mail-eopbgr150041.outbound.protection.outlook.com [40.107.15.41])
 by dpdk.org (Postfix) with ESMTP id 5547F3DC;
 Fri,  7 Jun 2019 07:35:27 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; 
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=7F42PHyxPWzzjDOBWMWonnrUd1+UE88pvQKuO+GNWbw=;
 b=37UnwhJ3h+iw6YrZ5kwLwQmPz6yRrQP9z49vtCYh8j7E1K/dwsWe7hzkszjxtXzlsmGhvVUO61h6gZrADUpuDdts4cM32ncm4Pd61km0oEUclxvqIee8OmJWcxeeRMtnkjsGvHUOxDxDih6Ym3HDXmw9ZExWEYhmR9kA1pq83e4=
Received: from VE1PR08MB5149.eurprd08.prod.outlook.com (20.179.30.152) by
 VE1PR08MB5151.eurprd08.prod.outlook.com (20.179.30.154) 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 05:35:25 +0000
Received: from VE1PR08MB5149.eurprd08.prod.outlook.com
 ([fe80::9983:2882:a24:c0b0]) by VE1PR08MB5149.eurprd08.prod.outlook.com
 ([fe80::9983:2882:a24:c0b0%5]) with mapi id 15.20.1965.011; Fri, 7 Jun 2019
 05:35:25 +0000
From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
To: "jerinj@marvell.com" <jerinj@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>
CC: "thomas@monjalon.net" <thomas@monjalon.net>, "Gavin Hu (Arm Technology
 China)" <Gavin.Hu@arm.com>, "msantana@redhat.com" <msantana@redhat.com>,
 "aconole@redhat.com" <aconole@redhat.com>, "jerinj@marvell.com"
 <jerinj@marvell.com>, Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
 "stable@dpdk.org" <stable@dpdk.org>, nd <nd@arm.com>
Thread-Topic: [dpdk-dev] [PATCH] acl: fix build issue with some arm64 compiler
Thread-Index: AQHVHHdDb9Awx2+OaUqUzFfJSJHNCaaPqs4Q
Date: Fri, 7 Jun 2019 05:35:25 +0000
Message-ID: <VE1PR08MB51490D29D111437F89D43AC798100@VE1PR08MB5149.eurprd08.prod.outlook.com>
References: <20190606145054.39995-1-jerinj@marvell.com>
In-Reply-To: <20190606145054.39995-1-jerinj@marvell.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-ts-tracking-id: 0f9cc0a0-00a6-4ec7-9201-bd501b59cdff.0
x-checkrecipientchecked: true
authentication-results: spf=none (sender IP is )
 smtp.mailfrom=Honnappa.Nagarahalli@arm.com; 
x-originating-ip: [217.140.111.135]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 5262b119-af16-4eb2-b577-08d6eb09f16f
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0;
 RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);
 SRVR:VE1PR08MB5151; 
x-ms-traffictypediagnostic: VE1PR08MB5151:
x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr
nodisclaimer: True
x-microsoft-antispam-prvs: <VE1PR08MB515129E7B60FBFBF41ABB79B98100@VE1PR08MB5151.eurprd08.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:5516;
x-forefront-prvs: 0061C35778
x-forefront-antispam-report: SFV:NSPM;
 SFS:(10009020)(136003)(346002)(376002)(366004)(396003)(39860400002)(199004)(189003)(3846002)(6246003)(74316002)(7696005)(478600001)(53936002)(6116002)(99286004)(11346002)(446003)(5660300002)(76176011)(102836004)(6436002)(66446008)(54906003)(110136005)(486006)(476003)(4326008)(64756008)(25786009)(86362001)(72206003)(73956011)(6506007)(14454004)(76116006)(66476007)(186003)(66556008)(26005)(229853002)(66946007)(55016002)(68736007)(33656002)(71190400001)(71200400001)(305945005)(7736002)(81166006)(8936002)(81156014)(316002)(8676002)(52536014)(2906002)(2501003)(256004)(66066001)(9686003);
 DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB5151;
 H:VE1PR08MB5149.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en;
 PTR:InfoNoRecords; A:1; MX:1; 
received-spf: None (protection.outlook.com: arm.com does not designate
 permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: OGuKVNrRo5Z3mt1HN/tU7bfRbeLG0XxDEXiCkyDx+5aUMfz23AV2W8lwkal/JY9EiK2zoHw+tGO1G5oAj042gs47tIDLXEKWb5zCTvelUS3xXgKrdTMQy+OVXBFFxhPXOiTCgruSZgphZYQa6i7JBm2TsC9awn/dq3JZiBjileIp0b/xHYexK9/su6KUzDHXIyaBgV+acwVEwI6BLV063AxZ4XSIRxZpT/B4xNBfhEmu+ghly0LkN84Gk6S2/QtSIYChcMfnQmGdKTFjUTEQxFfMoHGGN1A0v1pqIgkAx8dCIDwVwM0yVz8SEQ3HK3auVjveDXcI8nExhILWvRTtNS3hzAnpnsaDsFPSz4hQe133ffzFmHNcRrHnNOfTOvxNAvK0HE6UHIkgmS1wvbJbXq2XQsEJK6IBiLfWb0h6HzM=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 5262b119-af16-4eb2-b577-08d6eb09f16f
X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jun 2019 05:35:25.5767 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: Honnappa.Nagarahalli@arm.com
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5151
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

> Subject: [dpdk-dev] [PATCH] acl: fix build issue with some arm64 compiler
>=20
> From: Jerin Jacob <jerinj@marvell.com>
>=20
> 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 i=
n C
> language.
>=20
> ../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;
>=20
> Fixes: 34fa6c27c156 ("acl: add NEON optimization for ARMv8")
> Cc: stable@dpdk.org
>=20
> Signed-off-by: Jerin Jacob <jerinj@marvell.com>
> ---
>  lib/librte_acl/acl_run_neon.h | 29 ++++++++++++-----------------
>  1 file changed, 12 insertions(+), 17 deletions(-)
>=20
> 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;
>=20
>  	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,
>=20
>  	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)};
>=20
This mixes the use of NEON intrinsics with GCC vector extensions. ACLE (Arm=
 C Language Extensions) specifically recommends not to mix the two methods =
in section 12.2.6. IMO, Aaron's suggestion of using a temp vector should be=
 good.

>  		/* Process the 4 bytes of input on each stream. */
>=20
> @@ -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;
>=20
>  	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,
>=20
>  	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)};
>=20
>  		/* Process the 4 bytes of input on each stream. */
>  		input =3D transition4(input, flows.trans, index_array);
> --
> 2.21.0