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 ED575A0555 for ; Thu, 9 Jun 2022 13:37:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E802C41614; Thu, 9 Jun 2022 13:37:21 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 5052D40220 for ; Thu, 9 Jun 2022 13:37:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654774638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=23T0JF+M7VRx6WY2mvqyAG2JNEMErJQuaYAd3urJTWY=; b=iOE0npl7xrpy2VlMaRUKZt6wQKBoB5tH9mNRb4ZrT2oCmStL+fYGYR3mlBtzs6XQevUTnh f9TJEZ/QZurfANrdwNQk93wlIHGr0ZBSpaLoaoqQgIPE48WaMhjmuCsdi7zZq0TSiC9t0I 9hGZzzlZQ29yAd2SNKJbiXWf6lKG+xA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-75-hxFMfULpPGii_TyXiqwNdQ-1; Thu, 09 Jun 2022 07:37:13 -0400 X-MC-Unique: hxFMfULpPGii_TyXiqwNdQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 68729185A79C; Thu, 9 Jun 2022 11:37:13 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTP id EEA991730C; Thu, 9 Jun 2022 11:37:11 +0000 (UTC) From: Kevin Traynor To: Stanislaw Kardach Cc: Bruce Richardson , Honnappa Nagarahalli , Konstantin Ananyev , dpdk stable Subject: patch 'test/ring: remove excessive inlining' has been queued to stable release 21.11.2 Date: Thu, 9 Jun 2022 12:35:49 +0100 Message-Id: <20220609113701.386938-2-ktraynor@redhat.com> In-Reply-To: <20220609113701.386938-1-ktraynor@redhat.com> References: <20220609113701.386938-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/13/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/3ec90e3ec0b68d06e9b9494798b79f2abaa2a49f Thanks. Kevin --- >From 3ec90e3ec0b68d06e9b9494798b79f2abaa2a49f Mon Sep 17 00:00:00 2001 From: Stanislaw Kardach Date: Wed, 11 May 2022 17:07:25 +0200 Subject: [PATCH] test/ring: remove excessive inlining [ upstream commit 981a025741f80b4036f994ed30b04e757299ab19 ] 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: a9fe152363e2 ("test/ring: add custom element size functional tests") Signed-off-by: Stanislaw Kardach Acked-by: Bruce Richardson Reviewed-by: Honnappa Nagarahalli Acked-by: Konstantin Ananyev --- app/test/test_ring.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 @@ -98,5 +98,5 @@ test_ring_copy_from(struct rte_ring_zc_data *zcd, void *dst, int esize, } -static __rte_always_inline unsigned int +static inline unsigned int test_ring_enqueue(struct rte_ring *r, void **obj, int esize, unsigned int n, unsigned int api_type) @@ -159,5 +159,5 @@ test_ring_enqueue(struct rte_ring *r, void **obj, int esize, unsigned int n, } -static __rte_always_inline unsigned int +static inline unsigned int test_ring_dequeue(struct rte_ring *r, void **obj, int esize, unsigned int n, unsigned int api_type) @@ -223,5 +223,5 @@ test_ring_dequeue(struct rte_ring *r, void **obj, int esize, unsigned int n, * performance and functional tests. */ -static __rte_always_inline void * +static inline void * test_ring_calloc(unsigned int rsize, int esize) { -- 2.34.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-09 12:34:29.852349481 +0100 +++ 0002-test-ring-remove-excessive-inlining.patch 2022-06-09 12:34:29.606980404 +0100 @@ -1 +1 @@ -From 981a025741f80b4036f994ed30b04e757299ab19 Mon Sep 17 00:00:00 2001 +From 3ec90e3ec0b68d06e9b9494798b79f2abaa2a49f Mon Sep 17 00:00:00 2001 @@ -4,0 +5,2 @@ + +[ upstream commit 981a025741f80b4036f994ed30b04e757299ab19 ]