Commit 1e660daa authored by Ziye Yang's avatar Ziye Yang Committed by Tomasz Zawadzki
Browse files

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: default avatarZiye 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: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent e54df32e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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;