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 92422A04FD; Wed, 28 Dec 2022 13:25:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28D3E40FDF; Wed, 28 Dec 2022 13:25:33 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 3C2AF40141 for ; Wed, 28 Dec 2022 13:25:31 +0100 (CET) Content-class: urn:content-classes:message Subject: dlb2 weird rte_memcpy MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Wed, 28 Dec 2022 13:25:29 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D8760D@smartserver.smartshare.dk> X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: dlb2 weird rte_memcpy Thread-Index: Adkat3i0I4lu5UE8TXKBpIQhFYyHzQ== From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Timothy McDaniel" Cc: X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Timothy, What is the purpose of [1]? Is it superfluous, or should ".hw_rsrc_max" = be removed from the source pointer, or is the size wrong? [1]: = https://elixir.bootlin.com/dpdk/latest/source/drivers/event/dlb2/dlb2.c#L= 280 Building with access attributes to rte_memcpy() [2] causes this error: ../drivers/event/dlb2/dlb2.c: In function 'dlb2_hw_query_resources': ../drivers/event/dlb2/dlb2.c:280:9: error: 'rte_memcpy' reading 40 bytes = from a region of size 32 [-Werror=3Dstringop-overread] 280 | rte_memcpy(dlb2_info, &handle->info.hw_rsrc_max, = sizeof(*dlb2_info)); | = ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../drivers/event/dlb2/dlb2.c:34: ../drivers/event/dlb2/dlb2_priv.h:194:30: note: source object = 'hw_rsrc_max' of size 32 194 | struct dlb2_hw_rsrcs hw_rsrc_max; | ^~~~~~~~~~~ In file included from ../lib/mempool/rte_mempool.h:48, from ../lib/eventdev/rte_eventdev.h:217, from ../drivers/event/dlb2/dlb2.c:22: ../lib/eal/x86/include/rte_memcpy.h:869:1: note: in a call to function = 'rte_memcpy' declared with attribute 'access (read_only, 2, 3)' 869 | rte_memcpy(void *dst, const void *src, size_t n) | ^~~~~~~~~~ cc1: all warnings being treated as errors [2]: = https://patchwork.dpdk.org/project/dpdk/patch/20221228114043.98739-1-mb@s= martsharesystems.com/ Med venlig hilsen / Kind regards, -Morten Br=F8rup