Commit d2bbef66 authored by James Bergsten's avatar James Bergsten Committed by Jim Harris
Browse files

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: default avatarJames Bergsten <jamesx.bergsten@intel.com>
Change-Id: Idc7f1d97252644d839621ffe9fa995edd922da52
Signed-off-by: default avatarJames Bergsten <jamesx.bergsten@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/443646


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 71b08028
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -415,7 +415,7 @@ than or equal to 4.14 will see significantly reduced performance.
fi

if [[ "${CONFIG[ISAL]}" = "y" ]] || [[ "${CONFIG[CRYPTO]}" = "y" ]]; then
        if [[ $(nasm -v | sed 's/[^0-9]*//g' | awk '{print substr ($0, 0, 5)}') -lt "21202" ]]; then
        if [[ $(nasm -v | awk '{print $3}' | sed 's/[^0-9]*//g') -lt "21202" ]]; then
		echo "Notice: ISA-L, compression & crypto auto-disabled due to nasm dependency."
		echo "These features require NASM version 2.12.02 or newer.  Please install"
		echo "or upgrade then re-run this script."
+619 −28

File changed.

Preview size limit exceeded, changes collapsed.