accel_engine: Use the vector based crc32c function.
Purpose: Use the new function in order to reduce duplicated code. Change-Id: Ie848c7586575b3f0bb617d7e767cf459b43d4783 Signed-off-by: Ziye Yang <ziye.yang@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8174 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
c2feee4fef
commit
26004a40fb
@ -968,15 +968,7 @@ _sw_accel_crc32c(uint32_t *dst, void *src, uint32_t seed, uint64_t nbytes)
|
||||
static void
|
||||
_sw_accel_crc32cv(uint32_t *dst, struct iovec *iov, uint32_t iovcnt, uint32_t seed)
|
||||
{
|
||||
uint32_t i, crc32c = ~seed;
|
||||
|
||||
for (i = 0; i < iovcnt; i++) {
|
||||
assert(iov[i].iov_base != NULL);
|
||||
assert(iov[i].iov_len != 0);
|
||||
crc32c = spdk_crc32c_update(iov[i].iov_base, iov[i].iov_len, crc32c);
|
||||
}
|
||||
|
||||
*dst = crc32c;
|
||||
*dst = spdk_crc32c_iov_update(iov, iovcnt, ~seed);
|
||||
}
|
||||
|
||||
static struct spdk_io_channel *sw_accel_get_io_channel(void);
|
||||
|
Loading…
Reference in New Issue
Block a user