From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: "Piasecki, JacekX" <jacekx.piasecki@intel.com>,
"Doherty, Declan" <declan.doherty@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"Piasecki, JacekX" <jacekx.piasecki@intel.com>
Subject: Re: [dpdk-dev] [PATCH] app/test-crypto-perf: fix incorrect size of expression
Date: Thu, 9 Feb 2017 23:53:14 +0000 [thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D897476D7D80@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <1486569881-16220-2-git-send-email-jacekx.piasecki@intel.com>
Hi Jacek,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jacek Piasecki
> Sent: Wednesday, February 08, 2017 4:05 PM
> To: Doherty, Declan
> Cc: dev@dpdk.org; Piasecki, JacekX
> Subject: [dpdk-dev] [PATCH] app/test-crypto-perf: fix incorrect size of
> expression
>
> Fix problem of passing a pointer to sizeof() function. Now the size
> of enabled_cdevs structure is passed by RTE_CRYPTO_MAX_DEVS.
>
> Coverity issue: 141068
> Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test
> application")
>
> Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
> ---
> app/test-crypto-perf/main.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
> index 634ea5f..dff906e 100644
> --- a/app/test-crypto-perf/main.c
> +++ b/app/test-crypto-perf/main.c
> @@ -39,13 +39,14 @@
> };
>
> static int
> -cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t
> *enabled_cdevs)
> +cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t
> *enabled_cdevs,
> + uint8_t enabled_cdevs_dim)
I think this extra parameter in the function is unnecessary,
as it is always RTE_CRYPTO_MAX_DEVS.
Better to pass RTE_CRYPTO_MAX_DEVS to rte_cryptodev_devices_get() directly.
> {
> uint8_t cdev_id, enabled_cdev_count = 0, nb_lcores;
> int ret;
>
> enabled_cdev_count = rte_cryptodev_devices_get(opts-
> >device_type,
> - enabled_cdevs, RTE_DIM(enabled_cdevs));
> + enabled_cdevs, enabled_cdevs_dim);
Thanks,
Pablo
next prev parent reply other threads:[~2017-02-09 23:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-08 16:04 [dpdk-dev] [PATCH] app/test-crypto-perf: fix big paremeter passed by value Jacek Piasecki
2017-02-08 16:04 ` [dpdk-dev] [PATCH] app/test-crypto-perf: fix incorrect size of expression Jacek Piasecki
2017-02-09 23:53 ` De Lara Guarch, Pablo [this message]
2017-02-10 13:26 ` [dpdk-dev] [PATCH v2] " Jacek Piasecki
2017-02-10 11:28 ` De Lara Guarch, Pablo
2017-02-10 11:48 ` De Lara Guarch, Pablo
2017-02-09 23:41 ` [dpdk-dev] [PATCH] app/test-crypto-perf: fix big paremeter passed by value De Lara Guarch, Pablo
2017-02-09 23:48 ` De Lara Guarch, Pablo
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=E115CCD9D858EF4F90C690B0DCB4D897476D7D80@IRSMSX108.ger.corp.intel.com \
--to=pablo.de.lara.guarch@intel.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=jacekx.piasecki@intel.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).