Hi Thomas, > -----Original Message----- > From: Thomas Monjalon <[email protected]> > Sent: Friday, January 13, 2023 3:12 AM > To: Konstantin Ananyev <[email protected]>; Honnappa > Nagarahalli <[email protected]>; Amit Prakash Shukla > <[email protected]> > Cc: [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; > [email protected]; [email protected]; > [email protected] > Subject: Re: [EXT] Re: [PATCH] ring: compilation fix with GCC-12 > > 23/08/2022 11:38, Amit Prakash Shukla: > > From: Konstantin Ananyev <[email protected]> > > > 06/08/2022 19:35, Honnappa Nagarahalli пишет: > > > >> Replacing memcpy with rte_memcpy fixes the GCC-12 compilation > issue. > > > > > > > > Any reason why this replacement fixes the problem? > > > > Do you have any performance numbers with this change? > > > > > > > >> Also it would be better to change to rte_memcpy as the function > > > >> is called in fastpath. > > > > > > > > On Arm platforms, memcpy in the later versions has the best > performance. > > > > > > I agree with Honnappa, it is better to keep memcpy() here. > > > Actually what is strange - why it ends up in > > > __rte_ring_dequeue_elems_128() at all? > > > Inside rxa_intr_ring_dequeue() we clearly doing: rte_ring_dequeue(), > > > which should boil down to ___rte_ring_dequeue_elems_64(). > > > it should go to __rte_ring_dequeue_elems_128() at all. > > > > I agree. After having close look and doing few experiments, ideally it > > should not be going to __rte_ring_dequeue_elems_128(). > > Sizeof(in call of rte_ring_enqueue_elem) gets evaluated at compile > > time which in this case it is evaluated to 8 bytes so > > __rte_ring_dequeue_elems_128() shall not be in the path. Looks like more > of a gcc-12 bug.? > > > > > Another q - is this warning happens only on arm platforms? > > > > Warning is observed on x86 with build type as debug. > > "meson --werror --buildtype=debug build" > > I confirm the compilation issue on x86 with GCC 12 in a debug build. > > We need to find a workaround. > Is it reported to GCC already? > I found an old gcc bug reporting similar issue. This bug seems to be re-opened recently in Dec-2022. Not sure if it is reopened specifically for gcc-12. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89689
Kevin has push a work around for DPDK-21.11.3. https://git.dpdk.org/dpdk-stable/commit/?h=21.11&id=e1d728588dc73af9ed60cc0074d51a7f24b2ba60

