All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] app/crypto-perf: fix pmd_cyclecount_bench_ops
@ 2018-04-26  9:05 Tomasz Jozwiak
  2018-05-09 10:10 ` [dpdk-stable] " De Lara Guarch, Pablo
  0 siblings, 1 reply; 3+ messages in thread
From: Tomasz Jozwiak @ 2018-04-26  9:05 UTC (permalink / raw)
  To: dev; +Cc: stable, anatoly.burakov, tomaszx.jozwiak

this patch fixes segmentation fault in pmd_cyclecount_bench_ops
function in case when state->opts->nb_descriptors is not
natural multiple of burst size.
To reproduce run: dpdk-test-crypto-perf with params:
  --ptest pmd-cyclecount --pmd-cyclecount-delay-ms 5
  --devtype crypto_qat --optype cipher-then-auth
  --cipher-algo aes-cbc --cipher-op encrypt
  --cipher-key-sz 16 --cipher-iv-sz 16
  --auth-algo sha2-256-hmac
  --auth-op generate --auth-key-sz 64 --digest-sz 32
  --total-ops 10000 --burst-sz 255 --buffer-sz 1024 --silent

Fixes: 96dfeb609be1 ("app/crypto-perf: add new PMD benchmarking mode")
Cc: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: stable@dpdk.org

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
---
 app/test-crypto-perf/cperf_test_pmd_cyclecount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
index 8f76160..c8d16db 100644
--- a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
+++ b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
@@ -145,7 +145,7 @@ pmd_cyclecount_bench_ops(struct pmd_cyclecount_state *state, uint32_t cur_op,
 
 	for (cur_iter_op = 0; cur_iter_op < iter_ops_needed;
 			cur_iter_op += test_burst_size) {
-		uint32_t burst_size = RTE_MIN(state->opts->total_ops - cur_op,
+		uint32_t burst_size = RTE_MIN(iter_ops_needed - cur_iter_op,
 				test_burst_size);
 		struct rte_crypto_op **ops = &state->ctx->ops[cur_iter_op];
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] app/crypto-perf: fix pmd_cyclecount_bench_ops
  2018-04-26  9:05 [PATCH] app/crypto-perf: fix pmd_cyclecount_bench_ops Tomasz Jozwiak
@ 2018-05-09 10:10 ` De Lara Guarch, Pablo
  2018-05-09 10:18   ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 3+ messages in thread
From: De Lara Guarch, Pablo @ 2018-05-09 10:10 UTC (permalink / raw)
  To: Jozwiak, TomaszX, dev; +Cc: stable, Burakov, Anatoly, Jozwiak, TomaszX



> -----Original Message-----
> From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of Tomasz Jozwiak
> Sent: Thursday, April 26, 2018 10:06 AM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Burakov, Anatoly <anatoly.burakov@intel.com>; Jozwiak,
> TomaszX <tomaszx.jozwiak@intel.com>
> Subject: [dpdk-stable] [PATCH] app/crypto-perf: fix pmd_cyclecount_bench_ops
> 
> this patch fixes segmentation fault in pmd_cyclecount_bench_ops function in
> case when state->opts->nb_descriptors is not natural multiple of burst size.
> To reproduce run: dpdk-test-crypto-perf with params:
>   --ptest pmd-cyclecount --pmd-cyclecount-delay-ms 5
>   --devtype crypto_qat --optype cipher-then-auth
>   --cipher-algo aes-cbc --cipher-op encrypt
>   --cipher-key-sz 16 --cipher-iv-sz 16
>   --auth-algo sha2-256-hmac
>   --auth-op generate --auth-key-sz 64 --digest-sz 32
>   --total-ops 10000 --burst-sz 255 --buffer-sz 1024 --silent
> 
> Fixes: 96dfeb609be1 ("app/crypto-perf: add new PMD benchmarking mode")
> Cc: Anatoly Burakov <anatoly.burakov@intel.com>
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] app/crypto-perf: fix pmd_cyclecount_bench_ops
  2018-05-09 10:10 ` [dpdk-stable] " De Lara Guarch, Pablo
@ 2018-05-09 10:18   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 3+ messages in thread
From: De Lara Guarch, Pablo @ 2018-05-09 10:18 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, Jozwiak, TomaszX, dev
  Cc: stable, Burakov, Anatoly, Jozwiak, TomaszX



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch, Pablo
> Sent: Wednesday, May 9, 2018 11:10 AM
> To: Jozwiak, TomaszX <tomaszx.jozwiak@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org; Burakov, Anatoly <anatoly.burakov@intel.com>; Jozwiak,
> TomaszX <tomaszx.jozwiak@intel.com>
> Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] app/crypto-perf: fix
> pmd_cyclecount_bench_ops
> 
> 
> 
> > -----Original Message-----
> > From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of Tomasz
> > Jozwiak
> > Sent: Thursday, April 26, 2018 10:06 AM
> > To: dev@dpdk.org
> > Cc: stable@dpdk.org; Burakov, Anatoly <anatoly.burakov@intel.com>;
> > Jozwiak, TomaszX <tomaszx.jozwiak@intel.com>
> > Subject: [dpdk-stable] [PATCH] app/crypto-perf: fix
> > pmd_cyclecount_bench_ops
> >
> > this patch fixes segmentation fault in pmd_cyclecount_bench_ops
> > function in case when state->opts->nb_descriptors is not natural multiple of
> burst size.
> > To reproduce run: dpdk-test-crypto-perf with params:
> >   --ptest pmd-cyclecount --pmd-cyclecount-delay-ms 5
> >   --devtype crypto_qat --optype cipher-then-auth
> >   --cipher-algo aes-cbc --cipher-op encrypt
> >   --cipher-key-sz 16 --cipher-iv-sz 16
> >   --auth-algo sha2-256-hmac
> >   --auth-op generate --auth-key-sz 64 --digest-sz 32
> >   --total-ops 10000 --burst-sz 255 --buffer-sz 1024 --silent
> >
> > Fixes: 96dfeb609be1 ("app/crypto-perf: add new PMD benchmarking mode")
> > Cc: Anatoly Burakov <anatoly.burakov@intel.com>
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
> 
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied to dpdk-next-crypto.
Thanks,

Pablo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-09 10:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-26  9:05 [PATCH] app/crypto-perf: fix pmd_cyclecount_bench_ops Tomasz Jozwiak
2018-05-09 10:10 ` [dpdk-stable] " De Lara Guarch, Pablo
2018-05-09 10:18   ` De Lara Guarch, Pablo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.