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 1FFB742850 for ; Thu, 30 Mar 2023 10:36:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 197AB40E25; Thu, 30 Mar 2023 10:36:20 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 462AF40E25 for ; Thu, 30 Mar 2023 10:36:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680165377; 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=bV8Gf3EfjrZT/rohmhYk0iXP046OhQQBmhPr19OrgWk=; b=HW0B01BD3DTXgrXE8vBLRNp4AlqeiEuUPOZJCrDb3Io4cgyaO/f6ONW0b3VauYRRYhXYEt t61UHtQ4214LfsxjFTY6EoKf95I4BxgM353DxmZOFo/PHDlbKZOdkB5bPOm98wdWnAhD/S 5xQiV6YPMn8c3SkTF0pwwZOS9hJM6hI= 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-168-I1aSo9FhM1WcekB3mZrFxQ-1; Thu, 30 Mar 2023 04:36:10 -0400 X-MC-Unique: I1aSo9FhM1WcekB3mZrFxQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1873E811E7C; Thu, 30 Mar 2023 08:36:10 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.23]) by smtp.corp.redhat.com (Postfix) with ESMTP id 34D0B40521FD; Thu, 30 Mar 2023 08:36:09 +0000 (UTC) From: Kevin Traynor To: Joyce Kong Cc: Ruifeng Wang , Reshma Pattan , Tyler Retzlaff , dpdk stable Subject: patch 'pdump: fix build with GCC 12' has been queued to stable release 21.11.4 Date: Thu, 30 Mar 2023 09:35:58 +0100 Message-Id: <20230330083600.473876-6-ktraynor@redhat.com> In-Reply-To: <20230330083600.473876-1-ktraynor@redhat.com> References: <20230330083600.473876-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/02/23. 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/f27d1cb2ffa3c923741726b0b549dec941ad0669 Thanks. Kevin --- >From f27d1cb2ffa3c923741726b0b549dec941ad0669 Mon Sep 17 00:00:00 2001 From: Joyce Kong Date: Mon, 27 Mar 2023 07:07:12 +0000 Subject: [PATCH] pdump: fix build with GCC 12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit b182466683a5c76657efb4b6b8d43e7d71979034 ] The following warning is observed with GCC12 compilation with release 20.11: In function ‘__rte_ring_enqueue_elems_64’, inlined from ‘__rte_ring_enqueue_elems’ at ../lib/librte_ring/rte_ring_elem.h:225:3, inlined from ‘__rte_ring_do_enqueue_elem’ at ../lib/librte_ring/rte_ring_elem.h:424:2, inlined from ‘rte_ring_mp_enqueue_burst_elem’ at ../lib/librte_ring/rte_ring_elem.h:884:9, inlined from ‘rte_ring_enqueue_burst_elem’ at ../lib/librte_ring/rte_ring_elem.h:946:10, inlined from ‘rte_ring_enqueue_burst’ at ../lib/librte_ring/rte_ring.h:721:9, inlined from ‘pdump_copy’ at ../lib/librte_pdump/rte_pdump.c:94:13: ../lib/librte_ring/rte_ring_elem.h:162:40: warning: ‘*dup_bufs.36_42 + _89’ may be used uninitialized [-Wmaybe-uninitialized] 162 | ring[idx] = obj[i]; | ~~~^~~ ../lib/librte_ring/rte_ring_elem.h:163:44: warning: ‘*dup_bufs.36_42 + _98’ may be used uninitialized [-Wmaybe-uninitialized] 163 | ring[idx + 1] = obj[i + 1]; | ~~~^~~~~~~ ../lib/librte_ring/rte_ring_elem.h:164:44: warning: ‘*dup_bufs.36_42 + _107’ may be used uninitialized [-Wmaybe-uninitialized] 164 | ring[idx + 2] = obj[i + 2]; | ~~~^~~~~~~ ../lib/librte_ring/rte_ring_elem.h:165:44: warning: ‘*dup_bufs.36_42 + _116’ may be used uninitialized [-Wmaybe-uninitialized] 165 | ring[idx + 3] = obj[i + 3]; | ~~~^~~~~~~ ../lib/librte_ring/rte_ring_elem.h:169:42: warning: ‘*dup_bufs.36_42 + _129’ may be used uninitialized [-Wmaybe-uninitialized] 169 | ring[idx++] = obj[i++]; /* fallthrough */ | ~~~^~~~~ ../lib/librte_ring/rte_ring_elem.h:171:42: warning: ‘*dup_bufs.36_42 + _139’ may be used uninitialized [-Wmaybe-uninitialized] 171 | ring[idx++] = obj[i++]; /* fallthrough */ | ~~~^~~~~ ../lib/librte_ring/rte_ring_elem.h:173:42: warning: ‘*dup_bufs.36_42 + _149’ may be used uninitialized [-Wmaybe-uninitialized] 173 | ring[idx++] = obj[i++]; Actually, this is an alias warning as -O3 enables strict alias. This patch fixes it by replacing 'dup_bufs' with '&dup_bufs[0]' as the compiler represents them differently. Fixes: 278f945402c5 ("pdump: add new library for packet capture") Signed-off-by: Joyce Kong Reviewed-by: Ruifeng Wang Acked-by: Reshma Pattan Acked-by: Tyler Retzlaff --- lib/pdump/rte_pdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c index f0dee81e77..805d12236c 100644 --- a/lib/pdump/rte_pdump.c +++ b/lib/pdump/rte_pdump.c @@ -134,5 +134,5 @@ pdump_copy(uint16_t port_id, uint16_t queue, __atomic_fetch_add(&stats->accepted, d_pkts, __ATOMIC_RELAXED); - ring_enq = rte_ring_enqueue_burst(ring, (void *)dup_bufs, d_pkts, NULL); + ring_enq = rte_ring_enqueue_burst(ring, (void *)&dup_bufs[0], d_pkts, NULL); if (unlikely(ring_enq < d_pkts)) { unsigned int drops = d_pkts - ring_enq; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-03-30 09:30:45.443529827 +0100 +++ 0007-pdump-fix-build-with-GCC-12.patch 2023-03-30 09:30:45.274229272 +0100 @@ -1 +1 @@ -From b182466683a5c76657efb4b6b8d43e7d71979034 Mon Sep 17 00:00:00 2001 +From f27d1cb2ffa3c923741726b0b549dec941ad0669 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit b182466683a5c76657efb4b6b8d43e7d71979034 ] + @@ -58 +59,0 @@ -Cc: stable@dpdk.org @@ -69 +70 @@ -index 9bc4bab4f2..53cca1034d 100644 +index f0dee81e77..805d12236c 100644 @@ -72 +73 @@ -@@ -135,5 +135,5 @@ pdump_copy(uint16_t port_id, uint16_t queue, +@@ -134,5 +134,5 @@ pdump_copy(uint16_t port_id, uint16_t queue,