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 18D4542814 for ; Wed, 29 Mar 2023 03:05:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1079F40F18; Wed, 29 Mar 2023 03:05:15 +0200 (CEST) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mails.dpdk.org (Postfix) with ESMTP id B30C240EE7 for ; Wed, 29 Mar 2023 03:05:13 +0200 (CEST) Received: by mail-wr1-f51.google.com with SMTP id r29so13983403wra.13 for ; Tue, 28 Mar 2023 18:05:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680051913; x=1682643913; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ltorU6FB/mbDH7oM02ErKajW8dgPROBm8UPRREye1Eg=; b=ZwncK6ydk0BlUToHHN6gUJHBp5kMcaPgu+2RWF/gjnORQG6OHEB866zvZxNG665wQJ mdR7CvhFyTl84g2fMuUa2f2tlFxMoj85n89S3PSyLM6s70fvwIOG6L1dcMwTA7l4TXlf vnq433QAXCqTVNFo6LdWZtndngvifPeezoUAHZ02ig/KHUPA5E5up1CaeD948n4PCCBB fUp5O5JJUri2SwhYMc0+2e/+80uWJZmQ7+nmack2v8LkQNdOPZmR/kFAMnIhMUi+CWrJ 1dXSgQTxIy2CA/lniA3jsWLCRX/bv7Bu5ENdQv6mpFln2nltQ9EPJoN6J98FioZ/DNxO o38w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680051913; x=1682643913; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ltorU6FB/mbDH7oM02ErKajW8dgPROBm8UPRREye1Eg=; b=uPY2AnDX9JDnR6Z5TgrTFlH8yqrPWExVPkewxvsD5Y6Lh7dUlC9AnQGc1Hc1SUfyWt ZkbFDrV0DUTYd9w0fsBOy8SN/nXjwn5g1lmRFFFYC1z7m3S7Z5vlU9vl/hePiHFIePsn 7mH0nIGpydUV3bcBR/rRt2rcMDigoYHUqs/s9wG/zmvpzClcgEJDn8ymZHpp/WWD0VMY 7QftmMMXY8kuutJzr8ufgnCdNeLZsm1gi0udZcnYUsHlmpuuIoJt9M59D0AkEfsR60Jk DDfoj1MwdvyBcE3iLDqdaqIEWcebLutNdxQlATQefMSAVhJVK2VVJVo6wiPWDOYmXmaB C8Vw== X-Gm-Message-State: AAQBX9dSK7sQye7Rw4xh8MjUa0lwvft8IkUL7pJaeGpCGY63Kass0J1k Zixw59NmCE69h8jOfQUk8keHVrsUowA= X-Google-Smtp-Source: AKy350YRdMuQ52IIIu537Bu+/xuQyC8liQEPwya9S98RIxF/wRpqWxO7yA82pnab7x7KK9kYJTHRdA== X-Received: by 2002:a05:6000:ca:b0:2d6:5afe:7b91 with SMTP id q10-20020a05600000ca00b002d65afe7b91mr297098wrx.30.1680051913381; Tue, 28 Mar 2023 18:05:13 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id d9-20020adfe889000000b002d97529b3bbsm18488434wrm.96.2023.03.28.18.05.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 18:05:12 -0700 (PDT) From: luca.boccassi@gmail.com 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 20.11.8 Date: Wed, 29 Mar 2023 02:04:43 +0100 Message-Id: <20230329010446.563852-7-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230329010446.563852-1-luca.boccassi@gmail.com> References: <20230322004155.2333903-19-luca.boccassi@gmail.com> <20230329010446.563852-1-luca.boccassi@gmail.com> MIME-Version: 1.0 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 20.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/31/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/b776878dab0975f8fec25ff976ee954155f9cd8c Thanks. Luca Boccassi --- >From b776878dab0975f8fec25ff976ee954155f9cd8c 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/librte_pdump/rte_pdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c index 1ef1525ff1..29eafaa101 100644 --- a/lib/librte_pdump/rte_pdump.c +++ b/lib/librte_pdump/rte_pdump.c @@ -91,7 +91,7 @@ pdump_copy(struct rte_mbuf **pkts, uint16_t nb_pkts, void *user_params) dup_bufs[d_pkts++] = p; } - 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)) { PDUMP_LOG(DEBUG, "only %d of packets enqueued to ring\n", ring_enq); -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-03-29 01:31:22.904781058 +0100 +++ 0007-pdump-fix-build-with-GCC-12.patch 2023-03-29 01:31:22.506039977 +0100 @@ -1 +1 @@ -From b182466683a5c76657efb4b6b8d43e7d71979034 Mon Sep 17 00:00:00 2001 +From b776878dab0975f8fec25ff976ee954155f9cd8c Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit b182466683a5c76657efb4b6b8d43e7d71979034 ] + @@ -58 +59,0 @@ -Cc: stable@dpdk.org @@ -65 +66 @@ - lib/pdump/rte_pdump.c | 2 +- + lib/librte_pdump/rte_pdump.c | 2 +- @@ -68,7 +69,7 @@ -diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c -index 9bc4bab4f2..53cca1034d 100644 ---- a/lib/pdump/rte_pdump.c -+++ b/lib/pdump/rte_pdump.c -@@ -134,7 +134,7 @@ pdump_copy(uint16_t port_id, uint16_t queue, - - __atomic_fetch_add(&stats->accepted, d_pkts, __ATOMIC_RELAXED); +diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c +index 1ef1525ff1..29eafaa101 100644 +--- a/lib/librte_pdump/rte_pdump.c ++++ b/lib/librte_pdump/rte_pdump.c +@@ -91,7 +91,7 @@ pdump_copy(struct rte_mbuf **pkts, uint16_t nb_pkts, void *user_params) + dup_bufs[d_pkts++] = p; + } @@ -79,2 +80,2 @@ - unsigned int drops = d_pkts - ring_enq; - + PDUMP_LOG(DEBUG, + "only %d of packets enqueued to ring\n", ring_enq);