From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93B51C433F5 for ; Wed, 11 May 2022 15:48:53 +0000 (UTC) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AAA9440DDD; Wed, 11 May 2022 17:48:52 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id CDE29406B4 for ; Wed, 11 May 2022 17:48:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652284131; x=1683820131; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=oWUI8Zm3T/JDv0I4F1zBHjNfg/Ot60x5NHYClbgYHmY=; b=l2avVey9DH6Uf4dYxokuqyZoHrKs/ThyHVez5e5mDZZEiftxNz11jxLN S1f9PK5WKo+eTinfy6MfVkxj4FW43k98OUBF97L80aYpuuibzH0uoshK2 kscEUh+l2mIBISSmOJyuyosDR16JTPAxQSQrNRGd3rks1Qr/7ROK40gQ3 0BrLnRDjuU897ApNZIF39fED3QQzEGCku7skDpXIyvRMFksTNoJsng+mw V6kK8zsOCXZwEns8M8DryThPic0put+fyYstxLg990AQPCo48ljrqb6Jv dpHH9cz4O1ueRyJTqD+msNAfr7w6CUsWxB4JOtAY+GtdhZGTE6WbeNfts A==; X-IronPort-AV: E=McAfee;i="6400,9594,10344"; a="249632719" X-IronPort-AV: E=Sophos;i="5.91,217,1647327600"; d="scan'208";a="249632719" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2022 08:48:48 -0700 X-IronPort-AV: E=Sophos;i="5.91,217,1647327600"; d="scan'208";a="624003682" Received: from bricha3-mobl.ger.corp.intel.com ([10.55.133.40]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 11 May 2022 08:48:47 -0700 Date: Wed, 11 May 2022 16:48:43 +0100 From: Bruce Richardson To: Stanislaw Kardach Cc: Honnappa Nagarahalli , dev@dpdk.org, Frank Zhao , Sam Grove , mw@semihalf.com, upstream@semihalf.com Subject: Re: [PATCH v2 1/1] test/ring: remove excessive inlining Message-ID: References: <20220510115758.457794-1-kda@semihalf.com> <20220511150725.744021-1-kda@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220511150725.744021-1-kda@semihalf.com> 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 On Wed, May 11, 2022 at 05:07:25PM +0200, Stanislaw Kardach wrote: > 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 > can collide with compiler bugs and cause issues during linking of unit > tests where the api_type or esize are non-const variables causing > inlining cascade. In perf tests this is not the case in perf-tests as > esize and api_type are const values. > > One such case was discovered when porting DPDK to RISC-V. GCC 11.2 (and > no 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 target offset goes beyond supported offfset of +/- 1MB > from PC. This is an obvious bug in the GCC as RISC-V has a > two-instruction construct to jump to any absolute address (AUIPC+JALR). > > However there is no reason to force inlining as the test code works > perfectly fine without it. > > GCC has a bug report for a similar case (with conditionals): > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93062 > > Fixes: a9fe152363 test/ring: add custom element size functional tests > > Signed-off-by: Stanislaw Kardach Acked-by: Bruce Richardson