Spdk/module/accel/dpdk_cryptodev
Alexey Marchuk 8f4d98bb40 accel/dpdk_cryptodev: Fix sgl init with offset
When accel task is processed is processed in
several iterations (submit part of cryops, wait
for completion and submit next part of cryops),
sgl is initialized with offset to exclude previously
processed blocks. However there is a bug since
spdk_iov_sgl_init doesn't advance iovs, as result
when we do sgl->iov->iov_len - sgl->iov_offset,
we may get unsigned int underflow.
Fix is init sgl with 0 offset and then advance it
with offset.
Modified unit test and added an assert in code to
verify this fix.

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: Ib53ff30f0c90d521f2cf6b3ec847b0d06869c2b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17456
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-04-06 23:30:49 +00:00
..
accel_dpdk_cryptodev_rpc.c module/accel: Add accel_dpdk_cryptodev 2023-01-11 09:16:59 +00:00
accel_dpdk_cryptodev.c accel/dpdk_cryptodev: Fix sgl init with offset 2023-04-06 23:30:49 +00:00
accel_dpdk_cryptodev.h module/accel: Add accel_dpdk_cryptodev 2023-01-11 09:16:59 +00:00
Makefile so_ver: increase all major versions 2023-01-24 08:37:21 +00:00