>diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c >new file mode 100644 >index 0000000..50e3acd >--- /dev/null >+++ b/lib/librte_hash/rte_cuckoo_hash.c >@@ -0,0 +1,1027 @@ ... >+ >+/* Functions to compare multiple of 16 byte keys (up to 128 bytes) */ >+static int >+rte_hash_k16_cmp_eq(const void *key1, const void *key2, size_t key_len >__rte_unused) >+{ >+ const __m128i k1 = _mm_loadu_si128((const __m128i *) key1); >+ const __m128i k2 = _mm_loadu_si128((const __m128i *) key2); >+ const __m128i x = _mm_xor_si128(k1, k2); >+ >+ return !_mm_test_all_zeros(x, x); >+} ...
When compiling the latest dev DPDK for non-x86 arch, it fails on the above code, as the SSE is x86 specific defined in <emmintrin.h>. Is it possible to replace this function with platform independent code? Thanks -Zhigang Lu