Loading
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> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17456 (master) (cherry picked from commit 8f4d98bb) Change-Id: Ib53ff30f0c90d521f2cf6b3ec847b0d06869c2b5 Signed-off-by:
Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17523 Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com>