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 331F542800 for ; Wed, 22 Mar 2023 01:42:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F1C2427F2; Wed, 22 Mar 2023 01:42:02 +0100 (CET) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id 49B0C40E09 for ; Wed, 22 Mar 2023 01:42:00 +0100 (CET) Received: by mail-wm1-f43.google.com with SMTP id o40-20020a05600c512800b003eddedc47aeso4983870wms.3 for ; Tue, 21 Mar 2023 17:42:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679445720; 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=3BoNyT3u84Tr2GtRX82uY20dklui5ixnXGquXgoV81k=; b=it2B0evH8sFqW6rek7h/OkkM63o+f0WcBtw02Himue88kYT6L5ru0VXu7DSNMqvxs0 rRxYtLvVEDJAUoJ+3WqE/FScBiPCh//eLoAN6nYQfw966GierqvMLAEmmiC/M5HgDn7c ZJiDFTTjvgiB+HN+H/L/RGLLlfu3wSAEqeKdGAI1AsubPUvnlg451/LPRDE98pHLfFIS OB4SBBwbTUxBxx/ltS+3IlVdGPmskkxNGXtPWfk4m2a6/TAg0lZoyU/7Ftp6IfqoYWLv CQ7n+hzmUcK/dqVCRk9jVhdflRWtrifGfoW2GPI2pjYoHEywB5qAuAv4fMfUOqXMDMoz HMjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679445720; 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=3BoNyT3u84Tr2GtRX82uY20dklui5ixnXGquXgoV81k=; b=Nz+C0QEnvPoz8LJqob0jPbaMcyEYf7zccJCo/A9EgFvkBtSnYWRPDFjxA/hk0VB6qO 8M5203w1IYhjZioKwthO3KrWvINM+pA4/gOua0DriO6+PcLs1r7S6OeisXpte+AaBjSt 8i0KdaHm+g1xDwOP0SKhf6+lT6wD9gC0BGntPApYI6FPRFY1eTO8iqI8WVffp7CN+6FZ /fnMFLOBYK5jbT8me0mONyW6GD0byIN2RjmBRMpIbij9t0EToCyiMpUUsIpEmcK9GUyx yMfM+BUDTb2NGwibkhmatXkDuLUZu3ISqUFWlAv3gaSkqUgkFF0yraghk9lTk3uRzB4p x8NA== X-Gm-Message-State: AO0yUKXQWLDEtW7WtZ1hoG6j5ML219jKsPvElR859Ylp8mNczA4DZVBS 0v8piqHJNOJWbisOc/r21UbGRrGh0AI= X-Google-Smtp-Source: AK7set8omU7NRuYO0iDGf51yxui6KaXrZroKuVNI4M0UKeIpqlxZRcV/foZV2efGkuyUfvfsld2xmQ== X-Received: by 2002:a05:600c:2281:b0:3ed:abb9:7515 with SMTP id 1-20020a05600c228100b003edabb97515mr4084470wmf.11.1679445719588; Tue, 21 Mar 2023 17:41:59 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id u2-20020a05600c00c200b003edd1c44b57sm9792654wmm.27.2023.03.21.17.41.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 17:41:59 -0700 (PDT) From: luca.boccassi@gmail.com To: Kevin Traynor Cc: David Marchand , dpdk stable Subject: patch 'ring: silence GCC 12 warnings' has been queued to stable release 20.11.8 Date: Wed, 22 Mar 2023 00:41:38 +0000 Message-Id: <20230322004155.2333903-2-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230322004155.2333903-1-luca.boccassi@gmail.com> References: <20230315224631.1025649-39-luca.boccassi@gmail.com> <20230322004155.2333903-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/23/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/9bbcaea1b25828632afe2bb44d1f3a565e00d8dc Thanks. Luca Boccassi --- >From 9bbcaea1b25828632afe2bb44d1f3a565e00d8dc Mon Sep 17 00:00:00 2001 From: Kevin Traynor Date: Tue, 20 Dec 2022 10:52:17 +0000 Subject: [PATCH] ring: silence GCC 12 warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit dea4c5415506b3c1996cc56dcf15ffb5f6f1d49c ] gcc 12.2.1 on Fedora 37 is giving stringop-overread and stringop-overflow warnings when compiled with --buildtype=debug e.g. [1]. They look similar to the overflow issues previously squashed in rte_memcpy commit b5b3ea803e47 ("eal/x86: ignore gcc 10 stringop-overflow warnings"). Squash these warnings, waiting for a cleaner fix. [1] lib/ring/rte_ring_elem_pvt.h:100:25: error: ‘memcpy’ reading 32 bytes from a region of size 4 [-Werror=stringop-overread] 100 | memcpy((void *)(ring + idx), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 101 | (const void *)(obj + i), 32); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/ring/rte_ring_elem_pvt.h:234:25: error: ‘memcpy’ writing 32 bytes into a region of size 4 overflows the destination [-Werror=stringop-overflow=] 234 | memcpy((void *)(obj + i), (void *)(ring + idx), 32); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Kevin Traynor Signed-off-by: David Marchand --- lib/librte_ring/rte_ring_elem.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/librte_ring/rte_ring_elem.h b/lib/librte_ring/rte_ring_elem.h index b79ba5cb7f..0685969d14 100644 --- a/lib/librte_ring/rte_ring_elem.h +++ b/lib/librte_ring/rte_ring_elem.h @@ -104,6 +104,12 @@ ssize_t rte_ring_get_memsize_elem(unsigned int esize, unsigned int count); struct rte_ring *rte_ring_create_elem(const char *name, unsigned int esize, unsigned int count, int socket_id, unsigned int flags); +#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 120000) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#pragma GCC diagnostic ignored "-Wstringop-overread" +#endif + static __rte_always_inline void __rte_ring_enqueue_elems_32(struct rte_ring *r, const uint32_t size, uint32_t idx, const void *obj_table, uint32_t n) @@ -1076,6 +1082,10 @@ rte_ring_dequeue_burst_elem(struct rte_ring *r, void *obj_table, return 0; } +#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 120000) +#pragma GCC diagnostic pop +#endif + #ifdef ALLOW_EXPERIMENTAL_API #include #include -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-03-21 21:56:37.147319081 +0000 +++ 0002-ring-silence-GCC-12-warnings.patch 2023-03-21 21:56:37.004805629 +0000 @@ -1 +1 @@ -From dea4c5415506b3c1996cc56dcf15ffb5f6f1d49c Mon Sep 17 00:00:00 2001 +From 9bbcaea1b25828632afe2bb44d1f3a565e00d8dc Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit dea4c5415506b3c1996cc56dcf15ffb5f6f1d49c ] + @@ -32,2 +33,0 @@ -Cc: stable@dpdk.org - @@ -37 +37 @@ - lib/ring/rte_ring_elem_pvt.h | 10 ++++++++++ + lib/librte_ring/rte_ring_elem.h | 10 ++++++++++ @@ -40,7 +40,7 @@ -diff --git a/lib/ring/rte_ring_elem_pvt.h b/lib/ring/rte_ring_elem_pvt.h -index 83788c56e6..e24e4492ff 100644 ---- a/lib/ring/rte_ring_elem_pvt.h -+++ b/lib/ring/rte_ring_elem_pvt.h -@@ -10,6 +10,12 @@ - #ifndef _RTE_RING_ELEM_PVT_H_ - #define _RTE_RING_ELEM_PVT_H_ +diff --git a/lib/librte_ring/rte_ring_elem.h b/lib/librte_ring/rte_ring_elem.h +index b79ba5cb7f..0685969d14 100644 +--- a/lib/librte_ring/rte_ring_elem.h ++++ b/lib/librte_ring/rte_ring_elem.h +@@ -104,6 +104,12 @@ ssize_t rte_ring_get_memsize_elem(unsigned int esize, unsigned int count); + struct rte_ring *rte_ring_create_elem(const char *name, unsigned int esize, + unsigned int count, int socket_id, unsigned int flags); @@ -57,2 +57,2 @@ -@@ -382,4 +388,8 @@ end: - return n; +@@ -1076,6 +1082,10 @@ rte_ring_dequeue_burst_elem(struct rte_ring *r, void *obj_table, + return 0; @@ -65 +65,3 @@ - #endif /* _RTE_RING_ELEM_PVT_H_ */ + #ifdef ALLOW_EXPERIMENTAL_API + #include + #include