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 1337DA0093; Wed, 11 May 2022 01:24:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A8FE6406B4; Wed, 11 May 2022 01:24:08 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80081.outbound.protection.outlook.com [40.107.8.81]) by mails.dpdk.org (Postfix) with ESMTP id BE3BD4067E for ; Wed, 11 May 2022 01:24:06 +0200 (CEST) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=m7PTA+jQQg0chfgSzmSll9A+6Ehv4IqfH2LxwFeRRxrT54ZKaFwUT4BOKxmUPQy2gjBnaAZ14YvzCbO3XWiMCNwaFRN4ZzvjBcoJ2rACaRRHv1fOZJmi7WD8j/y/83CDqj5PSmacgdbwXE11cxkFy1j845aBJC/h0X7Vkv1ucym6413BmBWASWjlL68fYwwp1DJTgI2+nNpBt3Blg0xPCjnk59ch6HNjitySlVEh1LzgEcJ8GnDa4MujTqjUOzqDR/MnVqM7gqJSPsAs/0yL/b3PMO3vTMkPZFp+RxUYy3A6Zx27HaS5ONTqJs6OM8qZDlr2EI7I8cfVVwsVTj9Lag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FtsU26vTBbzvMAKartIAOvVJedzN2eIMktuagn+4r1w=; b=d+LTMip1toqDi+/BP+b0PcWYcJ9C8dXYugcSCkxuUi8hMvlox5Bc1cUuMU4+F+xri4EtfHg2bOpCl8pvbt44LhCRAum7lwJN/nKtt+5QpoAtrAtVlJprC9pm8UuSw+euIIceXOWD3cD3FIG/8ALnf9f7czmqKQw05X3lwcM9U7GK24PpYxohlD1wKAiqOVmfHbQkFaTb+02qiIZ99tCMMwBwJVgMydIwKNPH0PWNh5Y2vxtUnFc3zcI5Dryt+Tkuz0SuxVPLqhq2DwXbUyDb9CgViteJUiOFnjbrc5p8Tea6x0GoyEBn8e3kUVw2HDe8CZlCbwrs80q6K37xc1Cf2Q== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=dpdk.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) 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=FtsU26vTBbzvMAKartIAOvVJedzN2eIMktuagn+4r1w=; b=RZHSOyR+YOYsdGUcX8nXEKzDSJ5528ZZk/xVo+Z+fLzuawexqutskOh59aMwMXVU6lc4x3gIcem9qJKVbNBCpcGrzCHCJtrwXNtqOS2E97iYLTdO1VrCd0pHqbBnknXG9TQ2G9/H/ZCPiAgg95FsHE1MwDO5Z0CqfD/+oDwuDjg= Received: from AM7PR03CA0001.eurprd03.prod.outlook.com (2603:10a6:20b:130::11) by AM7PR08MB5448.eurprd08.prod.outlook.com (2603:10a6:20b:106::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.21; Tue, 10 May 2022 23:24:03 +0000 Received: from AM5EUR03FT020.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:130:cafe::f6) by AM7PR03CA0001.outlook.office365.com (2603:10a6:20b:130::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.23 via Frontend Transport; Tue, 10 May 2022 23:24:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT020.mail.protection.outlook.com (10.152.16.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.15 via Frontend Transport; Tue, 10 May 2022 23:24:03 +0000 Received: ("Tessian outbound 78191104f1b7:v118"); Tue, 10 May 2022 23:24:02 +0000 X-CR-MTA-TID: 64aa7808 Received: from 7c5bd6e3596b.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9056CEF0-94F7-43C3-9619-0723940FD290.1; Tue, 10 May 2022 23:23:56 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 7c5bd6e3596b.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 10 May 2022 23:23:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OAaS5CU+zJEO5wsSeTQvdbOB8pxfLndqkG1qyEyqLfVj9T9N83+BtKct94d11oLfhN9PvkPpJxN/tIfgvmP6VRX6B7U0LtPXvYFTQVDyFK6bX3hH968oX2iL0qV8dLptVSDJxMpvkM9Q/NVzp7pDA69mtetogafXoOk+80LXzT1tp5NSdpzCEyaxWJzi5+5boe4CSFDwRPeWpA0nRLGWuOq6lYPeDLaIIZXceWsdo2NGIARCXoyfhNzUZa/TapF944oQfogOBAsSTfC1UTSCw0bTM+TqFj3WN0zm9x5evnV6fxQ/YaJHtFt7R6UOZDmD05wLLg88hzyvSBilL4Y2jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FtsU26vTBbzvMAKartIAOvVJedzN2eIMktuagn+4r1w=; b=aaJb/gYeLjV1hqxatWwwa6GVNYlnhv2/ValDN06/qfvuZWL007JFmlAKDrj1PAUR8qoPCc99l0svaAFcyoh7YsCEHuwpW+QeBzOS7+VXGe4765eBDvccKTRq3crh3stTmpHrDdKu4DjiTnBBvIE2NiNtfP2xaPMtspH81EQyjVcPf3MEMFrw7gEyzGgba0BgsMQF7XsXUyjfGk3zwJB28HIsy73rWKuE5FazEtr2MdYC+BUjAs4iNJNiybEeF3aEgP1fKnPUmeGWWjji+nzoMZ+qd0YravI7OaEd8gWgCT+08GAJCokz6390GayGKaMVPbBq+DLOVjlnt0k4yNvRnA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none 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=FtsU26vTBbzvMAKartIAOvVJedzN2eIMktuagn+4r1w=; b=RZHSOyR+YOYsdGUcX8nXEKzDSJ5528ZZk/xVo+Z+fLzuawexqutskOh59aMwMXVU6lc4x3gIcem9qJKVbNBCpcGrzCHCJtrwXNtqOS2E97iYLTdO1VrCd0pHqbBnknXG9TQ2G9/H/ZCPiAgg95FsHE1MwDO5Z0CqfD/+oDwuDjg= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DB7PR08MB3483.eurprd08.prod.outlook.com (2603:10a6:10:4a::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.23; Tue, 10 May 2022 23:23:53 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::44cf:1f8d:e477:1f99]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::44cf:1f8d:e477:1f99%8]) with mapi id 15.20.5227.023; Tue, 10 May 2022 23:23:53 +0000 From: Honnappa Nagarahalli To: Stanislaw Kardach CC: "dev@dpdk.org" , Frank Zhao , Sam Grove , "mw@semihalf.com" , "upstream@semihalf.com" , nd , Stephen Hemminger , "bruce.richardson@intel.com" , "Ananyev, Konstantin" , nd Subject: RE: [PATCH 1/1] test/ring: remove excessive inlining Thread-Topic: [PATCH 1/1] test/ring: remove excessive inlining Thread-Index: AQHYZGU8jo2Hgj8qUUGuTVxVsdB4Wq0Yv8Cg Date: Tue, 10 May 2022 23:23:53 +0000 Message-ID: References: <20220510115758.457794-1-kda@semihalf.com> In-Reply-To: <20220510115758.457794-1-kda@semihalf.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 905F6262F74F6342B8AF772EEF04D234.0 x-checkrecipientchecked: true Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-MS-Office365-Filtering-Correlation-Id: ce4a5456-c932-4366-b2d9-08da32dc2b8c x-ms-traffictypediagnostic: DB7PR08MB3483:EE_|AM5EUR03FT020:EE_|AM7PR08MB5448:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: /lmJxb1mw4tNrEgZjW5V5x4sjnWuzn4EO4eM+D8csm8NAN9LhUGOxeXGoEIJk8KcwAvDlDlgryBuGtJgfydaxaOY/i7tuqhONDEKrvOFgTFuJcVItnkBGCQL8F6BCHpOkIPcGgUbzaI0giRH5wtXNaSACA+KWwb3eLIyXf3APOtyS30g/u0pU5BBu4iYUZzA7dIT8Vm37aHyJJDGBO8bm5CTmAHEzWAn9N1rwyMlGIvxNILNNg/9JMhlbyU+VNPGcyPcwMQYnIfJckM/p0VKe1/UUw7EYknpTOh2Os+HiOyf+4NWSeYsEpcklLAlLCyGVuE1Bd/HVBCdeqzFiVXjUFeTyUoAg8AJe3b8EB9BSJ9t3NU8DaNE6AufWMzZzRnGGvlAYO0Dx+fLGgW53k8U62gAFWBMm6nylAzCRMR+m9HnPO/xLoy1Z5unsUgOJXjklSZ5hi8i/U6ncpVgKm4Mj5JZyD20YmuBJeZ1Vw5kW8qafts/7eWo926dwIlphVwZiKn13CppAbkubExw9y17wFJlXgNoh55AeH9vuzIDRx93Zdzcg48PWBloR67r3MT40+js4jfOxfzIIb/GS2h/sGP752VLB0ydGCxMjL3ZIaglqEWtDjtDfbGNCXXWsnI2k6NBSJ9FIpbqTaVPCOvSjtF8mBWOghZ5iUYTyttY5zdsvfwFoW5RJP7JjWClfo+tAd3WyrOJJ4+bQjTrVbzPIg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(186003)(122000001)(33656002)(7696005)(83380400001)(2906002)(26005)(55016003)(9686003)(8936002)(86362001)(38070700005)(508600001)(38100700002)(5660300002)(71200400001)(76116006)(66476007)(64756008)(66556008)(54906003)(6916009)(66946007)(66446008)(8676002)(52536014)(4326008)(6506007)(316002); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3483 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ef4b421e-14d0-4e18-1d50-08da32dc259d X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0U9QiaMXmrHrlf6ohlpmtKyjOvCI8xwU+dRKgt8B3j/z9C3OWFbQIAtxKxx9REOqtqd3U6GH0hAwLJYe5f7OmUE5WuulAZrZQp1BdEZtOQXIczc/Kov+0A6LmogDeq/9Nr4e+UzRADwuBa6+XjIUwW2zplU1TggE6ugWOOG8GIX9266w2djb1V5FfVWC5LL133QFwKJXwnhJPRXODQ3Pj3oP/6WqAxmBBRcAMlVqkHp61wAAGps8LmmFsC2sqMGIZxq4m2JJilqOw2OY5oWD6G/iFauADvuZNor56OgHNOAKNSg5ywO8e1hNPTQgNY6aL8P7MYDAiomFwtrsU1Psg5ewHPnOGuebFM4j8nHqlo9PldiYvFbQWM9ItjsCIaa9EjyYAbFOjEr0DDpcuXB057mXj9Ffd1vY9TAk8fNwdYHJlVIzMTNCj7f6DNkwDwf3dikz2lpxxxv243pZQ96rAj1QgeGlWOyEjZQC9MvUEe1ewZffqqwWAgQ8vgB6eNSqqaAOUAaJesI0f0yIcdZ0y8VR8k64WGT/2zlNhj4zjUYpr7Epo5BVaCuTnmOqYQ5iUfGCmqf0hUI7Qto7+9zMEn7+Tdj1GoYYcQolAlQess4k3hf7PLDKJ5nP/aYh7LuEjx3At+oBeGo1tNRsYHcJxAXOq+kh6pGtvvwxaOKTl5rRndSI7RSJgMeEsvWw2Afu X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(33656002)(82310400005)(356005)(86362001)(5660300002)(8936002)(6506007)(83380400001)(52536014)(47076005)(55016003)(9686003)(508600001)(316002)(70206006)(26005)(70586007)(54906003)(8676002)(6862004)(4326008)(336012)(81166007)(7696005)(186003)(2906002)(40460700003)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2022 23:24:03.0556 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ce4a5456-c932-4366-b2d9-08da32dc2b8c X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5448 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org + Bruce, Stephen >=20 > Forcing inlining in test_ring_enqueue and test_ring_dequeue can cause the > compiled code to grow extensively when compiled with no optimization > (-O0 or -Og). This is default in the meson's debug configuration. This ca= n collide > with compiler bugs and cause issues during linking of unit tests where th= e > api_type or esize are non-const variables causing inlining cascade. In pe= rf tests > this is not the case in perf-tests as esize and api_type are const values= . >=20 > One such case was discovered when porting DPDK to RISC-V. GCC 11.2 (and n= o > fix still in 12.1) is generating a short relative jump instruction (J ) for > goto and for loops. When loop body grows extensively in ring test, the ta= rget > offset goes beyond supported offfset of +/- 1MB from PC. This is an obvio= us > bug in the GCC as RISC-V has a two-instruction construct to jump to any > absolute address (AUIPC+JALR). Is there a bug report created for this? Is it possible to add a link to the= bug report? >=20 > However there is no reason to force inlining as the test code works perfe= ctly > fine without it. If this solves the problem, I prefer this as it is test code. >=20 > Fixes: a9fe152363 test/ring: add custom element size functional tests >=20 > Signed-off-by: Stanislaw Kardach > --- > app/test/test_ring.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/app/test/test_ring.h b/app/test/test_ring.h index > c8bfec8399..45c263f3ff 100644 > --- a/app/test/test_ring.h > +++ b/app/test/test_ring.h > @@ -97,7 +97,7 @@ test_ring_copy_from(struct rte_ring_zc_data *zcd, void > *dst, int esize, > } > } >=20 > -static __rte_always_inline unsigned int > +static inline unsigned int > test_ring_enqueue(struct rte_ring *r, void **obj, int esize, unsigned in= t n, > unsigned int api_type) > { > @@ -158,7 +158,7 @@ test_ring_enqueue(struct rte_ring *r, void **obj, int > esize, unsigned int n, > } > } >=20 > -static __rte_always_inline unsigned int > +static inline unsigned int > test_ring_dequeue(struct rte_ring *r, void **obj, int esize, unsigned in= t n, > unsigned int api_type) > { > @@ -222,7 +222,7 @@ test_ring_dequeue(struct rte_ring *r, void **obj, int > esize, unsigned int n, > /* This function is placed here as it is required for both > * performance and functional tests. > */ > -static __rte_always_inline void * > +static inline void * > test_ring_calloc(unsigned int rsize, int esize) { > unsigned int sz; > -- > 2.30.2