aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/pfhash.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-05-19 00:04:23 +0200
committerDamjan Marion <damarion@cisco.com>2018-05-20 14:52:39 +0200
commita52e1668c9976bd5cdd20d02b668df41ea41f16f (patch)
tree75ed44c2df7a88e0e3af39ae1c4de4cc49f36ad7 /src/vppinfra/pfhash.h
parent3b854a5cb876b5af4e69c56028e2c2824100f4b2 (diff)
vector functions cleanup and improvements
Remove functions which have native C equivalent (i.e. _is_equal can be replaced with ==, _add with +) Add SSE4.2, AVX-512 implementations of splat, load_unaligned, store_unaligned, is_all_zero, is_equal, is_all_equal Change-Id: Ie80b0e482e7a76248ad79399c2576468532354cd Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/pfhash.h')
-rw-r--r--src/vppinfra/pfhash.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vppinfra/pfhash.h b/src/vppinfra/pfhash.h
index e054c668f3b..2884fa81cf9 100644
--- a/src/vppinfra/pfhash.h
+++ b/src/vppinfra/pfhash.h
@@ -249,8 +249,8 @@ pfhash_search_kv_4 (pfhash_t * p, u32 bucket_contents, u32 * key)
vector_key = u32x4_splat (key[0]);
- is_equal[0] = u32x4_is_equal (kv->kb.k_u32x4[0], vector_key);
- is_equal[1] = u32x4_is_equal (kv->kb.k_u32x4[1], vector_key);
+ is_equal[0] = (kv->kb.k_u32x4[0] == vector_key);
+ is_equal[1] = (kv->kb.k_u32x4[1] == vector_key);
zbm[0] = ~u32x4_zero_byte_mask (is_equal[0]) & 0xFFFF;
zbm[1] = ~u32x4_zero_byte_mask (is_equal[1]) & 0xFFFF;