Skip to content

Commit 94ca18c

Browse files
committed
zfs: fix build issues from 53a2e26
Add aesni-gcm-avx2-vaes.S to libicp, libicp_rescue and module build This was somehow not catched by my make universe
1 parent 8d23b31 commit 94ca18c

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

cddl/lib/libicp/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ASM_SOURCES_AS = \
1111
asm-x86_64/aes/aes_aesni.S \
1212
asm-x86_64/modes/gcm_pclmulqdq.S \
1313
asm-x86_64/modes/aesni-gcm-x86_64.S \
14+
asm-x86_64/modes/aesni-gcm-avx2-vaes.S \
1415
asm-x86_64/modes/ghash-x86_64.S \
1516
asm-x86_64/sha2/sha256-x86_64.S \
1617
asm-x86_64/sha2/sha512-x86_64.S \
@@ -112,6 +113,7 @@ CFLAGS.aes_amd64.S+= -DLOCORE
112113
CFLAGS.aes_aesni.S+= -DLOCORE
113114
CFLAGS.gcm_pclmulqdq.S+= -DLOCORE
114115
CFLAGS.aesni-gcm-x86_64.S+= -DLOCORE
116+
CFLAGS.aesni-gcm-avx2-vaes.S+= -DLOCORE
115117
CFLAGS.ghash-x86_64.S+= -DLOCORE
116118
CFLAGS.sha256-x86_64.S+= -DLOCORE
117119
CFLAGS.sha512-x86_64.S+= -DLOCORE

cddl/lib/libicp_rescue/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ASM_SOURCES_AS = \
1111
asm-x86_64/aes/aes_aesni.S \
1212
asm-x86_64/modes/gcm_pclmulqdq.S \
1313
asm-x86_64/modes/aesni-gcm-x86_64.S \
14+
asm-x86_64/modes/aesni-gcm-avx2-vaes.S \
1415
asm-x86_64/sha2/sha256-x86_64.S \
1516
asm-x86_64/sha2/sha512-x86_64.S \
1617
asm-x86_64/blake3/blake3_avx2.S \
@@ -109,6 +110,7 @@ CFLAGS.aes_amd64.S+= -DLOCORE
109110
CFLAGS.aes_aesni.S+= -DLOCORE
110111
CFLAGS.gcm_pclmulqdq.S+= -DLOCORE
111112
CFLAGS.aesni-gcm-x86_64.S+= -DLOCORE
113+
CFLAGS.aesni-gcm-avx2-vaes.S+= -DLOCORE
112114
CFLAGS.ghash-x86_64.S+= -DLOCORE
113115
CFLAGS.sha256-x86_64.S+= -DLOCORE
114116
CFLAGS.sha512-x86_64.S+= -DLOCORE

sys/conf/files.amd64

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,9 @@ contrib/openzfs/module/icp/asm-x86_64/blake3/blake3_avx512.S optional zfs com
419419
contrib/openzfs/module/icp/asm-x86_64/blake3/blake3_sse2.S optional zfs compile-with "${ZFS_S}"
420420
contrib/openzfs/module/icp/asm-x86_64/blake3/blake3_sse41.S optional zfs compile-with "${ZFS_S}"
421421

422+
# zfs AVX2 implementation of aes-gcm from BoringSSL
423+
contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S optional zfs compile-with "${ZFS_S}"
424+
422425
# zfs sha2 hash support
423426
zfs-sha256-x86_64.o optional zfs \
424427
dependency "$S/contrib/openzfs/module/icp/asm-x86_64/sha2/sha256-x86_64.S" \

sys/modules/zfs/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ KMOD= zfs
1515
${SRCDIR}/icp/asm-ppc64/sha2 \
1616
${SRCDIR}/icp/asm-ppc64/blake3 \
1717
${SRCDIR}/icp/asm-x86_64/blake3 \
18+
${SRCDIR}/icp/asm-x86_64/modes \
1819
${SRCDIR}/icp/asm-x86_64/sha2 \
1920
${SRCDIR}/os/freebsd/spl \
2021
${SRCDIR}/os/freebsd/zfs \
@@ -41,7 +42,7 @@ CFLAGS+= -D__KERNEL__ -DFREEBSD_NAMECACHE -DBUILDING_ZFS \
4142
.if ${MACHINE_ARCH} == "amd64"
4243
CFLAGS+= -D__x86_64 -DHAVE_SSE2 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 \
4344
-DHAVE_AVX -DHAVE_AVX2 -DHAVE_AVX512F -DHAVE_AVX512VL -DHAVE_AVX512BW \
44-
-DHAVE_VAES HAVE_VPCLMULQDQ
45+
-DHAVE_VAES -DHAVE_VPCLMULQDQ
4546
.endif
4647

4748
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \
@@ -83,6 +84,9 @@ SRCS+= blake3_avx2.S \
8384
blake3_avx512.S \
8485
blake3_sse2.S \
8586
blake3_sse41.S
87+
88+
#icp/asm-x86_64/modes
89+
SRCS+= aesni-gcm-avx2-vaes.S
8690
.endif
8791

8892
#icp/algs/sha2

0 commit comments

Comments
 (0)