app/crypto-perf: fix burst size calculation
authorTomasz Jozwiak <tomaszx.jozwiak@intel.com>
Thu, 26 Apr 2018 09:05:49 +0000 (11:05 +0200)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 10 May 2018 16:46:20 +0000 (17:46 +0100)
commit3356083a775c816cb1efa41019fa6ddbbec023c8
tree2788b7aa8e43a097f756d75fbd25c90f5759eaa4
parent0d65abfb0dc4e28336ee431c7b74247cd416f608
app/crypto-perf: fix burst size calculation

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: stable@dpdk.org
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
app/test-crypto-perf/cperf_test_pmd_cyclecount.c