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 41DB541EAF for ; Thu, 16 Mar 2023 10:09:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3845242BAC; Thu, 16 Mar 2023 10:09:05 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 3871F40FDF for ; Thu, 16 Mar 2023 10:09:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678957741; 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=EHKl7X89q4vEKenplBGGdcAcOsFnhdjmxS3Cxo2fEns=; b=Dgb6F61L8OuIPZXTSs99F4iZUKQtCnbNpCWPlDNUx6XAZM15zZ8QtbEn19VOUZV0jQfdPS VhjiRzn6VTKaya9/UXmQq5N5wQ/FBFWzEOVcS5IWW4CCXAA8onvuFCQKpfePBwjVqvVGPm i1YAo23+UpCgnBTXysILN73T3YezWKw= Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-37-k5ZaEMZ1NPeb61YcsYGGjg-1; Thu, 16 Mar 2023 05:09:00 -0400 X-MC-Unique: k5ZaEMZ1NPeb61YcsYGGjg-1 Received: by mail-pj1-f72.google.com with SMTP id n33-20020a17090a5aa400b0023b4f444476so628937pji.3 for ; Thu, 16 Mar 2023 02:09:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678957739; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EHKl7X89q4vEKenplBGGdcAcOsFnhdjmxS3Cxo2fEns=; b=rQQTrA6EXC71hN3FlJZ/wtOa5jpyjYiQqH08qBlbIIrOq/AVw3WovBBprNpUdfzBlF 2jOn+BHGLGoGLw2TyqeGpijMfB0Qszp7z0HEh3kr0LPCSlVyHZDiuYjCK4rsMahQqGrf oJCS+DWA9ZV6DDxXPbHuhKJTloZ0/JjOpKE3MIo6KQKXJUsVQ8GrYor8aJzUMv/fS+p5 olWfde4gbuASH8hkSrp2/tBED5Wx7GrTSqJtKPnY2k2z8pSOz8mvuvVLw8ooU7vOMeBJ D7kX5oYYmydWvW+ixpry42ohXRJ3gBX1y+ZpNJ/ToJDNCh6W+yIFg1PujQD8qHf8poBD 8G1Q== X-Gm-Message-State: AO0yUKX+ytimKMSj6jBI52rNBOvyx74xz0/OEwWCfLN6XEWOQjLcgwcn 7z1TKUh9wj3yk7DSzKhKRTmpyVC2W8PY8/cGbiUpSZBl+ci0TrR0vDrDfdMfpEU0tfquHYRcLdw 0UKsIYT+98HDGudYvbw== X-Received: by 2002:a17:903:2443:b0:19f:30be:ea09 with SMTP id l3-20020a170903244300b0019f30beea09mr1091573pls.9.1678957739133; Thu, 16 Mar 2023 02:08:59 -0700 (PDT) X-Google-Smtp-Source: AK7set/kUyZ+FjzyQkOAyOfaxME7NVsHQBhKmKhHb2sWF3Xnw5D2DcSaiPUVie4XsLzCcamSKe5MHTBmmDUI2A8PrEk= X-Received: by 2002:a17:903:2443:b0:19f:30be:ea09 with SMTP id l3-20020a170903244300b0019f30beea09mr1091560pls.9.1678957738790; Thu, 16 Mar 2023 02:08:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: David Marchand Date: Thu, 16 Mar 2023 10:08:47 +0100 Message-ID: Subject: Re: Meson buildtype for ci jobs? To: Honnappa Nagarahalli , Konstantin Ananyev , Thomas Monjalon , "Richardson, Bruce" Cc: "ci@dpdk.org" , Aaron Conole , dev , Patrick Robb , Kevin Traynor X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-bounces@dpdk.org On Thu, Mar 16, 2023 at 9:49=E2=80=AFAM David Marchand wrote: > > Adding dev@ mailing list and ring maintainers, > > On Wed, Mar 15, 2023 at 8:13=E2=80=AFPM Patrick Robb = wrote: > >> > >> Would passing "-Ddebug=3Dtrue" be better than changing the default bui= ldtype? > >> It's possible to have a release build (i.e. O3 optimized) with debug i= nfo. > > > > > > Strangely, even with -Ddebug true if I'm running buildtype "release" it= returns the same warnings. I'm inferring from your comment that release op= timization =3D=3D debugoptimized optimization and debug behavior from -Ddeb= ug=3Dtrue =3D=3D debug behavior from debugoptimized, so release buildtype += debug "should" have the same behavior as just setting buildtype debugoptim= ized, and yet... > > > > I'll have to look into this a little more. Hopefully by the end I'll be= like David and understand the relations between these flags better, hah. > > As for how buildtype, optimizations and debug params are concerned, > the summary is here: > https://mesonbuild.com/Builtin-options.html#details-for-buildtype > > > In my tests this morning with a Alpine container, I noticed that > setting -Dplatform to native makes the issue disappear... > So an additional factor is building with platform=3Dgeneric. > > ~/dpdk # meson configure build | awk '{if ($1 ~ > /^(buildtype|platform|debug|optimization)$/) { print $0; }}' > buildtype debug [plain, debug, > debugoptimized, release, minsize, custom] Build type to use > debug true [true, false] > Debug > optimization 0 [0, g, 1, 2, 3, s] > Optimization level > platform generic > Platform to build, either > "native", "generic" or a SoC. Please refer to the Linux build guide > for more information. > > ... > > In file included from ../lib/ring/rte_ring_elem.h:24, > from ../lib/ring/rte_ring.h:43, > from ../lib/mempool/rte_mempool.h:47, > from ../lib/mbuf/rte_mbuf.h:38, > from ../lib/net/rte_ether.h:22, > from ../lib/ethdev/rte_eth_ctrl.h:10, > from ../lib/ethdev/rte_ethdev.h:1421, > from ../app/test/test_event_timer_adapter.c:14: > In function '__rte_ring_enqueue_elems_128', > inlined from '__rte_ring_enqueue_elems' at > ../lib/ring/rte_ring_elem_pvt.h:132:3, > inlined from '__rte_ring_do_enqueue_elem' at > ../lib/ring/rte_ring_elem_pvt.h:328:2, > inlined from 'rte_ring_mp_enqueue_bulk_elem' at > ../lib/ring/rte_ring_elem.h:134:9, > inlined from 'rte_ring_enqueue_bulk_elem' at > ../lib/ring/rte_ring_elem.h:199:10, > inlined from 'rte_ring_enqueue_elem' at ../lib/ring/rte_ring_elem.h:2= 90:9, > inlined from 'rte_ring_enqueue' at ../lib/ring/rte_ring.h:339:9, > inlined from '_cancel_producer' at > ../app/test/test_event_timer_adapter.c:834:10: > ../lib/ring/rte_ring_elem_pvt.h:100:25: error: 'memcpy' reading 32 > bytes from a region of size 8 [-Werror=3Dstringop-overread] > 100 | memcpy((void *)(ring + idx), > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 101 | (const void *)(obj + i), 32); > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../app/test/test_event_timer_adapter.c: In function '_cancel_producer': > ../app/test/test_event_timer_adapter.c:805:1: note: source object > 'obj' of size 8 > 805 | _cancel_producer(uint64_t timeout_tcks, uint64_t timers) > | ^~~~~~~~~~~~~~~~ > In function '__rte_ring_enqueue_elems_128', > inlined from '__rte_ring_enqueue_elems' at > ../lib/ring/rte_ring_elem_pvt.h:132:3, > inlined from '__rte_ring_do_enqueue_elem' at > ../lib/ring/rte_ring_elem_pvt.h:328:2, > inlined from 'rte_ring_sp_enqueue_bulk_elem' at > ../lib/ring/rte_ring_elem.h:163:9, > inlined from 'rte_ring_enqueue_bulk_elem' at > ../lib/ring/rte_ring_elem.h:202:10, > inlined from 'rte_ring_enqueue_elem' at ../lib/ring/rte_ring_elem.h:2= 90:9, > inlined from 'rte_ring_enqueue' at ../lib/ring/rte_ring.h:339:9, > inlined from '_cancel_producer' at > ../app/test/test_event_timer_adapter.c:834:10: > ../lib/ring/rte_ring_elem_pvt.h:100:25: error: 'memcpy' reading 32 > bytes from a region of size 8 [-Werror=3Dstringop-overread] > 100 | memcpy((void *)(ring + idx), > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 101 | (const void *)(obj + i), 32); > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../app/test/test_event_timer_adapter.c: In function '_cancel_producer': > ../app/test/test_event_timer_adapter.c:805:1: note: source object > 'obj' of size 8 > 805 | _cancel_producer(uint64_t timeout_tcks, uint64_t timers) > | ^~~~~~~~~~~~~~~~ > In function '__rte_ring_enqueue_elems_128', > inlined from '__rte_ring_enqueue_elems' at > ../lib/ring/rte_ring_elem_pvt.h:132:3, > inlined from '__rte_ring_do_rts_enqueue_elem' at > ../lib/ring/rte_ring_rts_elem_pvt.h:211:3, > inlined from 'rte_ring_mp_rts_enqueue_bulk_elem' at > ../lib/ring/rte_ring_rts.h:83:9, > inlined from 'rte_ring_enqueue_bulk_elem' at > ../lib/ring/rte_ring_elem.h:205:10, > inlined from 'rte_ring_enqueue_elem' at ../lib/ring/rte_ring_elem.h:2= 90:9, > inlined from 'rte_ring_enqueue' at ../lib/ring/rte_ring.h:339:9, > inlined from '_cancel_producer' at > ../app/test/test_event_timer_adapter.c:834:10: > ../lib/ring/rte_ring_elem_pvt.h:100:25: error: 'memcpy' reading 32 > bytes from a region of size 8 [-Werror=3Dstringop-overread] > 100 | memcpy((void *)(ring + idx), > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 101 | (const void *)(obj + i), 32); > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../app/test/test_event_timer_adapter.c: In function '_cancel_producer': > ../app/test/test_event_timer_adapter.c:805:1: note: source object > 'obj' of size 8 > 805 | _cancel_producer(uint64_t timeout_tcks, uint64_t timers) > | ^~~~~~~~~~~~~~~~ > In function '__rte_ring_enqueue_elems_128', > inlined from '__rte_ring_enqueue_elems' at > ../lib/ring/rte_ring_elem_pvt.h:132:3, > inlined from '__rte_ring_do_hts_enqueue_elem' at > ../lib/ring/rte_ring_hts_elem_pvt.h:196:3, > inlined from 'rte_ring_mp_hts_enqueue_bulk_elem' at > ../lib/ring/rte_ring_hts.h:56:9, > inlined from 'rte_ring_enqueue_bulk_elem' at > ../lib/ring/rte_ring_elem.h:208:10, > inlined from 'rte_ring_enqueue_elem' at ../lib/ring/rte_ring_elem.h:2= 90:9, > inlined from 'rte_ring_enqueue' at ../lib/ring/rte_ring.h:339:9, > inlined from '_cancel_producer' at > ../app/test/test_event_timer_adapter.c:834:10: > ../lib/ring/rte_ring_elem_pvt.h:100:25: error: 'memcpy' reading 32 > bytes from a region of size 8 [-Werror=3Dstringop-overread] > 100 | memcpy((void *)(ring + idx), > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 101 | (const void *)(obj + i), 32); > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../app/test/test_event_timer_adapter.c: In function '_cancel_producer': > ../app/test/test_event_timer_adapter.c:805:1: note: source object > 'obj' of size 8 > 805 | _cancel_producer(uint64_t timeout_tcks, uint64_t timers) > | ^~~~~~~~~~~~~~~~ > In function '__rte_ring_dequeue_elems_128', > inlined from '__rte_ring_dequeue_elems' at > ../lib/ring/rte_ring_elem_pvt.h:262:3, > inlined from '__rte_ring_do_dequeue_elem' at > ../lib/ring/rte_ring_elem_pvt.h:375:2, > inlined from 'rte_ring_mc_dequeue_bulk_elem' at > ../lib/ring/rte_ring_elem.h:320:9, > inlined from 'rte_ring_dequeue_bulk_elem' at > ../lib/ring/rte_ring_elem.h:381:10, > inlined from 'rte_ring_dequeue_elem' at ../lib/ring/rte_ring_elem.h:4= 75:9, > inlined from 'rte_ring_dequeue' at ../lib/ring/rte_ring.h:477:9, > inlined from '_cancel_thread' at > ../app/test/test_event_timer_adapter.c:917:7: > ../lib/ring/rte_ring_elem_pvt.h:234:25: error: 'memcpy' writing 32 > bytes into a region of size 8 overflows the destination > [-Werror=3Dstringop-overflow=3D] > 234 | memcpy((void *)(obj + i), (void > *)(ring + idx), 32); > | > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../app/test/test_event_timer_adapter.c: In function '_cancel_thread': > ../app/test/test_event_timer_adapter.c:913:33: note: destination > object 'ev_tim' of size 8 > 913 | struct rte_event_timer *ev_tim =3D NULL; > | ^~~~~~ > In function '__rte_ring_dequeue_elems_128', > inlined from '__rte_ring_dequeue_elems' at > ../lib/ring/rte_ring_elem_pvt.h:262:3, > inlined from '__rte_ring_do_dequeue_elem' at > ../lib/ring/rte_ring_elem_pvt.h:375:2, > inlined from 'rte_ring_sc_dequeue_bulk_elem' at > ../lib/ring/rte_ring_elem.h:348:9, > inlined from 'rte_ring_dequeue_bulk_elem' at > ../lib/ring/rte_ring_elem.h:384:10, > inlined from 'rte_ring_dequeue_elem' at ../lib/ring/rte_ring_elem.h:4= 75:9, > inlined from 'rte_ring_dequeue' at ../lib/ring/rte_ring.h:477:9, > inlined from '_cancel_thread' at > ../app/test/test_event_timer_adapter.c:917:7: > ../lib/ring/rte_ring_elem_pvt.h:234:25: error: 'memcpy' writing 32 > bytes into a region of size 8 overflows the destination > [-Werror=3Dstringop-overflow=3D] > 234 | memcpy((void *)(obj + i), (void > *)(ring + idx), 32); > | > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../app/test/test_event_timer_adapter.c: In function '_cancel_thread': > ../app/test/test_event_timer_adapter.c:913:33: note: destination > object 'ev_tim' of size 8 > 913 | struct rte_event_timer *ev_tim =3D NULL; > | ^~~~~~ > In function '__rte_ring_dequeue_elems_128', > inlined from '__rte_ring_dequeue_elems' at > ../lib/ring/rte_ring_elem_pvt.h:262:3, > inlined from '__rte_ring_do_rts_dequeue_elem' at > ../lib/ring/rte_ring_rts_elem_pvt.h:252:3, > inlined from 'rte_ring_mc_rts_dequeue_bulk_elem' at > ../lib/ring/rte_ring_rts.h:110:9, > inlined from 'rte_ring_dequeue_bulk_elem' at > ../lib/ring/rte_ring_elem.h:387:10, > inlined from 'rte_ring_dequeue_elem' at ../lib/ring/rte_ring_elem.h:4= 75:9, > inlined from 'rte_ring_dequeue' at ../lib/ring/rte_ring.h:477:9, > inlined from '_cancel_thread' at > ../app/test/test_event_timer_adapter.c:917:7: > ../lib/ring/rte_ring_elem_pvt.h:234:25: error: 'memcpy' writing 32 > bytes into a region of size 8 overflows the destination > [-Werror=3Dstringop-overflow=3D] > 234 | memcpy((void *)(obj + i), (void > *)(ring + idx), 32); > | > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../app/test/test_event_timer_adapter.c: In function '_cancel_thread': > ../app/test/test_event_timer_adapter.c:913:33: note: destination > object 'ev_tim' of size 8 > 913 | struct rte_event_timer *ev_tim =3D NULL; > | ^~~~~~ > In function '__rte_ring_dequeue_elems_128', > inlined from '__rte_ring_dequeue_elems' at > ../lib/ring/rte_ring_elem_pvt.h:262:3, > inlined from '__rte_ring_do_hts_dequeue_elem' at > ../lib/ring/rte_ring_hts_elem_pvt.h:237:3, > inlined from 'rte_ring_mc_hts_dequeue_bulk_elem' at > ../lib/ring/rte_ring_hts.h:83:9, > inlined from 'rte_ring_dequeue_bulk_elem' at > ../lib/ring/rte_ring_elem.h:390:10, > inlined from 'rte_ring_dequeue_elem' at ../lib/ring/rte_ring_elem.h:4= 75:9, > inlined from 'rte_ring_dequeue' at ../lib/ring/rte_ring.h:477:9, > inlined from '_cancel_thread' at > ../app/test/test_event_timer_adapter.c:917:7: > ../lib/ring/rte_ring_elem_pvt.h:234:25: error: 'memcpy' writing 32 > bytes into a region of size 8 overflows the destination > [-Werror=3Dstringop-overflow=3D] > 234 | memcpy((void *)(obj + i), (void > *)(ring + idx), 32); > | > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../app/test/test_event_timer_adapter.c: In function '_cancel_thread': > ../app/test/test_event_timer_adapter.c:913:33: note: destination > object 'ev_tim' of size 8 > 913 | struct rte_event_timer *ev_tim =3D NULL; > | ^~~~~~ > cc1: all warnings being treated as errors > ninja: subcommands failed > > > This is gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924. > > The compiler seems unhappy about the rte_int128_t type. > The below hunk seems to (confuse?) help the compiler. > > diff --git a/lib/ring/rte_ring_elem_pvt.h b/lib/ring/rte_ring_elem_pvt.h > index 83788c56e6..ece937f8e1 100644 > --- a/lib/ring/rte_ring_elem_pvt.h > +++ b/lib/ring/rte_ring_elem_pvt.h > @@ -98,7 +98,7 @@ __rte_ring_enqueue_elems_128(struct rte_ring *r, > uint32_t prod_head, > if (likely(idx + n <=3D size)) { > for (i =3D 0; i < (n & ~0x1); i +=3D 2, idx +=3D 2) > memcpy((void *)(ring + idx), > - (const void *)(obj + i), 32); > + (const void *)((uintptr_t)obj + i), 32); > switch (n & 0x1) { > case 1: > memcpy((void *)(ring + idx), > @@ -231,7 +231,7 @@ __rte_ring_dequeue_elems_128(struct rte_ring *r, > uint32_t prod_head, > rte_int128_t *obj =3D (rte_int128_t *)obj_table; > if (likely(idx + n <=3D size)) { > for (i =3D 0; i < (n & ~0x1); i +=3D 2, idx +=3D 2) > - memcpy((void *)(obj + i), (void *)(ring + idx), 32); > + memcpy((void *)((uintptr_t)obj + i), (void *)(ring + idx), 3= 2); > switch (n & 0x1) { > case 1: > memcpy((void *)(obj + i), (void *)(ring + idx), 16); > > > RTE_PTR_ADD has the same effect. > This seems what Kevin had worked around for 21.11 release: https://inbox.dpdk.org/stable/20221220123754.239802-1-ktraynor@redhat.com/ I would tend to do the same and disable this warning for rc3 at least, and have stable branches and the main repository aligned. We can have a better fix later. Opinions? --=20 David Marchand