DPDK patches and discussions
 help / color / mirror / Atom feed
From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
To: Conor Walsh <conor.walsh@intel.com>,
	"konstantin.ananyev@intel.com" <konstantin.ananyev@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"linglix.chen@intel.com" <linglix.chen@intel.com>,
	nd <nd@arm.com>,
	Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
	nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH v1] app/test: zcd needs to be initialised to fix gcc compile error
Date: Wed, 4 Nov 2020 18:48:10 +0000
Message-ID: <DBAPR08MB58146E8EF632B47AEA29065698EF0@DBAPR08MB5814.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20201104170306.1688771-1-conor.walsh@intel.com>

Hi Conor,
	Thanks for the patch.

<snip>

> 
> When DPDK is compiled with gcc < 9 with the optimization level set to 1 gcc
> sees zcd in test_ring.h as possibly being uninitialised. To correct this error zcd
> has been initialised to {0} in test_ring_mt_peek_stress_zc.c.
> 
> Signed-off-by: Conor Walsh <conor.walsh@intel.com>
> ---
>  app/test/test_ring_mt_peek_stress_zc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test/test_ring_mt_peek_stress_zc.c
> b/app/test/test_ring_mt_peek_stress_zc.c
> index 7e0bd511a7..ba0acf237c 100644
> --- a/app/test/test_ring_mt_peek_stress_zc.c
> +++ b/app/test/test_ring_mt_peek_stress_zc.c
> @@ -11,7 +11,7 @@ _st_ring_dequeue_bulk(struct rte_ring *r, void **obj,
> uint32_t n,
>  	uint32_t *avail)
>  {
>  	uint32_t m;
> -	struct rte_ring_zc_data zcd;
> +	struct rte_ring_zc_data zcd = {0};
I faced similar problems when I created this test case. I refrained from doing this initialization as it might mask the problems in the library. Is it possible to identify which path in the library is actually resulting in this error? I would prefer to fix that instead.

> 
>  	m = rte_ring_dequeue_zc_bulk_start(r, n, &zcd, avail);
>  	n = (m == n) ? n : 0;
> @@ -29,7 +29,7 @@ _st_ring_enqueue_bulk(struct rte_ring *r, void * const
> *obj, uint32_t n,
>  	uint32_t *free)
>  {
>  	uint32_t m;
> -	struct rte_ring_zc_data zcd;
> +	struct rte_ring_zc_data zcd = {0};
> 
>  	m = rte_ring_enqueue_zc_bulk_start(r, n, &zcd, free);
>  	n = (m == n) ? n : 0;
> --
> 2.25.1


  reply	other threads:[~2020-11-04 18:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04 17:03 Conor Walsh
2020-11-04 18:48 ` Honnappa Nagarahalli [this message]
2020-11-09 16:20   ` Walsh, Conor
2020-11-09 16:44     ` Honnappa Nagarahalli
2020-11-09 17:03       ` Walsh, Conor
2020-11-09 17:24         ` Honnappa Nagarahalli
2020-11-09 17:37           ` Walsh, Conor
2020-11-09 22:43             ` Honnappa Nagarahalli
2020-11-10 10:04               ` Walsh, Conor
2020-11-10 11:03 ` [dpdk-dev] [PATCH v2] app/test: fix to prevent zcd " Conor Walsh
2020-11-10 14:57   ` Honnappa Nagarahalli
2020-11-11 16:18   ` Honnappa Nagarahalli
2020-11-15 15:56     ` David Marchand

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=DBAPR08MB58146E8EF632B47AEA29065698EF0@DBAPR08MB5814.eurprd08.prod.outlook.com \
    --to=honnappa.nagarahalli@arm.com \
    --cc=conor.walsh@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=linglix.chen@intel.com \
    --cc=nd@arm.com \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git