Commit Graph

6 Commits

Author SHA1 Message Date
Seth Howell
b869b4b96b lib/util: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0648f245166a0e7b427ede54547a186bee9adf41
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2303
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-14 10:37:14 +00:00
Jim Harris
87851b6f3a util: fix crc16 build
This was a result of a merge conflict with the recent 1fc4165 merge
which modified the ISA-L includes.  We now need to use isa-l/include/x.h
format when including ISA-L files.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifa38db396152d2aa4279a0dade7d47a5b9a2ba60

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447493
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-11 01:41:35 +00:00
James Bergsten
d2bbef66dc lib/util: Add ISA-L and faster table-based options for T10 CRC-16 generation
This patch extends existing ISA-L support for NVMe/SCSI T10 CRC-16
protection check (PI). The choice of which algorithm to use is set
via an existing configure parameter.  The default for x86 systems with
appropriate CPU instructions is to us ISA-L.

Testing shows that PI checking/generation will run at device speed using
ISA-L.  The table-based algorithm is much faster than the original algorithm
and is provided to speed up calculations on non-x86 systems.

This patch also fixes one issue in a false configure error if nasm
is at a higher version than currently checked (i.e. 2.13.03)

Local performance testing yeilds these results:

Original -    15 mbit/sec. (code removed)
Table    -   400 mbit/sec. (27 times faster than original)
ISA-L    - 3,400 mbit/sec. (227 times faster than original)

Signed-off-by: James Bergsten <jamesx.bergsten@intel.com>
Change-Id: Idc7f1d97252644d839621ffe9fa995edd922da52
Signed-off-by: James Bergsten <jamesx.bergsten@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/443646
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-03-08 15:39:32 +00:00
Shuhei Matsumoto
3947bc2492 util/crc16: Add spdk_crc16_t10dif_copy to use in read strip and write insert
For DIF and DIX, read strip and write insert operation will copy
data together with DIF generation and verification.

This patch adds spdk_crc16_t10dif_copy for those cases.

Change-Id: I9a77fa8b367486fe0b6704d58dcdf95d5210c875
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/437461
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-12-20 17:52:29 +00:00
Shuhei Matsumoto
e303567bc1 util/crc16: Add init_crc parameter as seed value to spdk_crc16_t10dif
Add init_crc parameter as seed value to spdk_crc16_t10dif API to generate
a CRC value spanning multiple separate buffers.

This will be necessary for upcoming DIF/DIX patches.

Having init_crc parameter is general, and so change the existing API
without adding seed version of the existing API.

Change-Id: I0ac7919b18013967e41829dcedd3e4e73204d5d6
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/437204
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-12-18 17:28:56 +00:00
Changpeng Liu
9ca670ac8a util/crc16: add crc16 library support and unit tests
Change-Id: I7174f1799361b8337ff5590b90ad6a0564ca8e9b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/391899
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-20 15:12:26 -05:00