From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1EEF3606A31C for ; Mon, 30 Nov 2026 15:57:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=PaR1PBnn Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6057D4027B; Mon, 30 Nov 2026 16:57:48 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTPS id 0DCD44026E for ; Mon, 30 Nov 2026 16:57:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796054266; 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=EAtOiZYH3DeGrul9y+yD9w4mOPnbPSrYp/a8GzE54C8=; b=PaR1PBnniDJg3yw/Nl29ZfnH6rEd0atLt+JB4/PDATYgw1ATLuU2IIJinpMIVAR2bhtR2D XD6lQDmPNvOWlweBVrQhs2rBjSApKiLp3iGP8AZEBkwr81KW37XAdysq+qvgpSFZWU/pi/ 1JCIMAZPxwaWX4nydog08zqCWG0oAkA= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-630-nf0IVmgiNBKZJ5lP7sO0Og-1; Mon, 30 Nov 2026 15:57:44 +0000 X-MC-Unique: nf0IVmgiNBKZJ5lP7sO0Og-1 X-Mimecast-MFC-AGG-ID: nf0IVmgiNBKZJ5lP7sO0Og_1796054263 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4ba078abd78so72738395e9.1 for ; Mon, 30 Nov 2026 07:57:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796054263; x=1796659063; h=in-reply-to:references:user-agent:to:from:cc:subject:message-id :date:content-type:content-transfer-encoding:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=EAtOiZYH3DeGrul9y+yD9w4mOPnbPSrYp/a8GzE54C8=; b=0sFjhNt2XXQQXiAdpr4JsBms+3DcNLYyp5ywIF2WtTnEnKuKg8ESuJwOFNbDlD2Sgd POau3Ljl+Y8B+GZzlPKt5pcuam9VJW/elyr1b4d7Iqh8xAk7TKmED10T0a1k/WazsziE Jf+0Vk78GXVM8Ca07vDKlvBvRz+2Ul13Cu1K0CN5gk3ZtZCTLB2b30om0YxlqvCmgeVE 5xPPgVW6GMlwg9zpG3kU+SBIgceVwJUB77bcG82+heBegaCdHYoiALHugsbZXdAcojB5 KAvyoX70CTLz2CTfgc1+AyicqTU+hf9r7fKy/TKqTjG4lLJ8P5fF3Yfp0tfXA6wh0/yp 5vJw== X-Gm-Message-State: APuU4Z9/3sj/l3oHq9Y3XYxhBDmoS/gefYXjs4q/YZNWyhKNa9ApAr3i lo3FXtWD4mkazc3RAgcfG0lJkauxuYa6HWMcyNq7jgbP+ByHaBzLXu+AphuwRhISb7VE0EMBE2+ Dt6uYbyqcgG+TPVBcgSvXrfseoqdkazs/l0V4yrxPFrFC X-Gm-Gg: AZFdTZd38wzBFHPAD7O/9/EBRlOs5Nsn+XyN5NTcmvPYSWI6zIYaEpjgmI58fxvPt+L hVfb9LW62AjCqchnqFvdtCwh7oa6S82v9D74QRdpfa0RUMGyUjYiLMW0dnr27IYcYSUuXdlXNAR A1+wk5l5I3tXKbNVLQOVD3WUu33NoIMBvX4lRhzdIDSPurtrO4g+xkzL+abMr0xCSGpetF1JwxF hafn+owfTBnlV4AjPSyTTEqGHUNhsFwhUcF91lRB2IoAGdUryNAn6n6D369E8vn5bHTIbsA9ko0 kogE/3AD05ccDTp59oNXKEWiXbRSGny3LEYBCyG9d0pARddPzYcviHuEmwo9dJLC2vNnL+k2Rn7 oZ0sg4ePJpHp8Jo6YMQqut1DMrHEmnJyRpMfU0WwMjffWmZH4Dqvf2iPwC/hsFbYkNVH7IYqeiS HrxOwdqj5OF/JVKFD4bZEg2V2Gvyu2kJE= X-Received: by 2002:a05:600c:4f42:b0:4bb:5c5c:8130 with SMTP id 5b1f17b1804b1-4bb8881c726mr863403135e9.5.1796054262943; Mon, 30 Nov 2026 07:57:42 -0800 (PST) X-Received: by 2002:a05:600c:4f42:b0:4bb:5c5c:8130 with SMTP id 5b1f17b1804b1-4bb8881c726mr863402565e9.5.1796054262553; Mon, 30 Nov 2026 07:57:42 -0800 (PST) Received: from localhost (2a01cb00021ec000b06e6b63494bd4c5.ipv6.abo.wanadoo.fr. [2a01:cb00:21e:c000:b06e:6b63:494b:d4c5]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884911e3sm1158027325e9.6.2026.11.30.07.57.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Nov 2026 07:57:41 -0800 (PST) X-Archived-By: Mime-Version: 1.0 Date: Mon, 30 Nov 2026 16:57:41 +0100 Message-Id: Subject: Re: [PATCH dpdk] ring: split 128-bit pair copies for unoptimized GCC Cc: , "Konstantin Ananyev" , "Wathsala Vithanage" , =?utf-8?q?Morten_Br=C3=B8rup?= , "Stephen Hemminger" , From: "Robin Jarry" To: "Bruce Richardson" User-Agent: aerc/0.22.0-49-g9313f0f0a413 References: <20261130122929.246502-2-rjarry@redhat.com> In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: u8Gy-djUctRKLtn23_kYlGr8QnR6nw2OhQJtXCymaBI_1796054263 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=flowed X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Bruce Richardson, Nov 30, 2026 at 15:14: > On Mon, Nov 30, 2026 at 01:29:30PM +0100, Robin Jarry wrote: >> GCC 14 and 16 at -O0 report -Wstringop-overread when an inlined >> ring enqueue receives a 24-byte item. Without optimization, GCC >> diagnoses the 32-byte memcpy in the unreachable 128-bit copy path. >> The unoptimized-build warning flag does not apply to applications >> compiling DPDK headers, and the header-local suppression is gone. >>=20 >> Copy the pair as two 16-byte elements instead. This avoids the >> false warning without suppressing diagnostics for applications. >> Optimized x86-64 code still uses two 16-byte loads and stores. >>=20 >> Fixes: 812a18c167f4 ("build: disable GCC string op warnings when unoptim= ized") >> Cc: stable@dpdk.org >> Signed-off-by: Robin Jarry >> --- >> lib/ring/rte_ring_elem_pvt.h | 7 +++++-- >> 1 file changed, 5 insertions(+), 2 deletions(-) >>=20 > Forgive my ignorance here, but is this solving the underlying issue or ju= st > tweaking the code to hide the warning. Given a 24-byte object, is two > 16-byte copies not just as bad as a single 32-byte copies? Possibly just hiding the warning :D I'll send a v3 that re-establishes the local warning suppressions instead. > > /Bruce > > PS: AI analysis and testing of this patch also flags that when compiled f= or an > architecture with AVX2 available, the original code produces one 32-byte > load-store, vs two 16-byte load-stores for the updated code. Therefore, > there is potential for a regression here for any cases where we may be lo= ad > or store bounded. --=20 Robin # Avoid contact with skin.