net: speedup ethernet address comparison with bitops
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 5 Jul 2019 17:16:19 +0000 (10:16 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 8 Jul 2019 19:26:52 +0000 (21:26 +0200)
commit7750b036d8196bfdc4f117a84ac4822e8fb03a5b
tree976ab52bb59fd6714e297d3a403beb35c2205b46
parent22d2103dfec9a5d463c8c127fcd1c9cba569dd99
net: speedup ethernet address comparison with bitops

Using bit operations like or and xor is faster than a loop
on all architectures. Really just explicit unrolling.

Similar cast to uint16 unaligned is already done in
other functions here.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_net/rte_ether.h