accel_engine: fix the vector crc32c computing for hw path.

We face the checksum error when using idxd hardware in vector mode because
we put fields of internal function in wrong union.
When use vector crc32c operation, seed and chained functions and cb's will
be used in the same time, so we should not put them in the same union.

With this patch, we can fix the crc32c computing while using
the vector mode with iov_count > 1.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I7097b47294ffd5dcac7d7a83d583321a73dc50d2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8213
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Ziye Yang 2021-06-09 23:56:34 +08:00 committed by Tomasz Zawadzki
parent e54df32e6b
commit 1e660daa8d

View File

@ -81,6 +81,10 @@ struct spdk_accel_task {
struct spdk_accel_batch *batch;
spdk_accel_completion_cb cb_fn;
void *cb_arg;
struct {
spdk_accel_completion_cb cb_fn;
void *cb_arg;
} chained;
union {
struct {
struct iovec *iovs; /* iovs passed by the caller */
@ -93,10 +97,6 @@ struct spdk_accel_task {
void *src2;
};
union {
struct {
spdk_accel_completion_cb cb_fn;
void *cb_arg;
} chained;
void *dst2;
uint32_t seed;
uint64_t fill_pattern;