cryptodev: fix multi-segment raw vector processing
authorGagandeep Singh <g.singh@nxp.com>
Wed, 13 Oct 2021 19:00:21 +0000 (00:30 +0530)
committerAkhil Goyal <gakhil@marvell.com>
Sun, 17 Oct 2021 17:32:13 +0000 (19:32 +0200)
commit8edcb68fd01b6a1e47549be389335cfef042ea05
treebd4c5352f158d0801c3359b03208331d2b3dcc20
parent68f5d3d320eff27dd4c3cc2f5ec2ffe85c8bb190
cryptodev: fix multi-segment raw vector processing

If no next segment available the “for” loop will fail and it still
returns i+1 i.e. 2, which is wrong as it has filled only 1 buffer.

Fixes: 7adf992fb9bf ("cryptodev: introduce CPU crypto API")
Cc: stable@dpdk.org
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
lib/cryptodev/rte_crypto_sym.h