patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Amit Prakash Shukla <amitprakashs@marvell.com>
Cc: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
	<dev@dpdk.org>, <jerinj@marvell.com>, <stable@dpdk.org>
Subject: Re: [PATCH] ring: compilation fix with GCC-12
Date: Fri, 5 Aug 2022 08:37:23 -0700	[thread overview]
Message-ID: <20220805083723.6554c3fd@hermes.local> (raw)
In-Reply-To: <20220805090348.1947658-1-amitprakashs@marvell.com>

On Fri, 5 Aug 2022 14:33:48 +0530
Amit Prakash Shukla <amitprakashs@marvell.com> wrote:

> GCC 12 raises the following warning:
> 
> 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:391:10,
>     inlined from 'rte_ring_dequeue_elem' at
> 		../lib/ring/rte_ring_elem.h:476:9,
>     inlined from 'rte_ring_dequeue' at
> 		../lib/ring/rte_ring.h:463:9,
>     inlined from 'rxa_intr_ring_dequeue' at
> 		../lib/eventdev/rte_event_eth_rx_adapter.c:1196:10:
> ../lib/ring/rte_ring_elem_pvt.h:234:25: error: 'memcpy' writing
> 	32 bytes into a region of size 8 overflows the destination
> 	[-Werror=stringop-overflow=]
>   234 |    memcpy((void *)(obj + i), (void *)(ring + idx), 32);
>       |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Replacing memcpy with rte_memcpy fixes the GCC-12 compilation issue.
> Also it would be better to change to rte_memcpy as the function is
> called in fastpath.
> 
> Bugzilla ID: 1062
> Fixes: 1fc73390bcf5 ("ring: refactor exported headers")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>

This seems to be just using a different routine and in effect
wallpapering over a possibly valid warning.

  reply	other threads:[~2022-08-05 15:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05  9:03 Amit Prakash Shukla
2022-08-05 15:37 ` Stephen Hemminger [this message]
2022-08-06 18:35 ` Honnappa Nagarahalli
2022-08-07 12:26   ` Konstantin Ananyev
2022-08-23  9:38     ` [EXT] " Amit Prakash Shukla
2022-08-23  9:41       ` Amit Prakash Shukla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220805083723.6554c3fd@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=amitprakashs@marvell.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=jerinj@marvell.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).