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 04432A00E6 for ; Mon, 15 Apr 2019 06:52:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 857C35B2E; Mon, 15 Apr 2019 06:52:06 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20082.outbound.protection.outlook.com [40.107.2.82]) by dpdk.org (Postfix) with ESMTP id 739CB5B26 for ; Mon, 15 Apr 2019 06:52:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PeYPaZ4AkC4EsAzglWb2t+KuN1IldZ42shYL1mkelzg=; b=cn47OwxYjm7AU/sZUZ4pPxbqgCL1ik9+peEeeFL81HhUWJzvMbTG41rsNdCbFknMIYL9yUltGft8i4o8P7h1FaiyPv1Gwjc+E/5FiP/J2BzQt3JgOPmj1T9I3bSrC/pfYsSf29ucJ7r/F65EI8Uk/QyEMfMUrJ9szuY7uAVABIs= Received: from VE1PR08MB5149.eurprd08.prod.outlook.com (20.179.30.152) by VE1PR08MB5214.eurprd08.prod.outlook.com (10.255.159.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.16; Mon, 15 Apr 2019 04:52:01 +0000 Received: from VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::e0ae:ecad:ec5:8177]) by VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::e0ae:ecad:ec5:8177%2]) with mapi id 15.20.1792.018; Mon, 15 Apr 2019 04:52:01 +0000 From: Honnappa Nagarahalli To: "jerinj@marvell.com" , "yskoh@mellanox.com" , "bruce.richardson@intel.com" , Pavan Nikhilesh Bhagavatula , "shahafs@mellanox.com" CC: "dev@dpdk.org" , "thomas@monjalon.net" , "Gavin Hu (Arm Technology China)" , Honnappa Nagarahalli , nd , nd Thread-Topic: [EXT] [PATCH 5/6] build: add option for armv8 crypto extension Thread-Index: AQHU8Yb6DqGgIb5/akCGo940k1lIHaY5sFMAgAL6SzA= Date: Mon, 15 Apr 2019 04:52:01 +0000 Message-ID: References: <20190412232451.30197-1-yskoh@mellanox.com> <20190412232451.30197-6-yskoh@mellanox.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: 54cac481-0e92-4542-55fa-08d6c15e1921 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600140)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:VE1PR08MB5214; x-ms-traffictypediagnostic: VE1PR08MB5214: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr nodisclaimer: True x-microsoft-antispam-prvs: x-forefront-prvs: 000800954F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(366004)(376002)(346002)(396003)(39850400004)(136003)(199004)(189003)(316002)(2501003)(11346002)(2201001)(8676002)(446003)(81166006)(186003)(66066001)(52536014)(99286004)(97736004)(14444005)(256004)(33656002)(86362001)(6506007)(26005)(8936002)(476003)(76176011)(7696005)(81156014)(54906003)(110136005)(5660300002)(68736007)(102836004)(486006)(72206003)(305945005)(6246003)(105586002)(6436002)(106356001)(2906002)(74316002)(14454004)(229853002)(4326008)(53936002)(9686003)(55016002)(25786009)(71200400001)(71190400001)(6116002)(3846002)(478600001)(7736002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB5214; 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: 8YW6ev5T6eIcKFd+vgOSyfaGyf3C3gmp/O49N/5mWXJJlkMf0k5OtyZeD3UdFit76KG/y5o82WeC1nZXRaknNT8Yssow2ljdXCJaHMKF3YK/NW5QCHY8rE5dqg/1wAaq1g445Z/w/sGhlUa2TQsPV6eoZdrJ6tpdfABPJ8VuaJEt+DwfhxQ6VK7u5gdVVlbkJM/Ki6qO9aLVu3CMGSYOCTxpRpdyMUU2/hJoZciKLClNkmoLdhW2asNEFHk++RQfHegm7CuN2u2nMBZVOgYfUGc2u2Su/Y2rebXxGyLvOsvHLPlzvR9pbqTi4t7W1ZaOCkRWgYmvMoabqUCeGC9grr7BPDEk593zfMCoZy1ppXRCwxEZgeFlMBTk3Bm7X26Sb32efr38DtUqzf8IJXu2qwc94v7SIqeFBKKc5pxmdPk= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54cac481-0e92-4542-55fa-08d6c15e1921 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2019 04:52:01.0884 (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-Transport-CrossTenantHeadersStamped: VE1PR08MB5214 Subject: Re: [dpdk-dev] [EXT] [PATCH 5/6] build: add option for armv8 crypto extension 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" Message-ID: <20190415045201.LMJya1vm4WZECpJozZE-sKdECeQrdH1JCK_3rnlhgUc@z> > > > > CONFIG_RTE_MACHINE=3D"armv8a" > > +CONFIG_RTE_ENABLE_ARMV8_CRYPTO=3Dy >=20 > This approach is not scalable. Even, it is not good for BlueField as you = you > need to maintain two images. >=20 > Unlike other CPU flags, arm64's crypto cpu flag is really _optional_. > Access to crypto instructions is always at under runtime check. > See the following in rte_armv8_pmd.c >=20 >=20 > /* Check CPU for support for AES instruction set */ > if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_AES)) { > ARMV8_CRYPTO_LOG_ERR( > "AES instructions not supported by CPU"); > return -EFAULT; > } >=20 > /* Check CPU for support for SHA instruction set */ > if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_SHA1) || > !rte_cpu_get_flag_enabled(RTE_CPUFLAG_SHA2)) { > ARMV8_CRYPTO_LOG_ERR( > "SHA1/SHA2 instructions not supported by CPU"); > return -EFAULT; > } >=20 > So In order to avoid one more config flags specific to armv8 in meson and > makefile build infra And avoid the need for 6/6 patch. IMO, # Introduce > optional CPU flag scheme in eal. Treat armv8 crypto as optional flag # Sk= ip > the eal init check for optional flag. >=20 > Do you see any issues with that approach? >=20 +1 >=20 >=20 >=20 >=20 >=20