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 7A04DA0032; Wed, 11 May 2022 11:14:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C8C8410EE; Wed, 11 May 2022 11:14:59 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 6612640042 for ; Wed, 11 May 2022 11:14:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652260497; x=1683796497; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=OZUZPeiBbN2T3o1JX1uKzb50y6sZj8RqqOKXNKkTQc8=; b=ACe75dxxzpXhX8FY6RsrbDtH7LRvSVlYrpSC+qaQOxPOE1GLikx34+AA 2P26nVz9YsoIgdeLhYiF6M03Qix35pNtCDOqCOr2SxJo7xExf0ttYEVNC itawA88C4JNfnNh4Nx/OD+55NWoVULKmTs8svx7wkxiRgrIeDgw7z4HF8 tSzoFYdld89Q9B5J9DCV6+SpDAPkBA8jtzqdjpQc8E3NDxH8E/TMHDrBf gcbC0kooRnqsdzN4KDYtePvrroWVwleD0T5yv4/fsAE7PNxic3RHWZcT1 1an4MmCFxVrQrf+jDGJygLdRAHWVNkrifTFO5g/IFWlGsmozkgXG9NkqQ w==; X-IronPort-AV: E=McAfee;i="6400,9594,10343"; a="249540306" X-IronPort-AV: E=Sophos;i="5.91,216,1647327600"; d="scan'208";a="249540306" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2022 02:14:56 -0700 X-IronPort-AV: E=Sophos;i="5.91,216,1647327600"; d="scan'208";a="572002308" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.1.31]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 11 May 2022 02:14:54 -0700 Date: Wed, 11 May 2022 10:14:51 +0100 From: Bruce Richardson To: Honnappa Nagarahalli Cc: Stanislaw Kardach , "dev@dpdk.org" , Frank Zhao , Sam Grove , "mw@semihalf.com" , "upstream@semihalf.com" , nd , Stephen Hemminger , "Ananyev, Konstantin" Subject: Re: [PATCH 1/1] test/ring: remove excessive inlining Message-ID: References: <20220510115758.457794-1-kda@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue, May 10, 2022 at 11:23:53PM +0000, Honnappa Nagarahalli wrote: > + Bruce, Stephen > > > > > > > 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). > Is there a bug report created for this? Is it possible to add a link to the bug report? > > > > > However there is no reason to force inlining as the test code works perfectly > > fine without it. > If this solves the problem, I prefer this as it is test code. > +1 to this. I'm quite wary of changing the ring code itself.