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 v2] app/test: fix to prevent zcd gcc compile error
Date: Wed, 11 Nov 2020 16:18:23 +0000 [thread overview]
Message-ID: <DBAPR08MB581443DB0F2FDDA7DB48001298E80@DBAPR08MB5814.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20201110110313.1924365-1-conor.walsh@intel.com>
> -----Original Message-----
> From: Conor Walsh <conor.walsh@intel.com>
> Sent: Tuesday, November 10, 2020 5:03 AM
> To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>;
> konstantin.ananyev@intel.com
> Cc: dev@dpdk.org; linglix.chen@intel.com; Conor Walsh
> <conor.walsh@intel.com>
> Subject: [PATCH v2] app/test: fix to prevent zcd gcc compile error
>
> 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 if
> statements from _st_ring_dequeue_bulk and _st_ring_enqueue_bulk were
> corrected within test_ring_mt_peek_stress_zc.c
>
> Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
>
> ---
>
> v2: Moved from initialising zcd to changing if statements within
> test_ring_mt_peek_stress_zc.c following list feedback as the
> original method used may have masked errors within the library.
> ---
> app/test/test_ring_mt_peek_stress_zc.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 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..85f0262ba0 100644
> --- a/app/test/test_ring_mt_peek_stress_zc.c
> +++ b/app/test/test_ring_mt_peek_stress_zc.c
> @@ -14,8 +14,7 @@ _st_ring_dequeue_bulk(struct rte_ring *r, void **obj,
> uint32_t n,
> struct rte_ring_zc_data zcd;
>
> m = rte_ring_dequeue_zc_bulk_start(r, n, &zcd, avail);
> - n = (m == n) ? n : 0;
> - if (n != 0) {
> + if (m != 0) {
> /* Copy the data from the ring */
> test_ring_copy_from(&zcd, obj, -1, n);
> rte_ring_dequeue_zc_finish(r, n);
> @@ -32,8 +31,7 @@ _st_ring_enqueue_bulk(struct rte_ring *r, void * const
> *obj, uint32_t n,
> struct rte_ring_zc_data zcd;
>
> m = rte_ring_enqueue_zc_bulk_start(r, n, &zcd, free);
> - n = (m == n) ? n : 0;
> - if (n != 0) {
> + if (m != 0) {
> /* Copy the data from the ring */
> test_ring_copy_to(&zcd, obj, -1, n);
> rte_ring_enqueue_zc_finish(r, n);
> --
> 2.25.1
next prev parent reply other threads:[~2020-11-11 16:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-04 17:03 [dpdk-dev] [PATCH v1] app/test: zcd needs to be initialised to fix " Conor Walsh
2020-11-04 18:48 ` Honnappa Nagarahalli
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 [this message]
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=DBAPR08MB581443DB0F2FDDA7DB48001298E80@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
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).