summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJerin Jacob <jerin.jacob@caviumnetworks.com>2015-11-24 00:15:36 +0530
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-11-25 22:13:15 +0100
commitda8dcc27f644bf5d895adb4a1d7a5aa38c12a10f (patch)
treefc8a06d4e3fabd126175f8ed3ee09702ff28015c /app
parentf123e3d2ca920ded04aa4346756b937ab88ff699 (diff)
downloaddpdk-da8dcc27f644bf5d895adb4a1d7a5aa38c12a10f.zip
dpdk-da8dcc27f644bf5d895adb4a1d7a5aa38c12a10f.tar.gz
dpdk-da8dcc27f644bf5d895adb4a1d7a5aa38c12a10f.tar.xz
hash: use armv8-a CRC32 instructions
armv8-a has optional CRC32 extension, march=armv8-a+crc enables code generation for the ARMv8-A architecture together with the optional CRC32 extensions. added RTE_MACHINE_CPUFLAG_CRC32 to detect the availability of CRC32 extension in compile time. At run-time, The RTE_CPUFLAG_CRC32 can be used to find the availability. armv8-a+crc target support added in GCC 4.9, Used inline assembly and emulated __ARM_FEATURE_CRC32 to work with tool-chain < 4.9 Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Diffstat (limited to 'app')
-rw-r--r--app/test/test_hash.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index 4f2509d..2f3d884 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -217,6 +217,13 @@ test_crc32_hash_alg_equiv(void)
printf("Failed checking CRC32_SW against CRC32_SSE42_x64\n");
break;
}
+
+ /* Check against 8-byte-operand ARM64 CRC32 if available */
+ rte_hash_crc_set_alg(CRC32_ARM64);
+ if (hash_val != rte_hash_crc(data64, data_len, init_val)) {
+ printf("Failed checking CRC32_SW against CRC32_ARM64\n");
+ break;
+ }
}
/* Resetting to best available algorithm */